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.