def is_valid(self):
return self.x != None and self.y != None
def __eq__(self, other):
- return other != None and self.x == other.y and self.x == other.y
+ return other != None and self.x == other.x and self.y == other.y
def __add__(self, other):
return coord(self.x+other.x, self.y+other.y)
def __sub__(self, other):
def attack(torps_ok):
# bad guy attacks us
# torps_ok == False forces use of phasers in an attack
- # game could be over at this point, check
+ # game could be over at this point, check
if game.alldone:
return
attempt = False; ihurt = False;
return None
delta = coord()
# FIXME: C code this was translated from is wacky -- why the sign reversal?
- delta.y = 0.1*(w.y - game.sector.y);
- delta.x = 0.1*(game.sector.x - w.x);
+ delta.y = (w.y - game.sector.y);
+ delta.x = (game.sector.x - w.x);
if delta == coord(0, 0):
skip(1)
prout(_("Spock- \"Bridge to sickbay. Dr. McCoy,"))