operator [] method

GameEndConditions operator [](
  1. int index
)

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');
}