Don't know how to secure a random in Yatzi game

May 7 2012 4:12 PM
Hello guys (and girls).

I've got a problem in my Yahtzee project, where I've tried to search all over the internet, but haven't found a solution to my problem.

My basic problem is, that I have a random that generates my (1,7) numbers (for each dice number(1,2,3,4,5,6)) over my 6 dices that I have in the game.

I've made a "HOLD" Button which is supposed to hold my generated random dice number (it's a button with a picture on it on my Form), but I can't seem to make it work.

How can I certify that when I press the "hold" button and then click "ROLL DICES" once more, that it doesn't change my holded dice and starts generating a new number??

By the way I'm not that experienced in C# so please try and help me in a noobie language :-)

I will appreciate any sorts of help to the bottom of my heart!

Best Regards,
Rasmus Christensen

Answers (4)