예제 #1
0
 def attack(self, target):
   self.validify()
   if not isinstance(target, Ship):
     raise TypeError('target should be of [Ship]')
   target.validify()
   return library.shipAttack(self._ptr, target._ptr)
예제 #2
0
 def attack(self, Target):
     self.validify()
     if not isinstance(Target, Unit):
         raise TypeError('Target should be of [Unit]')
     Target.validify()
     return library.shipAttack(self.ptr, Target.ptr)
예제 #3
0
 def attack(self, Target):
   self.validify()
   if not isinstance(Target, Unit):
     raise TypeError('Target should be of [Unit]')
   Target.validify()
   return library.shipAttack(self.ptr, Target.ptr)