Refactoring due to latest task
Implement some sort of checking checkmate, but not finished yet