Пример #1
0
def get_games_json():
    DA= DataAccess()
    games = DA.getGames()
    gameList = {}

    for game in games:
        gameList[game.id] = {}
        gameList[game.id]['owner_id'] = game.owner_id
        gameList[game.id]['name'] = game.name

    return jsonify(gameList)
Пример #2
0
#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)