X-Git-Url: https://jxself.org/git/?p=super-star-trek.git;a=blobdiff_plain;f=sst.py;h=234d37ba9b1d324c4f72040d73241c15db7eda62;hp=3b00bd6dc994c64f2e2a94443f6e1c448ab4ace8;hb=467b74d816d5376c9c6bd66f20cfe6f740d2ab8b;hpb=c02fecd74adf1c58c2db2e20b7c3f9a5e1fe321a diff --git a/sst.py b/sst.py index 3b00bd6..234d37b 100755 --- a/sst.py +++ b/sst.py @@ -319,7 +319,9 @@ class Enemy: else: self.location = Coord() self.kdist = self.kavgd = None - game.enemies.remove(self) + # Guard prevents failure on Tholian or thingy + if self in game.enemies: + game.enemies.remove(self) return motion def __repr__(self): return "<%s,%s.%f>" % (self.type, self.location, self.power) # For debugging