Requirements
Each entry below is taken from a file found from the features/
folder,
rendered into a a sphinxcontrib-needs
requirement, and lists
out the file’s content, rendered as Gherkin properly. Adding new files in features/
will make this page grow on next render.
List of requirements
command_line_entrypoint.feature
Feature: Pywordle shell command
As a Wordle game
I need a shell command to launch the game
In order to give convenient entrypoint for players
|
track_guesses.feature
Feature: Playing a round
As a Wordle game
I need to track how many guesses were already given, stating wins/losses
In order to play the game
Scenario: First guess is allowed
Given a wordle answer
And I didn't guess before
When I guess the word
Then my guess is scored
Scenario: Sixth guess still allowed
Given a wordle answer
And I guessed 5 times
When I guess the word
Then my guess is scored
Scenario: Six failed guess is game over
Given a wordle answer
And I guessed 6 times already
When I guess the word
And my guess isn't the answer
Then my guess is scored
But game shows "Game Over"
And game shows the real answer
Scenario: Winning guess
Given a wordle answer
And I guessed 3 times
When I guess the word
And my guess is the answer
Then my guess is scored
And score is perfect
And game shows "Game Won"
Scenario: Invalid guess isn't counted
Given a wordle answer
And I guessed 3 times
When I guess the word
But my guess isn't a dictionary word
Then my guess is rejected as invalid word
And my guess is not scored
|
checking_guess_valid_word.feature
Feature: Checking a guess is a valid word
As a Wordle game
I need to confirm each guessed word is valid
So that I only accept real words, no kwyjibo
Scenario: Reject long words
When guessing "affable"
Then the guess is rejected
And reason for rejection is "Guess too long"
Scenario: Reject short words
When guessing "baby"
Then the guess is rejected
And reason for rejection is "Guess too short"
Scenario: Reject fake words via dictionary
When guessing "vbpdj"
Then the guess is rejected
And reason for rejection is "Not a word from the dictionary"
Scenario: Accept five letter dictionary words
When guessing "crane"
Then the guess is accepted
|
pick_answer_word.feature
Feature: Pick an answer word
As a Wordle game
I need to pick a random 5 letter word
In order to let players guess it
|
scoring_guess.feature
Feature: Scoring guesses
As a Wordle game
I need to tell the player how good their guess is
In order to help them find the proper answer
Background:
Given a guess that's a valid dictionary word
Scenario: Perfect guess gives perfect score
Given a wordle answer "crane"
When scoring the guess "crane"
Then score should be "🟩🟩🟩🟩🟩"
Scenario: No character in common
Given a wordle answer "brave"
When scoring the guess "skill"
Then score should be "⬜⬜⬜⬜⬜"
Scenario: Character in wrong place
Given a wordle answer "rebus"
When scoring the guess "skull"
Then score should be "🟨⬜🟨⬜⬜"
Scenario Outline: Scoring guesses
Given a wordle <answer>
When scoring <guess>
Then score should be <score>
# Emoji (Unicode) character rendering is hard:
# Please forgive the table column alignment issues!
Examples: A few guesses and their score
| answer | guess | score |
| adage | adobe | 🟩🟩⬜⬜🟩 |
| serif | quiet | ⬜⬜🟨🟨⬜ |
| raise | radix | 🟩🟩⬜🟨⬜ |
Examples: Multiple occurences of same character
| answer | guess | score |
| abbey | kebab | ⬜🟨🟩🟨🟨 |
| abbey | babes | 🟨🟨🟩🟩⬜ |
| abbey | abyss | 🟩🟩🟨⬜⬜ |
| abbey | algae | 🟩⬜⬜⬜🟨 |
| abbey | keeps | ⬜🟨⬜⬜⬜ |
| abbey | abate | 🟩🟩⬜⬜🟨 |
Examples: Reported bug: multiple occurence of same character in guess
| answer | guess | score |
| train | xenon | ⬜⬜⬜⬜🟩 |
|
Requirements summary
ID |
Title |
Status |
Type |
Outgoing |
Tags |
---|---|---|---|---|---|
checking_guess_valid_word.feature |
req |
||||
command_line_entrypoint.feature |
req |
||||
pick_answer_word.feature |
req |
||||
scoring_guess.feature |
req |
||||
track_guesses.feature |
req |