Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Coding Week Gol Dolleans Boujerfaoui
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Boujerfaoui Yassine
Coding Week Gol Dolleans Boujerfaoui
Commits
2440abd0
Commit
2440abd0
authored
6 years ago
by
Boujerfaoui Yassine
Browse files
Options
Downloads
Patches
Plain Diff
Changements inconnus
parent
998c0ee1
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
game_of_life/AffichageTkinter.py
+4
-4
4 additions, 4 deletions
game_of_life/AffichageTkinter.py
with
4 additions
and
4 deletions
game_of_life/AffichageTkinter.py
+
4
−
4
View file @
2440abd0
...
...
@@ -29,9 +29,9 @@ def create_a_grid():
zones
.
append
([])
for
y
in
range
(
len
(
universe
[
0
])):
if
universe
[
x
][
y
]
==
1
:
zones
[
x
].
append
(
canvas
.
create_rectangle
(
x
*
width
/
100
,(
x
+
1
)
*
width
/
100
,
y
*
width
/
100
,(
y
+
1
)
*
width
/
100
),
fill
=
"
black
"
)
zones
[
x
].
append
(
canvas
.
create_rectangle
(
x
*
width
,(
x
+
1
)
*
width
,
y
*
width
,(
y
+
1
)
*
width
),
fill
=
"
black
"
)
else
:
zones
[
x
].
append
(
canvas
.
create_rectangle
(
x
*
width
/
100
,(
x
+
1
)
*
width
/
100
,
y
*
width
/
100
,(
y
+
1
)
*
width
/
100
,
fill
=
"
white
"
))
zones
[
x
].
append
(
canvas
.
create_rectangle
(
x
*
width
,(
x
+
1
)
*
width
,
y
*
width
,(
y
+
1
)
*
width
,
fill
=
"
white
"
))
def
update_grid
():
"""
met la grille a jours
"""
...
...
@@ -57,8 +57,8 @@ def update_grid():
def
create_cell_on_click
(
event
):
"""
créer une cellule vivante la ou l
'
utilisateur clique
"""
global
universe
x
=
event
.
x
//
(
game_of_life
.
winfo_width
()
/
100
)
y
=
event
.
y
//
(
game_of_life
.
winfo_height
()
/
100
)
x
=
event
.
x
//
(
game_of_life
.
winfo_width
())
y
=
event
.
y
//
(
game_of_life
.
winfo_height
())
universe
[
x
][
y
]
=
1
def
add_seed_tk
():
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment