Finished checkmate logic with some testing