22 lines
311 B
CoffeeScript
22 lines
311 B
CoffeeScript
app.game =
|
|
start: ->
|
|
for i in [0..20*15-1]
|
|
@map[i] = new Tile
|
|
|
|
render: ->
|
|
for tile, i in @map
|
|
y = Math.floor(i/20)
|
|
x = i-(y*20)
|
|
tile.render(x, y)
|
|
@hud.render()
|
|
|
|
step: ->
|
|
|
|
map: []
|
|
|
|
resources:
|
|
stardust: 10
|
|
bedrock: 1
|
|
lubinit: 0
|
|
oxodum: 0
|
|
notch: 0
|