so I lost a game because of stupid coding

Sort:
Rockethead293
(sadly no screenshots) so one time my king wasn't in check and the only piece I could move was my queen, and only to a spot where it would get captured once again, my king was NOT in check I lost to that
llama36

Maybe like this?

(The black queen isn't allowed to run away from the bishop because the king is behind)
-