Пример #1
0
def add_character_to_game_json():
    DA = DataAccess()
    messageList = {}
    messageList[0] = {}
    char_id = request.args.get('char_id', 0, type=str)
    game_id = request.args.get('game_id', 0, type=str)
    ret = DA.addCharacterToGame(game_id, char_id)
    messageList[0]['message'] = ret
    
    return jsonify(messageList)
Пример #2
0
#DA.printAbilities()
#DA.printWeaknesses()
#DA.printFlaws()
#DA.printPerks()
#addDummyClientCharacter2()
#addDummyClientCharacter3()
#addDummyClientCharacter4()

for char in DA.getCharacters('*****@*****.**'):
    cchar = CDA.getClientCharacter(char.id)
    printClientCharacter(cchar)

print 'Game Stuff'
#DA.addGame('*****@*****.**', 'anotherWorkingGame')
DA.addCharacterToGame(7, 3)
DA.addCharacterToGame(7, 2)
DA.addCharacterToGame(7, 4)

#DA.removeCharacterFromGame(6, 4)
#DA.deleteGame(1)

for game in DA.getGames():
    print str(game.id) + ":" + game.name + " " + game.owner_id
    for char in DA.getGameCharacters(game.id):
        print char.name
 
#updateDummyClientCharacter4(4)
#CDA.deleteClientCharacter(1)