Ejemplo n.º 1
0
 def test_SingleCaptureNotValidToNonEmptyField(self):
     game = Game()
     Placement(BallColors.BLACK, "a1", "a2").execute(game)
     Placement(BallColors.GRAY, "b1", "c1").execute(game)
     m3 = Capture(["a1", "c1"])
     res = m3.validate(game)
     self.assertFalse(res[0])
Ejemplo n.º 2
0
 def test_SingleCapture(self):
     game = Game()
     m1 = Placement(BallColors.BLACK, "a1", "a2")
     m1.execute(game)
     m2 = Placement(BallColors.GRAY, "b1", "a3")
     m2.execute(game)
     m3 = Capture(["a1", "c1"])
     m3.execute(game)
Ejemplo n.º 3
0
 def test_SingleCaptureNotValidWithEmptyMiddle(self):
     game = Game()
     Placement(BallColors.BLACK, "a1", "a2").execute(game)
     m2 = Capture(["a1", "c1"])
     res = m2.validate(game)
     self.assertFalse(res[0])