Express applying a path to a board as a matrix permutation.