Skip to content

Commit

Permalink
Fix: Updated python game logic (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
hoangsonww committed May 14, 2024
1 parent e768473 commit 8c574bb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<header>
<h1 style="margin-top: 450px">The Maze Game</h1>
<p>A simple yet fun game to play when you're bored.</p>
<strong><p id="lifetimeScore">Lifetime Score: 0</p></strong>
<p id="lifetimeScore" style="font-weight: bold">Lifetime Score: 0</p>
</header>

<div class="game-container">
Expand Down
4 changes: 1 addition & 3 deletions src/js/game.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ function carvePassagesFrom(x, y) {

directions.sort(() => Math.random() - 0.5);

for (let i = 0; i < directions.length; i++) {
const dx = directions[i][0];
const dy = directions[i][1];
for (const [dx, dy] of directions) {
const nx = x + dx * 2;
const ny = y + dy * 2;

Expand Down

0 comments on commit 8c574bb

Please sign in to comment.