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)
def test_in_safetyzone_2(self): self.assertTrue(self.b.in_safetyzone(sorry.pawn("YELLOW", None, 162)))
def test_in_home_1(self): self.assertTrue(self.b.in_home(sorry.pawn("YELLOW", None, 167)))
def test_slide_3(self): self.assertEqual(self.b.slide(sorry.pawn("YELLOW", None, 38)), 42)
def test_slide_2(self): self.assertEqual(self.b.slide(sorry.pawn("GREEN", None, 0)), 3)
def setUp(self): self.b = sorry.board() self.p = sorry.pawn("YELLOW", None, 3) self.p1 = sorry.pawn("YELLOW", None, 1)
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()
def test_distance_2(self): self.assertEqual( self.b.distance(self.p, sorry.pawn("YELLOW", None, 4)), 1)