Examples of randomSolvableInitialState()


Examples of com.oti.Board.randomSolvableInitialState()

    @Test
    public void testBoardRandomAndCustom() throws Exception {
        // set up board to known, unsolved, initial state
        Board board = new Board(4);
        board.randomSolvableInitialState(1000, 3, true);
        System.out.println("\nRandom com.oti.Board: ");
        board.describeBoard();

        // set up a custom board to the same state
        Board customBoard = new Board(4, 1,2,3,4,5,6,0,7,9,10,11,8,13,14,15,12);
View Full Code Here

Examples of com.oti.Board.randomSolvableInitialState()

        Board goalBoard = new Board(4);
        System.out.println("\nGoal com.oti.Board: ");
        goalBoard.describeBoard();

        Board targetBoard = goalBoard.clone();
        targetBoard.randomSolvableInitialState(1000, 3, true);
        Assert.assertFalse(targetBoard.isSolved());

        System.out.println("\nTarget com.oti.Board: ");
        targetBoard.describeBoard();
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.