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
ceddral
fahrradwurstmond
Commits
6de251f9
Commit
6de251f9
authored
Sep 16, 2021
by
ceddral
Browse files
game: refactor gameloop action trigger sequence
use breaks instead of weird empty if blocks
parent
838b8e93
Changes
1
Hide whitespace changes
Inline
Side-by-side
game.go
View file @
6de251f9
...
...
@@ -381,14 +381,11 @@ func (g *Game) Loop(p *GamePlayer) {
break
}
if
state
.
getAgent
()
==
p
{
if
state
.
agentAction
(
p
,
key
)
{
}
else
if
anyStateAnyRoleAction
(
state
,
p
,
key
)
{
}
if
state
.
agentAction
(
p
,
key
)
{
break
}
}
else
{
if
state
.
patientAction
(
p
,
key
)
{
}
else
if
anyStateAnyRoleAction
(
state
,
p
,
key
)
{
}
if
state
.
patientAction
(
p
,
key
)
{
break
}
}
if
anyStateAnyRoleAction
(
state
,
p
,
key
)
{
break
}
}
p
.
menu
.
Redraw
(
state
)
g
.
board
.
Redraw
(
p
,
state
)
...
...
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