Coding Dojo

Edit on Github

About this Kata


In this Kata you will be implementing a rudimentary two-player trading card game. The rules are loosely based on Blizzard Hearthstone ( http://us.battle.net/hearthstone/en/ ) which itself is an already much simpler and straight-forward game compared to other TCGs like Magic: The Gathering ( http://www.wizards.com/magic/ ).

Difficulty: Medium/Hard

Good for teaching: Test Doubles, Mocking, TDD, Refactoring, Clean Code

Problem Description


1. Preparation

2. Gameplay

3. Special Rules

Clues


When approached iteratively with TDD you can take different starting points, like the player state or the game loop. It is your own choice whether you implement the game for human or computer players - or both. Game visualization can be anything between System.out and a GUI. You can also increase the difficulty by adding more rules, like Healing cards, Damage independent from Mana cost or introducing individual Deck building. You will find some examples of Advanced Variations from the Kata’s author at https://github.com/bkimminich/kata-tcg . Even without extra rules the toughest part of this Kata might be coming up with actually smart CPU player decision-making algorithms.

Example Solution