Starting a new game
In this section, we will make a start by coding our game. Like every project, starting is usually quite difficult, with the first decision being simply where to begin. A reasonable approach is to find a user story that will begin to flesh out the structure of the code. Once we have a reasonable structure for an application, it becomes much easier to figure out where new code should be added.
Given this, we can make a good start by considering what needs to happen when we start a new game. This must set things up ready to play and so will force some critical decisions to be made.
The first user story to work on is starting a new game:
- As a player I want to start a new game so that I have a new word to guess
When we start a new game, we must do the following:
- Select a word at random from the available words to guess
- Store the selected word so that scores for guesses can be calculated
- Record that the player may now make an initial...