Beispiel #1
0
    def post(self):
        player = current_user_player()

        if player.doing:
            error_400(self.response, "ERROR_PLAYER_BUSY", "Player is busy.")
            return

        bot_match = Match(type="Bot")
        bot_match.setup_bot_match(player)

        player.doing = bot_match.key
        player.put()

        set_json_response(self.response, bot_match.get_data("full"))