Documenting and Testing Your Game
You have a working game at this point, but you also need to consider the poor developer who’s going to pick this up six months from now (particularly if it’s you). You worked hard to pick a good data structure and implement your functions, but you need to communicate those data structures for future use.
If you write some specs, you can describe the key data structures, annotate the functions, and even generate some automated tests that check whether everything works (especially when you start making changes at some future date).
When you started working on the implementation earlier, we quickly honed in on the progress data structure and the trio of internal functions (new-progress, update-progress, and complete? ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access