Commit 6de251f9 authored by ceddral's avatar ceddral
Browse files

game: refactor gameloop action trigger sequence

use breaks instead of weird empty if blocks
parent 838b8e93
......@@ -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)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment