Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Jean Descamps
projet_IA04
Commits
0eb35767
Commit
0eb35767
authored
Jan 03, 2022
by
Louis Soto
Browse files
Update game.go (le jeu fini si le joueur gagne)
parent
3023f6a5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Boid/game/game.go
View file @
0eb35767
...
...
@@ -211,7 +211,16 @@ func (g *Game) Draw(screen *ebiten.Image) {
g
.
graphics
.
DrawBoids
(
screen
,
g
.
Flock
.
Boids
)
g
.
graphics
.
DrawPredators
(
screen
,
g
.
Flock
.
Predators
)
g
.
graphics
.
DrawWalls
(
screen
,
g
.
Flock
.
Walls
)
g
.
graphics
.
DrawInterface
(
screen
,
g
.
currentScore
,
g
.
IsGameOver
())
if
g
.
currentLevel
==
len
(
g
.
levels
)
-
1
&&
g
.
nextLevel
()
{
s
:=
0
for
_
,
val
:=
range
g
.
scores
{
s
+=
val
.
Value
}
g
.
currentScore
.
Value
=
s
g
.
graphics
.
DrawInterface
(
screen
,
g
.
currentScore
,
false
,
true
)
}
else
{
g
.
graphics
.
DrawInterface
(
screen
,
g
.
currentScore
,
g
.
IsGameOver
(),
false
)
}
}
//Layout fonction qui retourne la taille de la fenêtre
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment