add src/ directory and move main.ts there
move Actor out to src/actor.ts
move Tile and related into src/tile.ts
move Enemy and related into src/enemy.ts
separate Map and related code into src/map.ts
separate Spell and related into src/spell.ts
separate Player into src/player.ts
separate GameState into src/gamestate.ts
separate UpdateState into src/updatestate.ts
separate PlayState into src/playstate.ts
some comments and cleanup