def testInvalidAttack(self): m = Map(10, 10) m.generate_from_ascii("models/maps/10by10.txt") s = SquabblerUnit(8, 4, m, CONST.jets) b = BruiserUnit(8, 5, m, CONST.jets) ##blocked by teammate assert (not s.attack(7, 4)) assert (not s.attack(8, 5))
def testAttackComplex(self): m = Map(10, 10) m.generate_from_ascii("models/maps/10by10.txt") s = SquabblerUnit(8, 3, m, CONST.jets) b = BruiserUnit(8, 5, m, CONST.sharks) ##blocked by teammate h = b.hp assert (s.attack(8, 5)) assert (b.hp < h)