12-04-2013 12:03 AM
Trust me, he didn't do the assignment for me. That was a great referance/guide, but it certainly doesn't fix all my problems. I've worked a couple of them out on a different design, and I have 4 different ones I've been working on just to see which one sticks first. It will do me some good to study the overall structure and programming of this VI to further understand how and why everything is connected, and what everything does. I agree with Dennis that the case structure is a ludacrious idea. Our textbook even mentions case structures being barely used because they can be a pain. As for my overall situation with LabVIEW, this class is really just a course elective I have to take. My degree program is in hydraulic and pneumatic motors. Thank you gentlemen for your time.
12-04-2013 05:57 AM
@TheBatman wrote:
[...] Our textbook even mentions case structures being barely used because they can be a pain. [...]
I wonder about the context in which your textbook made that comment. Generally, Case structures are not "barely used".
12-04-2013 08:45 AM
Looking past the random number generation, it sounds to me that the only section of the program which could make use of case statements (assuming the use of one is a requirement of the assignment) is the point calculations. You mentioned that a 1 is 100 points, 5 is 50 (and i'm assuming the other values each have a unique score). This can be implemented using an array constant for the point values and indexing accordingly (no case statement yet).
The point where I could see them being used is the unique score multipliers (such as 3 of a kind mentioned in your original post). Boolean logic can be used to triger various case statements for a score multiplier. Each case would correspond to a different multiplier (assuming only 1 multiplier at a time is possible). Of course choosing between multiplier values could also be done using a combination of boolean logic and "Select" from the comparison pallete.
12-04-2013 08:53 AM
Have you tried using enum constants with shift registers to take you through the six states of dice rolls. There are lots of great examples of state machines here, this is how I would start.