class Tile extends BaseEntity
  constructor: (options) ->
    super options

    resTypes = (k for own k of app.game.resources)
    
    @layers = []
    for restype, i in resTypes
      @layers.push new Tilelayer(type: restype, depth: i)
    
    @currentLayer = 0 #getRandomInt 0, resTypes.length-1
    
  tick: (delta) ->
    # TODO: digging deeper?

  render: (x, y)->
    tile = @layers[@currentLayer]
    tile.render(app.layer, x, y)
