Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Dark GDK Game of Nim Project, Help me Please

Author
Message
MetalGuitar08
15
Years of Service
User Offline
Joined: 22nd Oct 2009
Location:
Posted: 23rd Oct 2009 00:25
Hey all,

I'm making a Dark GDK Game of Nim, in which the following conditions have to be met:

1. Must use stacks to hold piles of chips
2. number of piles is inputted by user, and must be between 3 and 5, inclusively
3. number of stones is chosen by user, must be at least as many chips as the number of piles
4. chips are assigned randomly to piles, must be shown graphically, and updated at each turn
5. The players take turns choosing the pile to remove from, and the number of chips to remove – must ask the user how many chips they want, from which pile, and validate the input.
6. Last player to remove a stone wins


Now, I've been struggling to write this code, since I rarely use Dark GDK, but I have come up with this:



I need help visually displaying the chips so that each pile will be displayed in correct rows and columns.

Can someone please help me, I am new to Dark GDK and this is urgent.

Thank you very much!
luke810
18
Years of Service
User Offline
Joined: 4th Sep 2006
Location: United States
Posted: 23rd Oct 2009 02:32 Edited at: 23rd Oct 2009 02:56
EDIT: Ignore that, sorry I didn't check your code. You need to add dbCLS( 0 ) in there:



I would suggest getting rid of the stack thing and just using a standard array by the way...

MetalGuitar08
15
Years of Service
User Offline
Joined: 22nd Oct 2009
Location:
Posted: 23rd Oct 2009 03:05
Unfortunately, it's part of the assignment to use stacks. Is there a way to display all of the available chips in columns and rows? (E.g. say i inputted 5 piles, with 5 chips each, how would it display a 5x5 grid of chips that updated at each turn?)

Thanks a ton, the dbCLS(0) definitely helped with the overlapping pictures over text.
MetalGuitar08
15
Years of Service
User Offline
Joined: 22nd Oct 2009
Location:
Posted: 24th Oct 2009 19:54
Can anyone help me? Still having problems

Login to post a reply

Server time is: 2024-11-20 11:27:18
Your offset time is: 2024-11-20 11:27:18