/** Makes sure the ChessGameEngine initialized properly and is waiting for the user to click. */ public void testInitialization() { assertNotNull(gameEngine); assertTrue(panel.getGameLog().getLastLog().contains("new chess" + " game")); assertEquals(gameEngine.getCurrentPlayer(), 1); assertFalse(gameEngine.playerHasLegalMoves(-1)); assertFalse(gameEngine.isKingInCheck(false)); }
/** Sets up the test harness by creating a panel and other necessary Chess objects. */ public void setUp() { panel = new ChessPanel(); gameEngine = panel.getGameEngine(); board = panel.getGameBoard(); }