Exemple #1
0
 def test_filtersortpawns_2(self):
     self.s._player._pawns = [
         sorry.pawn("YELLOW", self.s._player, 7),
         sorry.pawn("YELLOW", self.s._player, 9),
         sorry.pawn("YELLOW", self.s._player, 2),
         sorry.pawn("YELLOW", self.s._player, 3)
     ]
     self.assertEqual(self.s.filtersortpawns()[0].position, 9)
Exemple #2
0
 def test_in_safetyzone_2(self):
     self.assertTrue(self.b.in_safetyzone(sorry.pawn("YELLOW", None, 162)))
Exemple #3
0
 def test_in_home_1(self):
     self.assertTrue(self.b.in_home(sorry.pawn("YELLOW", None, 167)))
Exemple #4
0
 def test_slide_3(self):
     self.assertEqual(self.b.slide(sorry.pawn("YELLOW", None, 38)), 42)
Exemple #5
0
 def test_slide_2(self):
     self.assertEqual(self.b.slide(sorry.pawn("GREEN", None, 0)), 3)
Exemple #6
0
 def setUp(self):
     self.b = sorry.board()
     self.p = sorry.pawn("YELLOW", None, 3)
     self.p1 = sorry.pawn("YELLOW", None, 1)
Exemple #7
0
 def setUp(self):
     self.p1 = sorry.pawn("YELLOW", None, 3)
     self.p2 = sorry.pawn("YELLOW", None, -1)
     self.p3 = sorry.pawn("RED", None, 43)
     self.b = sorry.board()
Exemple #8
0
 def test_distance_2(self):
     self.assertEqual(
         self.b.distance(self.p, sorry.pawn("YELLOW", None, 4)), 1)