8 Ball Pool in Python

If you guys have been checking your tweeter, I asked which Android Game should I code as this week’s challenge, and the votes decided “8 Ball Pool”! This version is single Player.

You Can Download the Original Android Game Here : Google Play Store : 8 Ball Pool

  • The Game

Eight-ball (often spelled 8-ball or eight ball, and sometimes called solids and stripes, spots and stripes in the UK or, more rarely, bigs and littles/smalls, highs and lows, halves and wholes) is a pool (pocket billiards) game popular in much of the world, and the subject of international professional and amateur competition. Played on a pool table with six pockets, the game is so universally known in some countries that beginners are often unaware of other pool games and believe the word “pool” itself refers to eight-ball. The game has numerous variations, mostly regional. Standard eight-ball is the second most competitive professional pool game, after nine-ball, and for the last several decades ahead of straight pool.

Eight-ball is played with cue sticks and 16 balls: a cue ball, and 15 object balls consisting of seven striped balls, seven solid-colored balls and the black 8 ball. After the balls are scattered with a break shot, the players are assigned either the group of solid balls or the stripes once a ball from a particular group is legally pocketed. The ultimate object of the game is to legally pocket the eight ball in a called pocket, which can only be done after all of the balls from a player’s assigned group have been cleared from the table.

(Source : Wikipedia : Eight-Ball)

  • The Code

Object Oriented Programming has been used for Balls, Cue Stick, and Pockets, along with some other functions to check Collision, reset etc.

Code on GitHub : 8 Ball Pool

Time Lapse Video : Time Lapse : 8 Ball Pool

This slideshow requires JavaScript.

 

 

You May Also Like :

14 thoughts on “8 Ball Pool in Python

  1. Pingback: Stacks in Python Using PyGame | Mandav's Blog

  2. Pingback: Programming Languages – 2017 | Mandav's Blog

  3. Pingback: #CodingOf218 | Mandav's Blog

  4. Pingback: Explorers – Using Genetic Algorithm | Mandav's Blog

  5. Pingback: Battles – Game inspired by Clash Of Clans | Mandav's Blog

  6. Pingback: A.I. learns to play Flappy-Bird | Mandav's Blog

  7. Pingback: A.I Learns to Drive | Mandav's Blog

  8. Pingback: Angry Birds in Python Using PyGame | Mandav's Blog

Leave a comment