use of aima.core.environment.eightpuzzle.EightPuzzleBoard in project aima-java by aimacode.
the class EightPuzzleBoardMoveTest method testPosition6MoveLeft.
@Test
public void testPosition6MoveLeft() {
// { 6, 5, 4, 1, 8, 0, 7, 3, 2 }
setGapToPosition6();
board.moveGapLeft();
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 testPosition9MoveLeft.
@Test
public void testPosition9MoveLeft() {
// { 6, 5, 4, 7, 1, 8, 3, 2, 0 }
setGapToPosition9();
board.moveGapLeft();
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 testPosition7MoveDown.
@Test
public void testPosition7MoveDown() {
// { 6, 5, 4, 7, 1, 8, 0, 3, 2 }
setGapToPosition7();
board.moveGapDown();
Assert.assertEquals(new EightPuzzleBoard(new int[] { 6, 5, 4, 7, 1, 8, 0, 3, 2 }), board);
}
use of aima.core.environment.eightpuzzle.EightPuzzleBoard in project aima-java by aimacode.
the class EightPuzzleBoardMoveTest method testPosition5MoveDown.
@Test
public void testPosition5MoveDown() {
// { 6, 5, 4, 1, 0, 8, 7, 3, 2 }
setGapToPosition5();
board.moveGapDown();
Assert.assertEquals(new EightPuzzleBoard(new int[] { 6, 5, 4, 1, 3, 8, 7, 0, 2 }), board);
}
use of aima.core.environment.eightpuzzle.EightPuzzleBoard in project aima-java by aimacode.
the class EightPuzzleBoardMoveTest method testPosition4MoveUp.
@Test
public void testPosition4MoveUp() {
// { 6, 5, 4, 0, 1, 8, 7, 3, 2 }
setGapToPosition4();
board.moveGapUp();
Assert.assertEquals(new EightPuzzleBoard(new int[] { 0, 5, 4, 6, 1, 8, 7, 3, 2 }), board);
}
Aggregations