def test_calculateGameScore_east_no_mahyong(self): pr_jorick = PlayerRound(player = self.jorick, _round = self._round, position = 'East', boardScore = 10) pr_titus = PlayerRound(player = self.titus, _round = self._round, position ='West', boardScore = 20) PlayerRound.calculateGameScore(playerround1 = pr_jorick, playerround2 = pr_titus) self.assertEqual(pr_jorick.gameScore, -20) self.assertEqual(pr_titus.gameScore, 20)
def test_calculateGameScore_no_east_mahyong_higher(self): pr_jorick = PlayerRound(player = self.jorick, _round = self._round, position = 'North', boardScore = 10) pr_titus = PlayerRound(player = self.titus, _round = self._round, position ='West', boardScore = 20, mahyong = True) PlayerRound.calculateGameScore(playerround1 = pr_jorick, playerround2 = pr_titus) self.assertEqual(pr_jorick.gameScore, -10) self.assertEqual(pr_titus.gameScore, 10)
def test_calculategameScore_east_mahyong_lower(self): pr_jorick = PlayerRound(player = self.jorick, _round = self._round, position = 'East', boardScore = 10, mahyong = True, ) pr_titus = PlayerRound(player = self.titus, _round = self._round, position ='West', boardScore = 20, ) PlayerRound.calculateGameScore(playerround1 = pr_jorick, playerround2 = pr_titus) self.assertEqual(pr_jorick.gameScore, 0) self.assertEqual(pr_titus.gameScore, 0)