added checking for captures in the AI and fixed AI crashing in some edge cases where no pieces were remaining on the red side and a crash that occured when the black king was the last piece captured