Shop OBEX P1 Docs P2 Docs Learn Events
random number generator using BS2 for a electronic Yahtzee game — Parallax Forums

random number generator using BS2 for a electronic Yahtzee game

barrett74barrett74 Posts: 2
edited 2005-10-28 06:44 in Learn with BlocklyProp
Our class is trying to make a electronic yahtzee game> I was wondering if anyone might be able to help with this function. we need to generate the numbers one through six. We may possibly just make it like a jackpot yahtzee where you would win points or "money" for higher combinations rather than like traditional yahtzee.

I am a very green newbie to this stuff so if Ive stated something wrong forgive me O' wise ones.

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-10-28 03:05
    RANDOM is actually pseudo-random, so for games you would want to do something like this:

    lottery··· VAR··· Word

    Main:
    · DO
    ··· RANDOM lottery
    · LOOP UNTIL (StartBtn = Pressed)

    · roll·= lottery // 6 + 1

    Since this is an educational forum I will leave the rest to you.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • barrett74barrett74 Posts: 2
    edited 2005-10-28 06:44
    Thank you very much Jon we will give it a shot.
Sign In or Register to comment.