Stalemate and resignation implemented and tested