def gainDiscard(gameState):
    gameState = gameState.clone()
    gameState.abcs[gameState.turn]['coins'] += 2
    currentPlayer = gameState.players[gameState.turn]
    response = currentPlayer.selectInput(InputSets.tf(), gameState, actionSimulator = actionSim)
    if response and response[0]:
        gameState.pcards[gameState.turn].deckToDiscard()
    return gameState
Beispiel #2
0
def gainDiscard(gameState):
    gameState = gameState.clone()
    gameState.abcs[gameState.turn]['coins'] += 2
    currentPlayer = gameState.players[gameState.turn]
    response = currentPlayer.selectInput(InputSets.tf(),
                                         gameState,
                                         actionSimulator=actionSim)
    if response and response[0]:
        gameState.pcards[gameState.turn].deckToDiscard()
    return gameState
def lend(gameState):
    gameState = gameState.clone()
    currentPlayer = gameState.players[gameState.turn]
    if gameState.pcards[gameState.turn].hand[Copper()] > 0:
        result = currentPlayer.selectInput(InputSets.tf(), gameState, actionSimulator = actionSim,
                helpMessage='Do you want to trash a copper?')
        if result and result[0]:
            gameState.pcards[gameState.turn].hand[Copper()] -= 1
            gameState.trash[Copper()] += 1
            gameState.abcs[gameState.turn]['coins'] += 3
    return gameState
def lend(gameState):
    gameState = gameState.clone()
    currentPlayer = gameState.players[gameState.turn]
    if gameState.pcards[gameState.turn].hand[Copper()] > 0:
        result = currentPlayer.selectInput(
            InputSets.tf(),
            gameState,
            actionSimulator=actionSim,
            helpMessage='Do you want to trash a copper?')
        if result and result[0]:
            gameState.pcards[gameState.turn].hand[Copper()] -= 1
            gameState.trash[Copper()] += 1
            gameState.abcs[gameState.turn]['coins'] += 3
    return gameState