Appendix. The Crypt: a running example

In part 1 of this book, while learning core JavaScript concepts, you write code to represent the players and the places in the game and to let players move from place to place and pick up items. The following figure shows the components you create; a similar figure in each chapter highlights the ideas being discussed in the context of the entire game.

Part 2 of the book adds challenges for players: blocking exits until players solve puzzles. The focus is on organizing your code, hiding how it works, checking user input, and building modules that you can reuse and swap to make the project more flexible. ...

Get Get Programming with JavaScript now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.