17 lines
252 B
CoffeeScript
17 lines
252 B
CoffeeScript
app.game =
|
|
start: ->
|
|
for i in [0..20*15]
|
|
@map[i] = new Tile
|
|
|
|
render: ->
|
|
for tile, i in @map
|
|
tile.render(i-(Math.floor(i/20)*20), Math.floor(i/20))
|
|
@hud.render()
|
|
|
|
step: ->
|
|
|
|
map: []
|
|
|
|
resources:
|
|
ore:60
|
|
stone: 100
|