switchTurn method

void switchTurn()

Switch turn to the opposite ChessPiece.color / player.

Implementation

void switchTurn() {
  turn = (turn == PieceColor.white) ? PieceColor.black : PieceColor.white;
  switchTimer();
}