Designing the Gameplay Interface for Wordz
Discover how to apply test-driven development to design the gameplay interface for Wordz. Learn to implement an assess method that handles guesses, scores, and game continuation logic, ensuring robust and testable game interaction.
We'll cover the following...
In this lesson, we’ll build the logic to play the game. The gameplay consists of making a number of guesses at the selected word, reviewing the score for that guess, and having another guess. The game ends either when the word has been guessed correctly or when the maximum number of allowed attempts has been made.
We’ll begin by assuming that we’re at the start of a typical game, about to make our first guess. We’ll also assume that this guess is not completely correct. This allows us to defer decisions about end-of-the-game behavior, which is a good thing because we have enough to decide already.
Designing the scoring interface
The first design decision we must take is what we need to return following a guess at the word. We need to return the following information to the user: ...