summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--netnavalbattle/context.py2
-rw-r--r--netnavalbattle/event.py1
2 files changed, 3 insertions, 0 deletions
diff --git a/netnavalbattle/context.py b/netnavalbattle/context.py
index ef20124..d7b81a6 100644
--- a/netnavalbattle/context.py
+++ b/netnavalbattle/context.py
@@ -190,6 +190,8 @@ class NetNavalBattleClientContext (object):
elif self._step == constants.STEP_FIRE:
if board._owner == self._username:
return
+ if not 0 <= i < board._lines or not 0 <= j < board._columns:
+ return
ev = event.FireEvent (board._owner, i, j)
self._connection.send_event (ev)
elif self._step == constants.STEP_WAIT:
diff --git a/netnavalbattle/event.py b/netnavalbattle/event.py
index 86736b2..a2b16c0 100644
--- a/netnavalbattle/event.py
+++ b/netnavalbattle/event.py
@@ -555,6 +555,7 @@ class FireNotificationEvent (Event):
def process (self, context):
context.fire_notification (self.target, self.x, self.y, self.result)
+ context.fire_ok ()
def get_args (self):
return [self.source, self.target, self.x, self.y, self.result]