Added a function to test if the king is on check state. No tests yet. Also added some doc