munificent / hauberk

A web-based roguelike written in Dart.
http://munificent.github.io/hauberk/
Other
2k stars 200 forks source link

Did two TODOs in dungeon and gave some code their own functions. #1

Closed colms closed 10 years ago

colms commented 10 years ago

Slightly more efficient dungeon generation after doing two TODOs. I believe everything works as before. I checked if everything works with prints and by making all tiles visible in the map (but obviously didn't include those code changes). Not the greatest testing method but I didn't know how else to do it.

colms commented 10 years ago

I just noticed that I used British spelling in "colour".

munificent commented 10 years ago

Slightly more efficient dungeon generation after doing two TODOs.

Crap! I coincidentally just fixed these same ones yesterday. :(

Not the greatest testing method but I didn't know how else to do it.

Yeah, that's one of the things that's less than great about this codebase. No tests. :(

I would like to add tests for at least the low-level stuff (i.e. mainly the things that are broken out into piecemeal and malison now), but it's hard to unit test high-level stuff since "correct" is often a matter of feel.

colms commented 10 years ago

No problem. It was my fault for not finishing up sooner. I found something really interesting in the code and decided to spend a couple of days on it.