Commit f4699909 authored by Evan Hahn's avatar Evan Hahn

Some more byte reduction, mostly by eliminating colors

parent b2958b35
......@@ -30,11 +30,11 @@ r = Math.min(a.width, a.height) / 30
// Stats
y = [
['gold', '¢', 0, 1, 0],
['aqua', '⇒', r / 2, r / 5, 0],
['tomato', '+', 1, r / 100, 0],
['chartreuse', '↺', 5, 0.1, 0],
['white', '⧖', 60, 5, 60]
['#fd0', '¢', 0, 1, 0],
['#8fd', '⇒', r / 2, r / 5, 0],
['#f64', '+', 1, r / 100, 0],
['#8f0', '↺', 5, 0.1, 0],
['#ccc', '⧖', 60, 5, 60]
]
// The stats element
......@@ -102,12 +102,12 @@ p = () => {
// Item
u = (type) => {
let itemX = Math.random() * a.width
let itemY = Math.random() * a.height
u = (type, itemX, itemY, me) => {
itemX = Math.random() * a.width
itemY = Math.random() * a.height
let me = () => {
let icon
return (me = () => {
let icon // TODO
[c.fillStyle, icon] = y[type]
c.beginPath()
......@@ -122,9 +122,7 @@ u = (type) => {
y[type][4] += type === 4 ? y[type][3] : 1
e.splice(e.indexOf(me), 1)
}
}
return me
})
}
// Define the list of entities
......
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