コード例 #1
0
ファイル: simpleCBs.py プロジェクト: krubokrubo/Pygminion
 def func(gameState, actions=actions, cards=cards, money=money, buys=buys, points=points):
     currentPlayer = gameState.players[gameState.currentPlayer]
     currentTurn = currentPlayer.currentTurn
     currentTurn.actions += actions
     currentTurn.buys += buys
     currentTurn.money = utils.addMoney(currentTurn.money, money)
     currentPlayer.draw(cards)
     currentPlayer.points += points
コード例 #2
0
ファイル: countdeck.py プロジェクト: krubokrubo/Pygminion
def sample():
    print player.allCards()
    for a in range(10):
        drawOver()
        printBriefState(player)
    act = buy = 0
    mon = '0'
    for a in range(1000):
        drawOver()
        act += player.currentTurn.actions
        buy += player.currentTurn.buys
        mon = utils.addMoney(mon, player.currentTurn.money)
    print 'avg %d Act %d Buy %s Money' % (act, buy, mon)
コード例 #3
0
ファイル: simpleCBs.py プロジェクト: grigorescu/Pygminion
 def func(gameState, actions=actions, cards=cards, money=money, points=points):
     gameState.players[gameState.currentPlayer].actions += actions
     gameState.players[gameState.currentPlayer].draw(cards)
     gameState.players[gameState.currentPlayer].money = \
         utils.addMoney(gameState.players[gameState.currentPlayer].money, money)
     gameState.players[gameState.currentPlayer].points += points