boe john

Greenhorn
+ Follow
since Jan 13, 2019
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by boe john

I resolved the issue with the pieces not resetting, but my multi jump still does not work.
3 years ago
I have attempted to code checkers for a school project, but I am unable to code a method for multiple jumps. In my current version, I have attempted to find the possible moves in a one piece radius, add those moves to an ArrayList known as mainList, and use recursion to find all possible moves. Afterward, for each possible final destination piece, the program adds the pieces that need to be reset to "NO" to an ArrayList known as sublist, which is one of the attributes of each piece. However, my jumps do not work.

I have attempted to debug why my program is not removing the correct pieces, and in the image with a trial run posted below, the underlined "RP" with coordinates of (4,3) is not reset, and instead, the program thinks that the piece with coordinates of (3,2) should be reset. Apparently, the program is trying to reset the final destination piece rather than the middle piece. What am I missing that is causing it to do this?

Note: Some of the code has been removed to fit character count.

3 years ago