Skip to content

Commit

Permalink
Migration vers python 3.6 / Fixation du bug sur le Global statement
Browse files Browse the repository at this point in the history
  • Loading branch information
gabeta committed Nov 17, 2017
1 parent c9756c9 commit d3ccc12
Show file tree
Hide file tree
Showing 11 changed files with 193 additions and 193 deletions.
6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/point_point.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

361 changes: 176 additions & 185 deletions .idea/workspace.xml

Large diffs are not rendered by default.

Binary file added Environnement/__pycache__/pivot.cpython-36.pyc
Binary file not shown.
Binary file added Environnement/__pycache__/player.cpython-36.pyc
Binary file not shown.
Binary file added Environnement/__pycache__/terrain.cpython-36.pyc
Binary file not shown.
Binary file added IA/__pycache__/IrisIA.cpython-36.pyc
Binary file not shown.
Binary file added IA/__pycache__/irisCpIA.cpython-36.pyc
Binary file not shown.
6 changes: 3 additions & 3 deletions point.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#Crétation de la plateform de jeu
def create_plateform():

global begin

if(begin is False):
d = 0
Expand All @@ -46,7 +47,6 @@ def create_plateform():
terrain.horizontalLine()
terrain.verticalLine()

global begin
begin = True

#Marquer un point en faisant un carré
Expand Down Expand Up @@ -111,6 +111,8 @@ def makeCarre(x,y):
#Création du point
def point(event):

global current_p

if(begin):

if(terrain.overFlow(event.y,event.x) & terrain.checkRayon(event.y,event.x)):
Expand All @@ -134,11 +136,9 @@ def point(event):
makeCarre(event.x,event.y)

if(current_p == P1):
global current_p
current_p = P2
next_color = "rouge"
else:
global current_p
current_p = P1
next_color = "bleu"

Expand Down
9 changes: 6 additions & 3 deletions vsCpIris.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
#Crétation de la plateform de jeu
def create_plateform():

global begin

if(begin is False):
d = 0
info.configure(text = "Joueur Bleu = " + str(P1.getScore()))
Expand All @@ -50,7 +52,6 @@ def create_plateform():
terrain.horizontalLine()
terrain.verticalLine()

global begin
begin = True

#Marquer un point en faisant un carré
Expand Down Expand Up @@ -115,6 +116,8 @@ def makeCarre(x,y):
#Au tour de l'utilisateur de jouer
def point(event):

global current_p

if (begin) & (current_p == P1):

if(terrain.overFlow(event.y,event.x) & terrain.checkRayon(event.y,event.x)):
Expand All @@ -139,14 +142,15 @@ def point(event):
P2.setOtherDico(value,current_p.getColor())
P2.updateRandomList(value)

global current_p
current_p = P2

IAtour()

#Au tour de l'IA de jouer.
def IAtour():

global current_p

if(len(P2.getOwnDico()) == 0):

#Début du jeu faire un point aléatoire
Expand Down Expand Up @@ -210,7 +214,6 @@ def IAtour():
makeCarre(x,y)

#Donner la main à l'utilisateur
global current_p
current_p = P1

#Corps principale du programme
Expand Down

0 comments on commit d3ccc12

Please sign in to comment.