Пример #1
0
  if len(outData['RevealedHobbyCards']):
    printData['RevealedHobbyCards'] = []
    for card in outData['RevealedHobbyCards']:
      printData['RevealedHobbyCards'].append( card['Label'] )

  printData['Actions'] = []
  for k,action in enumerate( outData['Actions'] ):
    lbl_arr = []
    for lbl in action:
      if lbl != 'step':
        lbl_arr.append( action[lbl] )
    label = " - ".join( lbl_arr )
    printData['Actions'].append( "%d: %s"%(k+1,label) )


  d(printData)

  sys.stdout.write( "Enter Action #: " )
  sys.stdout.flush()
  result = input()
  api.performAction( result )
  print ""
  print ""


d([api.getGame()])

DataManager.insertGameLogIntoDb(api.game.gameLog)
DataManager.closeConnection("gameConn")