Chapter 8. (Mutant Structs)

#|

At this point, you’ve seen structures and lists. You’ve learned how to write list-processing functions, and you know you can do so concisely. In this chapter, we’ll put that knowledge to good use when we write the Orc Battle game. In the process, we’ll show you a convenient way of dealing with changes to structures.

|#

8.1 Chad’s First Battle

Chad has managed to find himself stuck in an underground coliseum. All around him are monsters, ready for battle. Grabbing a sword, a shield, and some armor, he braces himself for the onslaught. For Chad to have any hope of escaping from his impending doom, you must help him defend himself.

Naturally, it’s all just a game, and to us, it’s all just software. But the Orc Battle is ...

The best content for your career. Discover unlimited learning
on demand for around $1/day.