The rook moves horizontally or vertically , forward or back , through any number of unoccupied squares , as shown in the diagram .

The rook moves forward or back through any number of squares without other pieces on them , as shown in the diagram .
