Git Product home page Git Product logo

10-pin-bowling's Introduction

10-pin-bowling

This ruby file makes it easy to simulate the score for 10-pin bowling game.

The input is frames on the board and the output will be the respective score for the board.

My approach

I took an approach of considering everything as an event. The first event is a roll event and everything else are subsequent to it. And the points are counted much the same way a manual scorer would score the board with some subtle differences.

The game can be split into following events.

Event Name Description
Shot The exact time at which pins are counted.
Frame complete The frame is complete when the remaining pins are zero or when both shot are played.
Strike When 10 pins are shot in the first attempt.
Spare When all 10 pins are shot in the second attempt.
Awared bonuses Bonuses are awarded when a strike or spare event takes place.
Display Display to show the points are counted.
Game over The game is complete.

10-pin-bowling's People

Contributors

sdwarak avatar deepsourcebot avatar deepsource-autofix[bot] avatar

Watchers

James Cloos avatar  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.