public override bool Equals(Object anObj) { TicTacToeBoard anotherBoard = (TicTacToeBoard) anObj; for (int i = 0; i < 9; i++) if (state[i] != anotherBoard.state[i]) return false; return true; }