OthelloState extends TwoDimensionalBoardGameState { @Override public void setupStartingBoard() { numPasses = 0; for(int i = 0; i < BOARD_WIDTH; i++){ for(int j = 0; j < BOARD_WIDTH; j++){ boardState[i][j] = EMPTY; } } boardState[BOARD_CORE1][BOARD_CORE1] = BLACK_CHIP; boardState[BOARD_CORE2][BOARD_CORE2] = BLACK_CHIP; boardState[BOARD_CORE1][BOARD_CORE2] = WHITE_CHIP; boardState[BOARD_CORE2][BOARD_CORE1] = WHITE_CHIP; } OthelloState();  OthelloState(OthelloState state);  OthelloState(int[][] board, int nextPlay, List<Integer> win); int getNumPlayers(); @Override boolean endState(); @Override boolean moveSinglePoint(Point goTo); @SuppressWarnings("unchecked") @Override Set<T> possibleBoardGameStates(T currentState); @SuppressWarnings("unchecked") @Override OthelloState copy(); @Override List<Integer> getWinners(); @Override void setupStartingBoard(); @Override int getBoardWidth(); @Override int getBoardHeight(); @Override char[] getPlayerSymbols(); @Override Color[] getPlayerColors(); @Override boolean moveDoublePoint(Point goTo, Point moveTo); @Override boolean moveOnePiece(); String toString(); static final int BLACK_CHIP; static final int WHITE_CHIP; }
@Test public void testSetupStartingBoard() { start.setupStartingBoard(); assertEquals(new OthelloState(), start); assertTrue(start.moveSinglePoint(new Point(3,5))); test1.setupStartingBoard(); assertFalse(test1.moveSinglePoint(new Point(3,5))); }