Esempio n. 1
0
 def test_cant_bear_off_with_bar(self):
     board = Board(repeat_point(23) + [Point(2, Color.White)], )
     board.add_bar(Color.White)
     self.assertFalse(board.can_bear_off(Color.White))
Esempio n. 2
0
 def test_can_bear_off_almost_done(self):
     board = Board(white_almost_done_points)
     self.assertTrue(board.can_bear_off(Color.White))
     self.assertFalse(board.can_bear_off(Color.Black))
Esempio n. 3
0
 def test_can_bear_off_limited(self):
     board = Board(white_can_bear_off_points)
     self.assertTrue(board.can_bear_off(Color.White))
     self.assertFalse(board.can_bear_off(Color.Black))
Esempio n. 4
0
 def test_can_bear_off_perfect_prime(self):
     board = Board(white_perfect_prime_points)
     self.assertFalse(board.can_bear_off(Color.White))
     self.assertFalse(board.can_bear_off(Color.Black))
Esempio n. 5
0
 def test_can_bear_off_starting(self):
     board = Board(default_starting_points)
     self.assertFalse(board.can_bear_off(Color.White))
     self.assertFalse(board.can_bear_off(Color.Black))