Example #1
0
 @Test
 public void LeftGetNextPositionTest() {
   BoardModel boardModel = BoardModel.initialize();
   int currentPosition = boardModel.getPositionOfEmptySlot();
   int nextPosition = Left.getInstance().getNextPosition(boardModel);
   assertTrue(nextPosition == currentPosition - 1);
 }
Example #2
0
 @Test
 public void UpGetNextPositionTest() {
   BoardModel boardModel = BoardModel.initialize();
   int currentPosition = boardModel.getPositionOfEmptySlot();
   int numberOfSlotsInARow = boardModel.getNumberOfSlotsInARow();
   int nextPosition = Up.getInstance().getNextPosition(boardModel);
   assertTrue(nextPosition == currentPosition - numberOfSlotsInARow);
 }