Package com.tinygo.logic

Examples of com.tinygo.logic.DocumentedGame.prev()


    public void testInit() {
        DocumentedGame game = new DocumentedGame(4);
        try {
            game.play(0, 0);
            assertTrue(game.prev());
            game.play(1, 1);
            game.init(4);
            assertFalse(game.prev());
            assertFalse(game.next());
            assertFalse(game.prevVariant());
View Full Code Here


        try {
            game.play(0, 0);
            assertTrue(game.prev());
            game.play(1, 1);
            game.init(4);
            assertFalse(game.prev());
            assertFalse(game.next());
            assertFalse(game.prevVariant());
            assertFalse(game.nextVariant());
        } catch (Exception e) {
            e.printStackTrace();
View Full Code Here

        DocumentedGame game = new DocumentedGame(4);
        try {
            game.play(0, 0);
            game.pass();
            assertEquals(Board.BLACK, game.colorToPlay);
            game.prev();
            assertEquals(Board.WHITE, game.colorToPlay);
            game.next();
            assertEquals(Board.BLACK, game.colorToPlay);
        } catch (Exception e) {
            e.printStackTrace();
View Full Code Here

            assertEquals(Board.NONE, game.board.get(2, 2));
            game.next();
            assertEquals(Board.BLACK, game.board.get(0, 0));
            assertEquals(Board.WHITE, game.board.get(1, 1));
            assertEquals(Board.WHITE, game.board.get(2, 2));
            game.prev();
            assertEquals(Board.BLACK, game.board.get(0, 0));
            assertEquals(Board.WHITE, game.board.get(1, 1));
            assertEquals(Board.NONE, game.board.get(2, 2));
            game.prev();
            assertEquals(Board.NONE, game.board.get(0, 0));
View Full Code Here

            assertEquals(Board.WHITE, game.board.get(2, 2));
            game.prev();
            assertEquals(Board.BLACK, game.board.get(0, 0));
            assertEquals(Board.WHITE, game.board.get(1, 1));
            assertEquals(Board.NONE, game.board.get(2, 2));
            game.prev();
            assertEquals(Board.NONE, game.board.get(0, 0));
            assertEquals(Board.NONE, game.board.get(1, 1));
            assertEquals(Board.NONE, game.board.get(2, 2));
            game.next();
            game.next();
View Full Code Here

            assertEquals(Board.NONE, game.board.get(2, 2));
            game.next();
            assertEquals(Board.NONE, game.board.get(0, 0));
            assertEquals(Board.WHITE, game.board.get(1, 1));
            assertEquals(Board.WHITE, game.board.get(2, 2));
            game.prev();
            assertEquals(Board.BLACK, game.board.get(0, 0));
            assertEquals(Board.WHITE, game.board.get(1, 1));
            assertEquals(Board.NONE, game.board.get(2, 2));
            game.prev();
            assertEquals(Board.NONE, game.board.get(0, 0));
View Full Code Here

            assertEquals(Board.WHITE, game.board.get(2, 2));
            game.prev();
            assertEquals(Board.BLACK, game.board.get(0, 0));
            assertEquals(Board.WHITE, game.board.get(1, 1));
            assertEquals(Board.NONE, game.board.get(2, 2));
            game.prev();
            assertEquals(Board.NONE, game.board.get(0, 0));
            assertEquals(Board.NONE, game.board.get(1, 1));
            assertEquals(Board.NONE, game.board.get(2, 2));
            game.next();
            game.next();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.