Skip to content

Commit

Permalink
Update lava-flood.html
Browse files Browse the repository at this point in the history
  • Loading branch information
mcnole25 authored Feb 4, 2024
1 parent d447488 commit efcbb5f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lava-flood.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h1>Lava Flood</h1>
<script>
var ctx = myCanvas.getContext("2d");
var lvlx = Array.from({length: 20}, () => Math.floor(Math.random() * 640));
var lvly = Array.from({length: 20}, () => Math.floor(Math.random() * 458));
var lvly = Array.from({length: 20}, () => Math.floor(Math.random() * 440));
x = 320;
y = 460;
xv = 0;
Expand Down Expand Up @@ -89,7 +89,7 @@ <h1>Lava Flood</h1>
document.getElementById("gameLog").innerHTML = "You died! Press Space for a new level.";
}
}, 25)
function KeyUpHandler(event) {
function KeyUpHandler(event) {
if (event.keyCode == 37 || event.keyCode == 39) {xv = 0;}
}
function KeyDownHandler(event) {
Expand All @@ -100,8 +100,8 @@ <h1>Lava Flood</h1>
} else {
// Space to Reset
if (event.keyCode == 32) {
lvlx = Array.from({length: 20}, () => Math.floor(Math.random() * 640));
lvly = Array.from({length: 20}, () => Math.floor(Math.random() * 458));
var lvlx = Array.from({length: 20}, () => Math.floor(Math.random() * 640));
var lvly = Array.from({length: 20}, () => Math.floor(Math.random() * 440));
x = 320;
y = 460;
xv = 0;
Expand Down

0 comments on commit efcbb5f

Please sign in to comment.