summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Seguin <guillaume@segu.in>2009-11-24 00:11:03 +0100
committerGuillaume Seguin <guillaume@segu.in>2009-11-24 00:11:03 +0100
commite4dc525277d7a587012aed7294c28c12d1e63268 (patch)
tree9403abe61e5cefaf55f5ed1fb3bb987117418e92
parent05d7db93cb8652223423d9629cfe631abe71ee47 (diff)
downloadnetnavalbattle-e4dc525277d7a587012aed7294c28c12d1e63268.tar.gz
netnavalbattle-e4dc525277d7a587012aed7294c28c12d1e63268.tar.bz2
Fix PlaceNOkEvents usage
-rw-r--r--netnavalbattle/context.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/netnavalbattle/context.py b/netnavalbattle/context.py
index c8c48e8..ef20124 100644
--- a/netnavalbattle/context.py
+++ b/netnavalbattle/context.py
@@ -560,11 +560,11 @@ class NetNavalBattleServerContext (object):
ship = ships.NetNavalBattleShips[ship_type] (x, y, rotated)
count = self._board.get_ships_count (ship.__class__)
if count >= self._game.ship_counts[ship_type]:
- ev = event.PlaceNOkEvent ()
+ ev = event.PlaceNOkEvent ("Could not add another ship of this type")
elif self._board.place_ship (ship):
ev = event.PlaceOkEvent (x, y, ship_type, rotated)
else:
- ev = event.PlaceNOkEvent ()
+ ev = event.PlaceNOkEvent ("Invalid ship position")
self._connection.send_event (self, ev)
def delete_ship (self, x, y):