Package com.tinygo.logic

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


            assertFalse(game.prev());
            assertFalse(game.next());

            SGFNode n2w, n3b_1, n3b_2;
            // test forward/backward navigation
            game.play(3, 3, Board.BLACK);
            game.play(0, 1, Board.WHITE);
            n2w = game.kifuLastMove();
            game.play(0, 2, Board.BLACK);
            n3b_1 = game.kifuLastMove();
View Full Code Here


            assertFalse(game.next());

            SGFNode n2w, n3b_1, n3b_2;
            // test forward/backward navigation
            game.play(3, 3, Board.BLACK);
            game.play(0, 1, Board.WHITE);
            n2w = game.kifuLastMove();
            game.play(0, 2, Board.BLACK);
            n3b_1 = game.kifuLastMove();

            assertTrue(game.prev());
View Full Code Here

            SGFNode n2w, n3b_1, n3b_2;
            // test forward/backward navigation
            game.play(3, 3, Board.BLACK);
            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);
View Full Code Here

            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());
            assertSame(n3b_1, game.kifuLastMove());
View Full Code Here

    }

    public void testNavigation2() {
        DocumentedGame game = new DocumentedGame(4);
        try {
            game.play(0, 0);
            try {
                game.play(0, 0);
            } catch (GameOverStoneException e) {
            }
            assertEquals(game.board.pos(0, 0), game.lastMove);
View Full Code Here

    public void testNavigation2() {
        DocumentedGame game = new DocumentedGame(4);
        try {
            game.play(0, 0);
            try {
                game.play(0, 0);
            } catch (GameOverStoneException e) {
            }
            assertEquals(game.board.pos(0, 0), game.lastMove);
            assertEquals(Board.WHITE, game.colorToPlay);
            while (game.prev())
View Full Code Here

    }

    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());
View Full Code Here

    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());
            assertTrue(game.prevVariant());
View Full Code Here

        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());
            assertTrue(game.prevVariant());
            assertTrue(game.next());
View Full Code Here

    }

    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());
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.