Added checkmate checking