Exemplo n.º 1
0
 def __init__(self):
     self.root = tk.Tk()
     self.myGame = view.GUI(self.root, self)
     self.game_deck = model.deck()
     self.players = [
         model.player(self.game_deck, 0),
         model.player(self.game_deck, 1),
         model.player(self.game_deck, 2)
     ]
     self.current_card = None
     self.open_card = None
     self.turns = 0
     self.show_card1((0, 2))
     self.show_card1((0, 3))
     self.clicked_win = -1
Exemplo n.º 2
0
def reset():
    global d1, gamesWon, gamesPushed, totalGames
    d1 = deck(numDecks)
    gamesWon = 0
    gamesPushed = 0
    totalGames = 0
Exemplo n.º 3
0
from model import deck
from model import card
from model import player

import pdb, sys
import random
import csv

numDecks = 1

dealer = player('Dealer')
gambler = player('Player')
gamesScore = 0
gamesPushed = 0
totalGames = 0
d1 = deck(numDecks)

def main():
    global gamesScore, gamesPushed, totalGames
    gameDone = False
    datasetSize = 1000000
    count = 0 
    while not gameDone:
        count += 1
        print(count)
        if count == datasetSize:
            gameDone = True
        dealerInfo = ["dealer"]
        playerInfo = ["player"]
        gameResult = runHand(dealer, gambler)
        for x in dealer.cards: