TicTacToeState extends TwoDimensionalBoardGameState { @SuppressWarnings("unchecked") @Override public TicTacToeState copy() { return new TicTacToeState(this); } TicTacToeState();  TicTacToeState(TicTacToeState state);  TicTacToeState(int[][] board, int player, List<Integer> win); int getNumPlayers(); @Override boolean moveSinglePoint(Point space); @Override boolean endState(); @SuppressWarnings("unchecked") @Override TicTacToeState copy(); @Override Set<BoardGameState> possibleBoardGameStates(BoardGameState currentState); @Override void setupStartingBoard(); @Override int getBoardWidth(); @Override int getBoardHeight(); char[] getPlayerSymbols(); @Override Color[] getPlayerColors(); @Override boolean moveDoublePoint(Point goTo, Point moveTo); @Override boolean moveOnePiece(); static final int X; static final int O; static final int NUMBER_OF_PLAYERS; static final int BOARD_WIDTH; }
@Test public void testCopy() { assertTrue(start.equals(start.copy())); assertTrue(test1.equals(test1.copy())); assertTrue(test2.equals(test2.copy())); assertTrue(test3.equals(test3.copy())); assertTrue(test4.equals(test4.copy())); assertFalse(start.equals(test1.copy())); assertFalse(test1.equals(test2.copy())); assertFalse(test2.equals(test3.copy())); assertFalse(test3.equals(test4.copy())); assertFalse(test4.equals(start.copy())); }