예제 #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)
예제 #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)))
예제 #3
0
파일: Pytatra.py 프로젝트: Elegye/Pytatra
def partieReplay(event, fenetre):
    Fenetre.quitte(fenetre)
    jeu = Jeu.cree()
    Jeu.joue(jeu, is_replay=True)
예제 #4
0
파일: Pytatra.py 프로젝트: Elegye/Pytatra
def partieNormale(event, fenetre=None):
    if fenetre != None:
        Fenetre.quitte(fenetre)
    jeu = Jeu.cree()
    Jeu.joue(jeu)
예제 #5
0
def newGame():
    jeu = Jeu.cree()
    Jeu.joue(jeu)