@Test public void shouldSaveCommandAndActAfterTick() { shouldBoardWith(new Sapper(2, 2), new Mine(3, 2)); board.getJoystick().right(); assertBoard("☼☼☼☼☼\n" + "☼***☼\n" + "☼*☺*☼\n" + "☼***☼\n" + "☼☼☼☼☼\n"); board.tick(); assertBoard("☼☼☼☼☼\n" + "☼ 11☼\n" + "☼ 1Ѡ☼\n" + "☼ 11☼\n" + "☼☼☼☼☼\n"); assertTrue(board.isGameOver()); }
private void moveRight() { board.getJoystick().right(); board.tick(); }
private void moveDown() { board.getJoystick().down(); board.tick(); }
private void unbombLeft() { board.getJoystick().act(); moveLeft(); }
private void unbombDown() { board.getJoystick().act(); moveDown(); }
private void unbombRight() { board.getJoystick().act(); moveRight(); }
private void moveLeft() { board.getJoystick().left(); board.tick(); }
private void unbombUp() { board.getJoystick().act(); moveUp(); }
private void moveUp() { board.getJoystick().up(); board.tick(); }