Skip to content

An example of Test-Driven Development using Bowling as the domain.

License

Notifications You must be signed in to change notification settings

versionone/tdd-bowling-game

 
 

Repository files navigation

TDD Bowling Game

An example of doing Test-Driven Development using Bowling as the domain.

The game to be played

Below are some scenarios we can use to drive the development of the game.

  • when rolling all gutter balls, the score is 0.
  • when rolling all 2s, the score is 40.
  • when the first 2 rolls are 2 and the rest are 3, the score is 58.
  • when rolling alternating 2s and 5s, the score 70.
  • when the first frame is a spare and the remaining rolls are all 2, the score is 48.
  • when the first 2 frames are spare (as 2,8) and the rest score 2, the score is 56.
  • when 10 frames have been bowled, don't allow any more to be bowled.
  • when the first frame is a strike and the rest score 2, the score is 50.
  • when the first 2 frames are strikes and the rest score 2, the score is 68.
  • when rolling a perfect game, the score is 300.
  • when rolling alternate strikes and spares, the score is 200.

Thanks

A special thanks to Ron Jeffries for the original idea, and Cory Foy for pushing it further.

About

An example of Test-Driven Development using Bowling as the domain.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • XSLT 73.3%
  • C# 11.3%
  • CSS 7.8%
  • JavaScript 6.3%
  • Ruby 1.3%