offsetArtifacts function

void offsetArtifacts(
  1. List<Artifact> matrices,
  2. int x,
  3. int y
)

Applies an offset to the location of a list of matrices.

This function translates the locationFound property of each matrix in the list by the specified x and y offsets.

Parameters:

  • matrices: The list of Artifact objects to offset.
  • x: The horizontal offset to apply.
  • y: The vertical offset to apply.

Implementation

void offsetArtifacts(final List<Artifact> matrices, final int x, final int y) {
  for (final Artifact matrix in matrices) {
    matrix.locationFound = matrix.locationFound.translate(x, y);
  }
}