Permalink
Browse files

Only allow torpedoes above the sub.

  • Loading branch information...
1 parent e8f8734 commit 7137379c88c7ace57b0d4f6fd3cb3c38b204d6db Nameless committed Oct 5, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 levelui.py
View
@@ -141,7 +141,9 @@ def steer(self, direction, speed=2):
### member functions that send events to the main loop ###
def launch_send(self, mouseclick):
- self.out_queue.put("launch %d,%d" % (mouseclick.x, mouseclick.y))
+ if mouseclick.y < self.canvas.coords(self.submarine)[1]:
+ # only destinations over the sub are valid
+ self.out_queue.put("launch %d,%d" % (mouseclick.x, mouseclick.y))
### member functions that display events received from the main loop ###
def launch(self, event):

0 comments on commit 7137379

Please sign in to comment.