Commit 4546e1a2 authored by Evan Hahn's avatar Evan Hahn

Game is "complete" but over-budget by 212 bytes

parent ab4e8b39
......@@ -30,11 +30,11 @@ r = Math.min(a.width, a.height) / 30
// Stats
y = [
['yellow', '¢', 0, 1],
['aqua', '⇒', r / 2, r / 2],
['gold', '¢', 0, 1],
['aqua', '⇒', r / 2, r / 5],
['purple', '>', r / 2, r / 5],
['green', '↺', 5, 0.1],
['white', '⧖', 60, 3]
['chartreuse', '↺', 5, 0.1],
['white', '⧖', 10, 3]
]
// The player
......@@ -88,7 +88,7 @@ p = (() => {
n = n % a.height
// this could probably be smaller ^
c.fillStyle = 'pink'
c.fillStyle = 'deeppink'
c.translate(m, n)
c.rotate(playerDirection)
c.beginPath()
......@@ -158,7 +158,11 @@ requestAnimationFrame(q = (currentTime) => {
e.map(entity => entity())
requestAnimationFrame(q)
if (y[4][2] <= 0) {
z.innerHTML = `<font color="gold">Game over! Score: ¢${y[0][2]}</font>`
} else {
requestAnimationFrame(q)
}
})
// Less and less time
......
Markdown is supported
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