Git Product home page Git Product logo

craps-game's Introduction

Craps Dice Game

Introduction

This Java application simulates a simplified version of the Craps dice game. Players roll two dice and win or lose based on the outcome of the dice rolls according to specific rules.

Rules

  • Rolling a sum of 7 results in an immediate loss.
  • To win, the player must roll:
    • Doubles of 6-6
    • Doubles of 5-5
    • Doubles of 3-3
  • The player loses if they roll:
    • Doubles of 4-4
    • Doubles of 2-2
    • Doubles of 1-1
  • If both the computer and the player roll the same sum or both roll a sum of 7, it is a tie.

How to Play

  1. Run the program.
  2. The computer rolls two dice.
  3. The player rolls two dice.
  4. The outcome is displayed, indicating whether the player or the computer wins, or if it’s a tie.

Technologies Used

  • Java: Programming language used for the application.
  • Random: Used for generating random dice rolls.

Running the Program

  1. Copy the code into Main.java.
  2. Compile the program with:
    javac Main.java
    
  3. Run the program with:
    java Main
    

Enjoy playing the Craps game!

craps-game's People

Contributors

byurudur avatar

Stargazers

 avatar Furkan Aydemir avatar

Watchers

 avatar

Forkers

deerborg

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.