Instructions
The zombie apocalypse is here!!
- Complete each iteration before reading the next one.
- It's recommended you perform this kata with a pairing partner and while writing tests.
Iterations
Iteration #1: Basics
- A Game includes one or more Survivors and Zombies.
- A Game begins with no Survivors and Zombies
- A Survivor can be added to the game (but not after it started)
- A Zombie can be added to the game (but not after it started)
- A Game ends immediately if there are no Survivors or no Zombies.
- Each Survivor and Zombie has a Name. The Name is unique for the game
- Each Survivor and Zombie begins with 0 Wounds
- If a Zombie attacks a Survivor it makes a Wound.
- A Survivor who receives 2 Wounds dies immediately and is converted into a Zombie.
- A Zombie who receives 5 Wounds dies immediately.
Iteration #2: Equipment
- Each Survivor can carry up to 5 pieces of Equipment.
- Up to 2 pieces of carried Equipment are "In Hand"; the rest are "In Reserve".
- Examples of Equipment: "Baseball bat", "Frying pan", "Katana", "Pistol", "Bottled Water", "Molotov".
- A Survivor can attack a Zombie with an Equipment in hand.
- Each Equipment makes different amount of Wounds.
- Each Wound a Survivor receives reduces the number of pieces of Equipment they can carry by 1.
- If the Survivor has more Equipment than their new capacity, choose a piece to discard automatically.
- A Survivor can discard Equipment to pick up another one.
Iteration #3: Experience
- As Survivors overcome zombies, they gain experience.
- Each Survivor begins with 0 Experience.
- Each Survivor has a current Level.
- Each Survivor begins at Level Blue.
- Each time the Survivor kills a zombie, they gain 1 Experience.
- Levels consist of: Blue, Yellow, Orange, Red.
- When a Survivor exceeds 6 Experience, they advance ("level up") to level Yellow.
- When a Survivor exceeds 18 Experience, they advance to level Orange.
- When a Survivor exceeds 42 Experience, they advance to level Red.
- A Game has a Level (Level here is identical to Level for a Survivor).
- A Game begins at Level Blue.
- A Game Level is always equal to the level of the highest living Survivor's Level.
Iteration #4: Output
- The Game includes a running history of events that have taken place as it has been played. Managing game history is a Game responsibility.
- A Game's History begins by recording the time the Game began.
- A Game's History notes that a Survivor acquires a piece of Equipment.
- A Game's History notes that a Survivor is wounded.
- A Game's History notes that a Survivor dies.
- A Game's History notes that a Survivor levels up.
- A Game's History notes that the Game Level changes.
- A Game's History notes that the Game has ended when the last Survivor dies.
Credits