The capturedpieces array is generated automatically after all moves have been played through. So, it is not available for you to tinker with in the code. Instead, you have to construct the entire capturedpieces array. When you have already created it in your code, it doesn't get automatically generated from your final game position.
The capturedpieces array is generated automatically after all moves have been played through. So, it is not available for you to tinker with in the code. Instead, you have to construct the entire capturedpieces array. When you have already created it in your code, it doesn't get automatically generated from your final game position.