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

optionally make a connected cellular map #34

Closed uzudil closed 10 years ago

uzudil commented 10 years ago

Hello, please consider this patch to rot.js that optionally creates a connected cellular map. In such a map every non-wall location is accessible. To use it, do:

var map = new ROT.Map.Cellular(width, height, { connected: true });

and otherwise use as you would with a cellular map.

Thanks!

ondras commented 10 years ago

Very cool, thanks a lot!

It would be now very nice to update the interactive manual accordingly.