Beispiel #1
0
 def test_validatePlacementNonIsolable(self):
     game = Game()
     board = game.getBoard()
     self.assertEquals(FieldState.EMPTY, board.getState("a1"))
     self.assertEquals(FieldState.EMPTY, board.getState("b2"))
     m1 = Placement(BallColors.BLACK, "a1", "b2")
     self.assertFalse(m1.validate(game)[0])
Beispiel #2
0
 def test_validatePlacementOnNonEmptyField(self):
     game = Game()
     board = game.getBoard()
     self.assertEquals(FieldState.EMPTY, board.getState("a1"))
     self.assertEquals(FieldState.EMPTY, board.getState("a2"))
     m1 = Placement(BallColors.BLACK, "a1", "a2")
     m1.execute(game)
     self.assertEquals(FieldState.BLACK, board.getState("a1"))
     self.assertEquals(FieldState.REMOVED, board.getState("a2"))
     self.assertFalse(m1.validate(game)[0])