fix kings and implement other rule checks