Skip to content

mEp3ii2/KellyPoolApp

Repository files navigation

Kelly Pool App

An Android app for tracking games of Kelly Pool — a billiards elimination variant where players are secretly assigned numbered balls (1–15) and are knocked out when their balls are potted. The last player standing wins.


Features

  • Flexible setup — supports 2 to 9 players with a configurable number of balls per player
  • Randomised ball assignment — balls are shuffled and distributed fairly; remaining balls become "Free Balls" that eliminate no one
  • Private reveal — ball assignments are shown one player at a time so others can't peek
  • Live game tracking — interactive ball grid lets you tap a ball to record it being potted, with confirmation dialogs to prevent mistakes
  • Automatic elimination — players are removed from the game as their balls are potted; the winner is announced when only one player remains
  • Rotation-safe — all game state is saved and restored across device rotations and process death

Screens

Screen Purpose
Home Launch screen
Setup Choose number of players and balls per player
Player Entry Enter player names (auto-filled as "Player N" if left blank)
Ball Assignment Reveals each player's assigned balls privately, one player at a time
Game Live ball grid with player scores and elimination tracking

Tech Stack

  • Language: Java 8
  • Platform: Android (minSdk 24 / Android 7.0, targetSdk 34 / Android 14)
  • UI: AndroidX AppCompat, Material Design 3, ConstraintLayout
  • Build: Android Gradle Plugin 8.6, Gradle Version Catalog

Project Structure

app/src/main/java/com/example/kellypool/
├── MainActivity.java              # Launch screen
├── SetUpGameActivity.java         # Game configuration
├── PlayerEntryActivity.java       # Player name input
├── ShowAssignedBallsActivity.java # Ball assignment reveal
├── GameActivity.java              # Live game play
└── GameLogic.java                 # Pure Java game logic (no Android dependencies)

GameLogic.java is intentionally decoupled from Android so it can be tested on the JVM without an emulator.


Running the App

  1. Open the project in Android Studio
  2. Sync Gradle dependencies
  3. Run on a device or emulator with Android 7.0+

Running Tests

# Unit tests (JVM, no emulator required)
./gradlew test

# Instrumented tests (requires connected device or emulator)
./gradlew connectedAndroidTest

The unit test suite (GameLogicTest.java) covers ball shuffling, assignment distribution, player ball counts, and winner detection.


How to Play Kelly Pool

  1. Each player is secretly assigned one or more numbered balls from the set (1–15)
  2. Players take turns shooting as in regular pool
  3. When a ball is potted, the player assigned to that ball loses it
  4. A player is eliminated when all their balls have been potted
  5. The last surviving player wins

Any unassigned balls are "Free Balls" — potting them has no effect on any player.

About

App for creating and running kelly pool games

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages