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