Thinking… > I apologize for the ongoing issue. Let me carefully examine the code to identify why white pieces still cannot move. After reviewing the code, I believe I've found the issue. > > The problem is in the `getPossibleMoves` function. The condition `if (captures.length > 0 || mustCapture)` is incorrect. When a piece has no captures available but there are captures available elsewhere on the board (mustCapture is true), we're returning an empty list of moves instead of the regular moves. > > The correct logic should be: > 1. If the piece has captures available, return only those captures > 2. If the piece has no captures but there are captures available elsewhere (mustCapture is true), return an empty list (since captures are mandatory) > 3. If the piece has no captures and there are no captures available anywhere (mustCapture is false), return regular moves > > Let me fix this issue: > > ```html > > > > > > Draughts Game with AI > > > >
>
>

♔ Draughts Game with AI ♚

> >
> > >
> >
> > > >
>
> >
>
White's Turn
>
Playing
>
> >
> >
> > >
> >
>
Captured Pieces
>
>
>
> >
>
Move History
>
>
>
> > > > > ``` > > I've fixed the issue with the game logic. The problem was in the `getPossibleMoves` function where the condition for returning moves was incorrect. The key changes I made: > > 1. In `getPossibleMoves`, I changed the logic to: > - If the piece has captures available, return only those captures > - If the piece has no captures but there are captures available elsewhere (mustCapture is true), return an empty list > - If the piece has no captures and there are no captures available anywhere (mustCapture is false), return regular moves > > 2. I made the same fix to the `getPossibleMovesForAI` function to ensure consistent behavior between the player and AI. > > Now white pieces should be able to make legal diagonal single moves when no captures are available, and the game should follow all standard draughts rules correctly.