So I've decided to move onto something different, rather than spend too much time working on the Senet game and neglecting my final project. So to get started on Delve, I'm going to attempt to implement a simple version of yahtzee. Since many of the mechanics of Delve are very similar to yahtzee, when I get the program working, I can easily turn it into the core of my Delve game. So far, I haven't gotten very far on the yahtzee game. I have the five dice implemented as a class. This is a much better method than what I was using for Senet. Instead of storing everything in global variables, I set up the die class, so that each dice is declared as an object and each die has set functions to execute whenever die.roll() is called. So I have the roll button and the five dice implemented, but I am having some trouble getting the roll function working. Whenever a die is initialized, its value should be set to 6 and displayed. What I am seeing however, is that the dice are set to random values from the beginning and the roll button does not appear to do anything. So here's an image of what I have so far, with the button and the five dice. Notice the dice are set to random values, this is without pressing or calling the roll functions.
No comments:
Post a Comment