I'm in the process of making a new Yahtzee program.
At the moment, i'm working on a part of my program that will ask the user what play they want to make. They can choose from three colums of 13 squares each. (this is the French version of the game)
screenshot:


the only problem is that when the program is running the part where it asks the user what they what to do, it slows down.
I'm using tons of if-then loops within each other....i'm guessing that's the problem but I don't know how to fix it. I think I might just make subprograms...even though I hate doing it. Bleagh..
That's called a memory leak, and it's caused by Goto'ing out of an If..Then..End or If..Then..Else..End construction. Fix your code so that Goto's aren't inside Then/End blocks.
KermMartian wrote:
That's called a memory leak, and it's caused by Goto'ing out of an If..Then..End or If..Then..Else..End construction. Fix your code so that Goto's aren't inside Then/End blocks.


Perfect. Thank you. I'll try to keep this topic updated with what i'm up to on the game...
Kerm, you ought to make sourcecoder detect memory leak.
Update on Yahtzee:
1. Fixed memory leak
2. Finished conversion of play selection into matrix coordinates for scoring
3. Finished scoring program. All scoring based on rules from Bourbon-Lancy, France
4. User can now "hold" on dice unlike the version of Yahtzee in the link below(user must roll 3 times and can't make play until 3rd roll)
http://www.ticalc.org/archives/files/fileinfo/402/40222.html

Still to come:
1. Update and disp score after making a play
2. Menu: Includes help, return to game, save*, load*, credits, quit
*save and load are not priorities at the moment. I will only add them when i'm done with the rest.
3. Another Yahzee program with general French rules (instead of >27 there is 4 of a kind and instead of <11 there is <8 )


[EDIT]
1. Score displayer finished. only displays score if you made that play.
4. Put all subprograms to work in main program when needed be.
Pseudoprogrammer wrote:
Kerm, you ought to make sourcecoder detect memory leak.
That's an excellent idea; as soon as I get some of this schoolwork out of the way, I'll definitely do that.
Update:
1. Done with most of the sub programs(all but menu)
2. Putting them all together...running into problems
3. I'm trying to fix all the problems now..but it's taking forever...hopefully i'll be done tonight.

[EDIT]
4. Bug fixing done. Yaay now all i need to do is make the menu.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement