generating moves for king and knight