cmd_SPAWN_POINT.argtypes = 'yx_tuple yx_tuple:nonneg'
def cmd_LOGIN(game, nick, connection_id):
cmd_SPAWN_POINT.argtypes = 'yx_tuple yx_tuple:nonneg'
def cmd_LOGIN(game, nick, connection_id):
for t in [t for t in game.things if t.type_ == 'Player' and t.name == nick]:
raise GameError('name already in use')
if game.get_player(connection_id):
for t in [t for t in game.things if t.type_ == 'Player' and t.name == nick]:
raise GameError('name already in use')
if game.get_player(connection_id):
cmd_TURN.argtypes = 'int:nonneg'
def cmd_ANNOTATE(game, yx, msg, pw, connection_id):
cmd_TURN.argtypes = 'int:nonneg'
def cmd_ANNOTATE(game, yx, msg, pw, connection_id):
player = game.get_player(connection_id)
big_yx, little_yx = player.fov_stencil.source_yxyx(yx)
if not player.fov_test(big_yx, little_yx):
player = game.get_player(connection_id)
big_yx, little_yx = player.fov_stencil.source_yxyx(yx)
if not player.fov_test(big_yx, little_yx):