stalemate check in main