added: simplified (to be fixed) handling of check mate, update: refactoring