Allow for the matrix to be rotated and shifted as per rule sheet.
Allow for the matrix to be rotated and shifted as per rule sheet.