Skip to content

Instantly share code, notes, and snippets.

@drm317
Last active April 15, 2018 18:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drm317/19d6858dada4caa92342 to your computer and use it in GitHub Desktop.
Save drm317/19d6858dada4caa92342 to your computer and use it in GitHub Desktop.

TDD and Refactoring Kata

Classic Soccer Management Game

Estimated Duration: 1 day

Author: Daniel Marlow

Language / Stacks - Any

Summary

Develop a classic soccer management game using test-driven development (TDD).

Continuously refactor your code applying the SOLID, DRY, Tell-don't-ask and KISS design principles.

The game should have the following features:

  1. Play as the manager of a team in a 10-team league.

  2. Teams play a game once per week.

  3. Teams play each other twice over the course of a season.

  4. Each team has 11 players. Individual players have a skill rating (which is randomly assigned).

  5. A team's chance of scoring a goal is proportional to the total of their player skill points.

  6. The winning team scores more goals than their opposing team in a game.

  7. Three points are awarded to a team for a win. One point is awarded for a draw to each team. No points are awarded to losing teams.

  8. The league table is recalculated each week.

If time permits, here are some suggestions for more advanced features:

  1. More than one league with promotion and relegation for teams at the end of each season.

  2. Players have a 0-5% chance of receiving an injury in a game which affects their skill rating by 10%-80%.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment