- By Emmanuel Valverde
- ·
- Posted Mar 5, 2024 12:05:53 PM
Morning Routine
As a forgetful person, I need to remember my morning routine. Because of this, I have created a program that, depending on the time of day, will tell..
We want to create a small game. The game consists of a player trying to guess a random number. The player will have three attempts to guess the number. If the number is correctly guessed, then the player wins, if not, the player loses.
If the player fails to guess the number, the game must notify the user if the number it's higher or lower.
This kata is meant to work on test doubles. But it can also be solved without them. Also, it's an excellent kata to work on Primitive obsession and baby steps.
As player
I play the number 5
the player wins
Initial state | Player wins on the first move |
As player
I play a 10
I play a 3
I play a 5
the player wins
Initial state | Player first move | Player second move | Player third move |
As player
I play a 10
I play a 3
I play a 5
the player loses
Initial state | Player first move | Player second move | Player third move |
public class GuessingNumberGame {
GuessingNumberGame(RandomNumberGenerator generator){}
public String guessNumber(int guessedNumber) {}
}
As a forgetful person, I need to remember my morning routine. Because of this, I have created a program that, depending on the time of day, will tell..
Inspired by the creative works of Gawain Hewitt: https://gawainhewitt.co.uk/
What do we want to build? We are building a shopping cart for an online grocery shop. The idea of this kata is to build the product in an iterative..
Join our newsletter for expert tips and inspirational case studies
Join our newsletter for expert tips and inspirational case studies