A simple text-based racquetball game simulator written in Racket.
This project simulates a racquetball game between two players. The game follows basic racquetball rules:
- First player to reach 15 points wins
- Must win by at least 2 points
- Only the serving player can score points
- When a non-serving player wins a rally, they become the server
- Racket programming language (version 8.0 or higher recommended)
- Install Racket from https://racket-lang.org/
- Clone this repository:
git clone https://github.com/ewdlop/RacquetballGame.git cd RacquetballGame
Run the game using the Racket interpreter:
racket racquetball.rktThe game will automatically simulate rallies and display the results until one player wins.
- Automatic rally simulation with realistic probabilities
- Score tracking for both players
- Server tracking (indicated by [SERVING] marker)
- Win condition checking (15 points with 2-point margin)
- Rally-by-rally commentary
=====================================
RACQUETBALL GAME SIMULATOR
=====================================
Game starting... First to 15 points wins!
(Must win by at least 2 points)
-------------------------------------
Player 1: 0 points [SERVING]
Player 2: 0 points
-------------------------------------
Rally #1: Player 1 wins the rally!
-------------------------------------
Player 1: 1 points [SERVING]
Player 2: 0 points
-------------------------------------
...
This project is open source and available for educational purposes.