https://github.com/brunortech/casino-craps-game
A Java-based implementation of the classic casino dice game Craps, developed as part of a school assessment. Features customizable dice, statistical tracking, and realistic gameplay rules for an engaging, interactive experience.
https://github.com/brunortech/casino-craps-game
beginner-java casino-game craps dice-game game-development interactive-game java java-project software-project text-based-games
Last synced: about 1 month ago
JSON representation
A Java-based implementation of the classic casino dice game Craps, developed as part of a school assessment. Features customizable dice, statistical tracking, and realistic gameplay rules for an engaging, interactive experience.
- Host: GitHub
- URL: https://github.com/brunortech/casino-craps-game
- Owner: BrunoRTech
- Created: 2024-12-24T00:00:40.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-12-24T21:45:43.000Z (5 months ago)
- Last Synced: 2025-04-12T02:39:26.524Z (about 1 month ago)
- Topics: beginner-java, casino-game, craps, dice-game, game-development, interactive-game, java, java-project, software-project, text-based-games
- Language: Java
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Casino Craps Game
This project is a Java-based implementation of the classic casino dice game Craps, being the school assessment. It provides an interactive, text-based experience that simulates the rules and gameplay of Craps, including dice rolling and statistical tracking of outcomes.
## Features
- **Interactive Gameplay**: Text-based prompts guide the player through the game.
- **Customizable Dice**: The `Die` class simulates an n-sided die, allowing flexibility in gameplay.
- **Statistics Tracking**: Tracks the number of games played, wins, losses, and rolled outcomes.
- **Realistic Rules**: Implements the full rules of Craps, including point value rolls and game-ending conditions.## File Structure
- **`Craps.java`**: Contains the main game logic, player interaction, and rules of Craps.
- **`Die.java`**: Defines the `Die` class, which simulates the behavior of a die.
- **`__SHELL0.java`**: (Optional) Supporting file generated for testing or execution.## Usage
To play the game:
1. Clone the repository:
```bash
git clone https://github.com/Bruneros8/Casino-Craps-Game.git
```
2. Navigate to the project directory:
```bash
cd Casino-Craps-Game
```
3. Compile the Java files:
```bash
javac *.java
```
4. Run the Craps game:
```bash
java Craps
```## How to Play
1. **Objective**: Roll two dice to achieve specific outcomes:
- **Win Immediately**: Rolling a 7 or 11 on the first roll.
- **Lose Immediately**: Rolling a 2, 3, or 12 on the first roll.
- **Point Value**: Any other roll becomes the "point," and the player must roll that number again before rolling a 7 to win.
3. **Player Input**: Follow the prompts and press `Enter` to roll the dice.## Acknowledgment
This project was completed as part of a school assessment to demonstrate proficiency in Java programming. Feedback and suggestions for improvement are welcome.