operator [] method
Implementation
GameEndConditions operator [](int index) {
if (index == Bishop.white) return white;
if (index == Bishop.black) return black;
throw RangeError('index can only be 0 or 1');
}
GameEndConditions operator [](int index) {
if (index == Bishop.white) return white;
if (index == Bishop.black) return black;
throw RangeError('index can only be 0 or 1');
}