bug fixed on diagonal moves and restricted king piece movement to stay out of check