예제 #1
0
    def post(self):
        self.response.headers['Content-Type'] = 'application/json'
        args = json.loads(self.request.body)
        gameId = args['gameKeyId']
        nickname = args['nickname']
        player = GameService.createPlayer(gameId, nickname)
        players = [player]

        self.response.out.write(PlayerService.toJSON(players))
        logging.info(PlayerService.toJSON(players))
예제 #2
0
    def post(self):
        self.response.headers['Content-Type'] = 'application/json'
        args = json.loads(self.request.body)
        gameId = args['gameKeyId']
        nickname = args['nickname']
        player = GameService.createPlayer(gameId, nickname)
        players = [player]

        self.response.out.write(PlayerService.toJSON(players))
        logging.info(PlayerService.toJSON(players))
예제 #3
0
    def post(self):
        args = json.loads(self.request.body)
        lat = args['lat']
        lon = args['lon']
        playerId = int(args['id'])

        PlayerService.updateCachedPosition(playerId, lat, lon)

        players = GameService.getBuddies(playerId)

        #GameService.executeGameLogicForPlayer(player)

        self.response.headers['Content-Type'] = 'application/json'
        self.response.out.write(PlayerService.toJSON(players))
        logging.info(self.response)
예제 #4
0
    def post(self):
        args = json.loads(self.request.body)
        lat = args['lat']
        lon = args['lon']
        playerId = int(args['id'])

        PlayerService.updateCachedPosition(playerId, lat, lon)

        players = GameService.getBuddies(playerId)

        #GameService.executeGameLogicForPlayer(player)

        self.response.headers['Content-Type'] = 'application/json'
        self.response.out.write(PlayerService.toJSON(players))
        logging.info(self.response)
예제 #5
0
 def post(self):
     logging.info(self.request.body)
     args = json.loads(self.request.body)
     playerKey = args['id']
     PlayerService.deletePlayer(playerKey)
예제 #6
0
 def post(self):
     logging.info(self.request.body)
     args = json.loads(self.request.body)
     playerKey = args['id']
     PlayerService.deletePlayer(playerKey)