The way of figuring out what moves are actually legal is just by making the move, seeing if the king is in check, and unmaking the move. Really smart and it’s super easy.