コード例 #1
0
ファイル: ChessGameEngineTest.java プロジェクト: bakatz/Chess
 /** 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));
 }
コード例 #2
0
ファイル: ChessGameEngineTest.java プロジェクト: bakatz/Chess
 /** 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();
 }