def createPlayers(mode): global playerOne, playerTwo if mode == 'Human vs AI': playerOne = Human('playerOne') if mode == 'AI vs AI': playerOne = randomAI('playerOne') playerTwo = AI('playerTwo') playerOne.addDestCardToHand() playerTwo.addDestCardToHand()
def createPlayers(): global playerOne, playerTwo, playerMode if playerMode == 'Human vs AI': playerOne = Human('playerOne') elif playerMode == 'AI vs AI': # flips strat1 and strat2 when you have looped 1/2 of then amount of total runs so each # strat goes first an equal amount of times '''if flip: playerOne = AI('playerOne', stratFlag2 if stratFlag2 else None) else:''' playerOne = AI('playerOne', stratFlag1 if stratFlag1 else None) # flips strat1 and strat2 when you have looped 1/2 of then amount of total runs so each # strat goes first an equal amount of times '''if flip: # stratFlag will be False or the name of the strat, since strings equate to True this code works playerTwo = AI('playerTwo', stratFlag1 if stratFlag1 else None) else:''' playerTwo = AI('playerTwo', stratFlag2 if stratFlag2 else None) playerOne.addDestCardToHand() playerTwo.addDestCardToHand()