Trying Program Game Called Craps Using Visual Basic Make Rolling Dice Know Problem Need M Q10608245

I am trying to program a game called “Craps”using Visual Basic. I have to make rolling dice which I know how todo. But the problem is, I need to make the first rules of rollingdifferant from the second. I will provide you with an example ofhow to do it. The second thing is, I am also trying to make pointsfor the game. For example, if you win, you get 1 point, but if youlose, you will lose one point, and there is a state where you dontlose nor win.The rulse are:If you got 7 or 11 from the first roll youwin.If you get 2,3 or 12 from the first roll youlose.If you get any other number, you have to rollagain until you get:1- the same number => you win2- number 7 => you lose
After that you loop back to the firstroll.

Here is the example:

HIDE ALL DICE IMAGES

ROLL TWO DICE (GET TWO RANDOMNUMBERS)

DISPLAY DIE VALUES, TOTAL, ANDCORRECT IMAGES

IF THE STATE IS 1 (MEANING FIRSTROLL)

IF TOTAL IS 7 OR TOTAL IS11

STATUS: WINNER

ADD ONE TO THE SCORE

STATE = 1 (FIRST ROLL)

ELSE IF TOTAL IS 2 OR TOTAL IS 3 ORTOTAL IS 12

STATUS: LOSER

SUBTRACT ONE FROM THESCORE

STATE = 1 (FIRST ROLL)

ELSE

STATUS: ROLL AGAIN

STATE = 2 (ROLL AGAIN)

POINT = TOTAL THE USER JUSTROLLED

ELSE (WE AREN’T ROLLING A FIRST ROLL,WE ARE ROLLING AGAIN SO WE NEED TO CHECK THE

ROLL WITH THE POINT – THE STATE MUSTBE 2)

IF TOTAL IS EQUAL TO THEPOINT

STATUS: WINNER

STATE = 1 (BACK TO FIRSTROLL)

ADD ONE TO THE SCORE

ELSE IF TOTAL 7

STATUS: LOSER

STATE = 1 (BACK TO FIRSTROLL)

SUBTRACT ONE FROM THESCORE

ELSE

STATUS: ROLL AGAIN

STATE = 2 (ROLL AGAIN)

"We Offer Paper Writing Services on all Disciplines, Make an Order Now and we will be Glad to Help"
0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published.