Giter VIP home page Giter VIP logo

digital_stewardship_bowling's Introduction

The Bowling Game

This is an exercise in unit testing with RSpec. We are creating a library that knows how to score a game of bowling. We are to produce a class Game with two methods: #roll(number_of_pins) and #score.

The Rules

Courtesy of Uncle Bob Martin

Bowling scoring example

The game consists of 10 frames as shown above. In each frame the player has two opportunities to knock down 10 pins. The score for the frame is the total number of pins knocked down, plus bonuses for strikes and spares.

A spare is when the player knocks down all 10 pins in two tries. The bonus for that frame is the number of pins knocked down by the next roll. So in frame 3 above, the score is 10 (the total number knocked down) plus a bonus of 5 (the number of pins knocked down on the next roll.)

A strike is when the player knocks down all 10 pins on his first try. The bonus for that frame is the value of the next two balls rolled.

In the tenth frame a player who rolls a spare or strike is allowed to roll the extra balls to complete the frame. However no more than three balls can be rolled in tenth frame.

Contributing

  1. Clone the repository.
  2. Check out the "end-of-seminar" branch to make sure you're starting at the same point as everyone else.
  3. Create your own branch named after yourself.
  4. Develop your solution.
  5. Push your branch.
  6. Send a pull request to share your solution with everyone else.

digital_stewardship_bowling's People

Contributors

woods avatar

Watchers

 avatar Ryan Schenk avatar  avatar Richard Nash avatar  avatar James Cloos avatar Eric Durante avatar  avatar Luke Niedermyer avatar  avatar Chet Swalina avatar Joni Barnoff avatar Scott Stilson avatar Cam Beaury avatar Christina Platt avatar Tucker Watts avatar Christopher Weaver avatar Natalie Simonson avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.