8-Ball Pool
A simple implementation of a virtual game of pool
Author: Ashley Yeah - ayeah2@illinois.edu
Dependencies
Windows or Mac
- CMake
- Cinder (v0.9.2)
- Box2D (cinder block)
-
*For windows, download Visual Studio 2015 in order to use cinder
Quick Start
1) Download Cinder v0.9.2 2) Open the ~/Cinder folder in an IDE and run it in order to build Cinder 3) For windows, download Visual Studio 2015 and for the project, set the toolchain to be Visual Studio 2015 4) Download repository into a new folder within the ~/Cinder folder 5) Box2D cinder block comes with cinder
Features
Upon downloading and building the game, simply run the game. Then press the start button.
If you don’t really know how to play pool, instructions are located on the help screen which are pretty much the same things as described below.
Then simply using your mouse, left click to place the ball and continue pressing down on the cursor to drag the cue stick around the ball. Let go when ready to shoot. Before the first ball is made, there is no designated color that you must pocket, but afterwards, you must pocket your own color. Be aware not to commit a foul.
Fouls consist of:
- Pocketing the white cue ball
- Not making contact with the ball of your own color first
-
Not making contact with any balls
*You do not have to make contact with a ball of your color before the first ball is pocketed and you must make contact with the 8-ball if you have already made all of your other balls
The goal is to pocket all of the balls of your own color. Once you do, then you must pocket the 8-ball to win the game. If you pocket the 8-ball before before you pocket all of your other balls, you will lose. If you pocket one of your balls, you will be given another turn to go until you miss again.
Tests
Testing was implemented using catch2. You can find them here.