use of aima.core.environment.eightpuzzle.EightPuzzleBoard in project aima-java by aimacode.
the class EightPuzzleBoardMoveTest method testPosition1MoveLeft.
@Test
public void testPosition1MoveLeft() {
board.moveGapLeft();
Assert.assertEquals(new EightPuzzleBoard(new int[] { 0, 5, 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 testPosition1MoveUp.
@Test
public void testPosition1MoveUp() {
board.moveGapUp();
Assert.assertEquals(new EightPuzzleBoard(new int[] { 0, 5, 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 testPosition5MoveRight.
@Test
public void testPosition5MoveRight() {
// { 6, 5, 4, 1, 0, 8, 7, 3, 2 }
setGapToPosition5();
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 testPosition3MoveRight.
@Test
public void testPosition3MoveRight() {
// { 5, 4, 0, 6, 1, 8, 7, 3, 2 }
setGapToPosition3();
board.moveGapRight();
Assert.assertEquals(new EightPuzzleBoard(new int[] { 5, 4, 0, 6, 1, 8, 7, 3, 2 }), board);
}
use of aima.core.environment.eightpuzzle.EightPuzzleBoard in project aima-java by aimacode.
the class EightPuzzleBoardMoveTest method testPosition3MoveDown.
@Test
public void testPosition3MoveDown() {
// { 5, 4, 0, 6, 1, 8, 7, 3, 2 }
setGapToPosition3();
board.moveGapDown();
Assert.assertEquals(new EightPuzzleBoard(new int[] { 5, 4, 8, 6, 1, 0, 7, 3, 2 }), board);
}
Aggregations