A Java Program to implement Snake Eyes ( 1 , 1) Dice Rolling Game in Java using Eclipse IDE

in #utopian-io8 years ago (edited)

What Will I Learn?

  • Java String Arrays.
  • More Implementation of the break statement.
  • More Implementation of the if else statement.
  • More Application of the Random class statement.

Requirements

  • An Integrated Development Environment(IDE) installed that can run Java (e.g Eclipse, IntelliJ, NetBeans)
  • JDK 1.X installed on your Pc
  • Of course, willingness to learn
  • Java Programming Experience.

Difficulty

  • Advanced

Description

The Sanke eye is when a dice is rolled and (1 , 1) is gotten for both dice.

This Java program is an implementation of that where the user entered a specific character when he or she is ready to roll the dice and the game doesn't stop except told otherwise by the user by entering 0 as a quit key until the snake eyes is rolled.

The random class is used to generate random numbers from 1 to 6 and each outcome of rolling the dice is displayed where the last outcome is (1 , 1) and therefore the snake eyes program exist.

After that, a success message is printed or you quit the game message if the user enters 0 as the quit key.

Video Tutorial

Sort:  

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

Hey @rufans, I just gave you a tip for your hard work on moderation. Upvote this comment to support the utopian moderators and increase your future rewards!

Hey @edetebenezer I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

Coin Marketplace

STEEM 0.04
TRX 0.32
JST 0.088
BTC 61578.51
ETH 1697.55
USDT 1.00
SBD 0.38