Added checkmate function

The same function is now responsible for seeing if the king is both
check and checkmate. Although the code isn't tested and some of it still
needs to be implemented. To otired to fix it now