Esempio n. 1
0
 def test_constitution_reduce(self):
     stats = Stats()
     stats._constitution = 5
     stats._health = 5
     self.assertEqual(4, stats.reduce_constitution(4))
     self.assertEqual(1, stats._constitution)
     self.assertEqual(1, stats._health)
Esempio n. 2
0
 def test_health_increase(self):
     stats = Stats()
     stats._constitution = 10
     stats._health = 5
     self.assertEqual(2, stats.increase_health(2))
     self.assertEqual(7, stats._health)
Esempio n. 3
0
 def test_health_max_cap(self):
     stats = Stats(constitution=10)
     stats._health = 5
     self.assertEqual(stats.increase_health(6), 5)
     self.assertEqual(10, stats._health)
Esempio n. 4
0
 def test_health_reduce(self):
     stats = Stats()
     stats._health = 5
     self.assertEqual(7, stats.reduce_health(7))
     self.assertEqual(-2, stats._health)