Stalemate fix and Checkmate Investigation

FYI the greedy AI doesn't know how to set checkmate flags so they would
put us in check (but in all reality it was actually checkmate) and we
would flag it as an invalid move.