Bowling app is a game that reads a file with the player's pinfalls and calculates the total score for it. When the player hits a strike it sums the next two points to the total. When the player hits a spare it sums the next point to the total. The player is allowed to play 10 frames with 2 chances per frame. Built with Ruby and tested with RSpec. The output was formatted using terminal-table and rainbow gem packages.
The game has a basic interface that runs in the terminal.
The goals of this project are:
- Practice with OOP (Object Oriented Programming) using Ruby.
- Learn how to create and structure a Ruby project.
- Learn to manage the files with correct usage to make code maintainable.
- Practice Git Flow and Github Flow creating branches for different features and for version control.
To get a local copy up and running follow these simple example steps.
Computer running Mac OS, Windows, or Linux Ubuntu.
Have Ruby installed. You can see this link for more detailed instructions Install Ruby.
You should have Git installed. Install Git
After installing Ruby and Git, you can download the repo or clone it (paste on the terminal)
git clone git@github.com:marcelomaidden/jobsity-bowling-game.git
then change to the project directory
cd jobsity-bowling-game
Finally install the necessary packages by typing the command below:
bundle install
You will need to execute the main file located inside the root folder inside the project.
You must pass as a parameter a file with the txt
extension.
An example of file is available inside the assets folder with a basic two player game.
A valid game file must have one throw per line with the player's name and the pins knocked down tab separated
ruby main.rb assets/game.txt
In order to test our project type the command below:
rspec --format documentation
👤Marcelo Araújo
- GitHub: @marcelomaidden
- Twitter: @marcelomaidden
- LinkedIn: Marcelo Fernandes de Araújo
- Jobsity
- Ruby
- RSpec
- Terminal-table
- Rainbow
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
Give a ⭐️ if you like this project!