game.turn = n
cmd_TURN.argtypes = 'int:nonneg'
-def cmd_ANNOTATE(game, yx, msg, pw=None, connection_id=None):
- if connection_id and not game.can_do_tile_with_pw(yx, pw):
+def cmd_ANNOTATE(game, yx, msg, pw, connection_id):
+ if not game.can_do_tile_with_pw(yx, pw):
raise GameError('wrong password for tile')
if msg == ' ':
if yx in game.annotations:
game.changed = True
cmd_ANNOTATE.argtypes = 'yx_tuple:nonneg string string'
-def cmd_PORTAL(game, yx, msg, pw=None, connection_id=None):
- if connection_id and not game.can_do_tile_with_pw(yx, pw):
+def cmd_PORTAL(game, yx, msg, pw, connection_id):
+ if not game.can_do_tile_with_pw(yx, pw):
raise GameError('wrong password for tile')
if msg == ' ':
if yx in game.portals:
game.changed = True
cmd_PORTAL.argtypes = 'yx_tuple:nonneg string string'
+def cmd_GOD_ANNOTATE(game, yx, msg):
+ game.annotations[yx] = msg
+ game.changed = True
+cmd_ANNOTATE.argtypes = 'yx_tuple:nonneg string'
+
+def cmd_GOD_PORTAL(game, yx, msg):
+ game.portals[yx] = msg
+ game.changed = True
+cmd_PORTAL.argtypes = 'yx_tuple:nonneg string'
+
def cmd_GET_ANNOTATION(game, yx, connection_id):
annotation = '(none)';
if yx in game.annotations: