Random Dungeon Generation on Canvas with Javascript