getRandomInt = (min, max) -> Math.floor(Math.random() * (max - min + 1)) + min; allResourceTypes = -> (k for own k of app.game.resources) posToTile = (x, y)-> pos = (Math.floor(y/8)*20) + Math.floor(x/8) app.game.map[pos]