|
-
October 15th, 2011, 06:53 AM
#2
Re: Recursive function problem
'i' does not seem to reinitialize itself to 0 when the function gets recalled.
What makes you think that, are you suggesting Java's for loop is broken? Have you added print statements to find out what i's value is and what the flow of execution is?
What sets/changes the contents of the move, pegsLeft and pegsToRemain variables?
BTW why are you encoding int values into a string and then decoding them in the method - why not put them in an instance of a class designed to hold the int 3 values?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|