game.things += [t] # TODO refactor into Thing.__init__?
game.sessions[connection_id] = t.id_
game.io.send('META ' + quote('you are now: ' + nick), connection_id)
+ game.io.send('PLAYER_ID %s' % t.id_, connection_id)
cmd_LOGIN.argtypes = 'string'
def cmd_QUERY(game, target_nick, msg, connection_id):
def cmd_PING(game, connection_id):
game.io.send('PONG')
-cmd_QUERY.argtypes = ''
+cmd_PING.argtypes = ''
+
+def cmd_TURN(game, n):
+ game.turn = n
+cmd_TURN.argtypes = 'int:nonneg'
+
+def cmd_MAP_LINE(game, y, line):
+ game.map.set_line(y, line)
+cmd_MAP_LINE.argtypes = 'int:nonneg string'