use of aima.core.environment.eightpuzzle.EightPuzzleBoard in project aima-java by aimacode.
the class EightPuzzleBoardMoveTest method testPosition9MoveRight.
@Test
public void testPosition9MoveRight() {
// { 6, 5, 4, 7, 1, 8, 3, 2, 0 }
setGapToPosition9();
board.moveGapRight();
Assert.assertEquals(new EightPuzzleBoard(new int[] { 6, 5, 4, 7, 1, 8, 3, 2, 0 }), board);
}
use of aima.core.environment.eightpuzzle.EightPuzzleBoard in project aima-java by aimacode.
the class EightPuzzleBoardMoveTest method testPosition7MoveRight.
@Test
public void testPosition7MoveRight() {
// { 6, 5, 4, 7, 1, 8, 0, 3, 2 }
setGapToPosition7();
board.moveGapRight();
Assert.assertEquals(new EightPuzzleBoard(new int[] { 6, 5, 4, 7, 1, 8, 3, 0, 2 }), board);
}
use of aima.core.environment.eightpuzzle.EightPuzzleBoard in project aima-java by aimacode.
the class EightPuzzleBoardMoveTest method testPosition1MoveRight.
@Test
public void testPosition1MoveRight() {
board.moveGapRight();
Assert.assertEquals(new EightPuzzleBoard(new int[] { 5, 0, 4, 6, 1, 8, 7, 3, 2 }), board);
}
use of aima.core.environment.eightpuzzle.EightPuzzleBoard in project aima-java by aimacode.
the class EightPuzzleBoardMoveTest method testPosition4MoveRight.
@Test
public void testPosition4MoveRight() {
// { 6, 5, 4, 0, 1, 8, 7, 3, 2 }
setGapToPosition4();
board.moveGapRight();
Assert.assertEquals(new EightPuzzleBoard(new int[] { 6, 5, 4, 1, 0, 8, 7, 3, 2 }), board);
}
use of aima.core.environment.eightpuzzle.EightPuzzleBoard in project aima-java by aimacode.
the class EightPuzzleBoardMoveTest method testPosition5MoveUp.
@Test
public void testPosition5MoveUp() {
// { 6, 5, 4, 1, 0, 8, 7, 3, 2 }
setGapToPosition5();
board.moveGapUp();
Assert.assertEquals(new EightPuzzleBoard(new int[] { 6, 0, 4, 1, 5, 8, 7, 3, 2 }), board);
}
Aggregations