12-01-2013 01:55 PM
I've been given two weeks on this project. Time is running short, and given that I'm not a natural with LabVIEW programming, it still hasn't been enough time for me to make significant progress. The objective is to have six dice (with indicators and a case structure), a default case, and having a master stop button. The game should start over automatically at the first role after a game finishes. There must be a numeric display logic to determine the score of the dice using the following rules: a number 1 is worth 100 points, a number 5 is worth 50 points, three of a kind is worth 100 times the face value of the dice. The player should roll six dice a total of four times and display the total score. If over 2,000 points is scored, a message should be displayed that indicates an excellent game.
I've provided what I have so far, and given that my dice don't work properly, you can tell just how much of a novice I am lol. Can anybody at least point me in the right direction?
12-01-2013 02:50 PM
12-01-2013 03:02 PM
That "dice" is a random number between zero and one. The mathematical formula it's connected to is exactly what was described in the project handout sheet. The formula is supposedly feeding into the case structure and supplying all 6 dice indicators with data. It says create a random number between zero and one, multiply by 7, and round to the nearest integer for each die. If there is an error, I appreciate that you recognise it, but I'm hoping for constructive criticism with helpful pointers, not demeaning criticism.
12-01-2013 03:08 PM
12-02-2013 05:09 PM - edited 12-02-2013 05:11 PM
I won't deny that what I have so far is out of left field. I imagine it was. Can you at least provide a small tip on how to start correcting it? So far I gather that having one case structure to represent each dice is wrong, and that I probably need one small case structure for each.
12-02-2013 07:39 PM
12-02-2013 11:39 PM
Go back to message 4 in your original thread to see the proper way to randomly generate the number 1 through 6 with equal probability.
http://forums.ni.com/t5/LabVIEW/any-tips-on-programming-craps-in-labview/m-p/2642855#M789229
Also, Craps only uses two dice.
Now that you are proposing a game that uses 6 dice, you should call it something else.
12-03-2013 04:58 AM
Hi,
I'm unable to see your vi because it's posted it in 2013 ![]()
Anyway looking at the comments I found out you already questioned the dice generator last time.
I made a quick example of how a dice game could look like, it isn't special nor great programmed.
It's very simple using only two dices.
Koen
12-03-2013 05:30 AM
KoenR94, I'm glad you want to help - and I'm glad you used an event structure. However (and I don't mean any harm to The Batman), if you do his assignments for him, it may take him longer to learn. Sometimes it's enough to give a smaller piece of the answer. Just a thought.
12-03-2013 06:13 AM
Yes maybe you are right.
It was just an example, his assignment has to contain 6 dices.
Though I guess you are right, I could've attached less code.