Skip to content

Commit

Permalink
Fix double display for game-over/pause on reload
Browse files Browse the repository at this point in the history
  • Loading branch information
Milan Oberkirch committed Jun 9, 2024
1 parent c321d98 commit 154c6e9
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions templates/score.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,29 @@
{% endif %}
{% endif %}
</h1>
{% if not game.is_running %}
{% if game.is_lost %}
<div class="fade-in game-paused">
<h1>Game paused</h1>
<h1>Game over</h1>
<div class="howto">
<h3>How to play:</h3>
<p>
<ul>
<li>p: (Un)pause game</li>
<li>{{ game.left.up_key }}: Move left bat up</li>
<li>{{ game.left.down_key }}: Move left bat down</li>
<li>{{ game.right.up_key }}: Move right bat up</li>
<li>{{ game.right.down_key }}: Move right bat down</li>
<li>p: Start a new game</li>
</ul>
</p>
</div>
</div>
{% endif %}
{% if game.is_lost %}
{% elif not game.is_running %}
<div class="fade-in game-paused">
<h1>Game over</h1>
<h1>Game paused</h1>
<div class="howto">
<h3>How to play:</h3>
<p>
<ul>
<li>p: Start a new game</li>
<li>p: (Un)pause game</li>
<li>{{ game.left.up_key }}: Move left bat up</li>
<li>{{ game.left.down_key }}: Move left bat down</li>
<li>{{ game.right.up_key }}: Move right bat up</li>
<li>{{ game.right.down_key }}: Move right bat down</li>
</ul>
</p>
</div>
Expand Down

0 comments on commit 154c6e9

Please sign in to comment.