ld31-space-diggers/src/game.coffee

18 lines
252 B
CoffeeScript
Raw Normal View History

2014-12-06 12:37:57 +01:00
app.game =
2014-12-06 08:37:36 +01:00
start: ->
2014-12-06 10:34:53 +01:00
for i in [0..20*15]
@map[i] = new Tile
2014-12-06 08:37:36 +01:00
2014-12-06 10:34:53 +01:00
render: ->
2014-12-06 12:37:57 +01:00
for tile, i in @map
tile.render(i-(Math.floor(i/20)*20), Math.floor(i/20))
2014-12-06 12:55:43 +01:00
@hud.render()
2014-12-06 09:24:36 +01:00
2014-12-06 08:37:36 +01:00
step: ->
2014-12-06 10:34:53 +01:00
map: []
2014-12-06 08:37:36 +01:00
resources:
2014-12-06 12:55:43 +01:00
ore:60
2014-12-06 08:37:36 +01:00
stone: 100