Esempio n. 1
0
def loadGame():
    with open("data.json", "r") as read_file:
        data = json.load(read_file)
        if data == "":
            texte = "pas de partie a chargé"
            jeu = Jeu.cree()
        else:
            jeu = data
            jeu["fenetre"] = Fenetre.cree(1000, 600)
    Jeu.joue(jeu)
Esempio n. 2
0
import Jeu
import Joueur

j = Jeu.cree()

print('fenetre=' + str(Jeu.fenetre(j)))
print('pile=' + str(Jeu.pile(j)))
print('joueurs=' + str(Jeu.joueurs(j)))
print('indiceJoueur=' + str(Jeu.indiceJoueur(j)))

print('joueurCourant=' + Joueur.nom(Jeu.joueurCourant(j)))

for i in range(2):
	Jeu.passeJoueurSuivant(j)
	print('indiceJoueur=' + str(Jeu.indiceJoueur(j)))
	print('joueurCourant=' + Joueur.nom(Jeu.joueurCourant(j)))
Esempio n. 3
0
def partieReplay(event, fenetre):
    Fenetre.quitte(fenetre)
    jeu = Jeu.cree()
    Jeu.joue(jeu, is_replay=True)
Esempio n. 4
0
def partieNormale(event, fenetre=None):
    if fenetre != None:
        Fenetre.quitte(fenetre)
    jeu = Jeu.cree()
    Jeu.joue(jeu)
Esempio n. 5
0
def newGame():
    jeu = Jeu.cree()
    Jeu.joue(jeu)