core icon indicating copy to clipboard operation
core copied to clipboard

Area#removeRoomFromMap

Open ratacat opened this issue 6 years ago • 3 comments

Currently if you Area#addRoom() it adds the room to the floor map, but you if call Area#removeRoom, it removes it from the area, but leaves it in the floor map. Resulting in bad things, like crashes when a player tries to view adjacent rooms that lookup their implied exits through the floor map. Any suggestions on how this could better?

ratacat avatar Jul 23 '19 22:07 ratacat

Code looks solid, I'd really like a unit test for it though

shawncplus avatar Jul 23 '19 22:07 shawncplus

I have absolutely no idea how to do that, but I'm willing to try =) Any examples I can look at?

ratacat avatar Jul 24 '19 02:07 ratacat

https://github.com/RanvierMUD/core/blob/master/test/unit/Attribute.js is a super simple example. I'm been really bad about adding tests so there aren't many but that's a good base to work off of, it's using mocha

shawncplus avatar Jul 24 '19 04:07 shawncplus