Examples of prev()


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

            game.play(0, 1, Board.WHITE);
            n2w = game.kifuLastMove();
            game.play(0, 2, Board.BLACK);
            n3b_1 = game.kifuLastMove();

            assertTrue(game.prev());
            assertSame(n2w, game.kifuLastMove());
            assertEquals(board.pos(0, 1), game.lastMove);
            assertEquals(Board.BLACK, game.colorToPlay);
            assertTrue(game.next());
            assertSame(n3b_1, game.kifuLastMove());
View Full Code Here

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

            assertEquals(board.pos(0, 2), game.lastMove);
            assertEquals(Board.WHITE, game.colorToPlay);
            assertFalse(game.next());

            // test variant navigation
            assertTrue(game.prev());
            game.play(0, 0, Board.BLACK); // variant to 0,2
            n3b_2 = game.kifuLastMove();
            assertEquals(board.pos(0, 0), game.lastMove);
            assertFalse(game.nextVariant());
            assertTrue(game.prevVariant());
View Full Code Here

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

            assertEquals(Board.WHITE, game.colorToPlay);

            // check if variant option is remembered
            assertFalse(game.nextVariant());
            assertTrue(game.prev());
            assertSame(n2w, game.kifuLastMove());
            assertTrue(game.next());
            assertSame(n3b_2, game.kifuLastMove());
            assertFalse(game.nextVariant());
        } catch (Exception e) {
View Full Code Here

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

                game.play(0, 0);
            } catch (GameOverStoneException e) {
            }
            assertEquals(game.board.pos(0, 0), game.lastMove);
            assertEquals(Board.WHITE, game.colorToPlay);
            while (game.prev())
                // DO NOTHING
                ;
            game.next();
            game.next();
        } catch (Exception e) {
View Full Code Here

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

    public void testVariants() {
        DocumentedGame game = new DocumentedGame(3);
        try {
            game.play(0, 0);
            assertTrue(game.prev());
            game.play(1, 1);
            assertTrue(game.prevVariant());
            game.play(2, 2);
            assertTrue(game.prev());
            assertTrue(game.nextVariant());
View Full Code Here

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

            game.play(0, 0);
            assertTrue(game.prev());
            game.play(1, 1);
            assertTrue(game.prevVariant());
            game.play(2, 2);
            assertTrue(game.prev());
            assertTrue(game.nextVariant());
            assertTrue(game.prevVariant());
            assertTrue(game.next());

            byte[] data = {
View Full Code Here

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

    public void testVariants2() {
        DocumentedGame game = new DocumentedGame(3);
        try {
            game.play(1, 1);
            game.play(0, 1);
            assertTrue(game.prev());
            game.play(1, 0);
            game.play(0, 1);
            assertTrue(game.prev());
            assertTrue(game.prev());
            assertTrue(game.next());
View Full Code Here

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

            game.play(1, 1);
            game.play(0, 1);
            assertTrue(game.prev());
            game.play(1, 0);
            game.play(0, 1);
            assertTrue(game.prev());
            assertTrue(game.prev());
            assertTrue(game.next());
            assertTrue(game.next());

            byte[] data = {
View Full Code Here

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

            game.play(0, 1);
            assertTrue(game.prev());
            game.play(1, 0);
            game.play(0, 1);
            assertTrue(game.prev());
            assertTrue(game.prev());
            assertTrue(game.next());
            assertTrue(game.next());

            byte[] data = {
                    Board.NONE, Board.WHITE, Board.NONE,
View Full Code Here

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
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.