use of aima.core.environment.eightpuzzle.EightPuzzleBoard in project aima-java by aimacode.
the class EightPuzzleBoardMoveTest method testPosition6MoveUp.
@Test
public void testPosition6MoveUp() {
// { 6, 5, 4, 1, 8, 0, 7, 3, 2 }
setGapToPosition6();
board.moveGapUp();
Assert.assertEquals(new EightPuzzleBoard(new int[] { 6, 5, 0, 1, 8, 4, 7, 3, 2 }), board);
}
use of aima.core.environment.eightpuzzle.EightPuzzleBoard in project aima-java by aimacode.
the class EightPuzzleBoardMoveTest method testPosition8MoveDown.
@Test
public void testPosition8MoveDown() {
// { 6, 5, 4, 7, 1, 8, 3, 0, 2 }
setGapToPosition8();
board.moveGapDown();
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 testPosition6MoveRight.
@Test
public void testPosition6MoveRight() {
// { 6, 5, 4, 1, 8, 0, 7, 3, 2 }
setGapToPosition6();
board.moveGapRight();
Assert.assertEquals(new EightPuzzleBoard(new int[] { 6, 5, 4, 1, 8, 0, 7, 3, 2 }), board);
}
use of aima.core.environment.eightpuzzle.EightPuzzleBoard in project aima-java by aimacode.
the class EightPuzzleBoardMoveTest method testPosition9MoveDown.
@Test
public void testPosition9MoveDown() {
// { 6, 5, 4, 7, 1, 8, 3, 2, 0 }
setGapToPosition9();
board.moveGapDown();
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 testPosition8MoveUp.
@Test
public void testPosition8MoveUp() {
// { 6, 5, 4, 7, 1, 8, 3, 0, 2 }
setGapToPosition8();
board.moveGapUp();
Assert.assertEquals(new EightPuzzleBoard(new int[] { 6, 5, 4, 7, 0, 8, 3, 1, 2 }), board);
}
Aggregations