ondras / rot.js

ROguelike Toolkit in JavaScript. Cool dungeon-related stuff, interactive manual, documentation, tests!
https://ondras.github.io/rot.js/hp/
BSD 3-Clause "New" or "Revised" License
2.33k stars 254 forks source link

Digger sometimes generate room with one cell #137

Closed jcubic closed 6 years ago

jcubic commented 6 years ago

I have basic gold collecting game https://codepen.io/jcubic/pen/ejJvdW?editors=0010

and it sometimes generate map that look like this:

###
#@#
###

You can test this by calling Game._generateLevel('>'); Game.player._draw() few times from console.

jcubic commented 6 years ago

Sorry it seems that there is bug in my code user is out of the map.