Rook legal move function made.