paste method

GridWorld paste(
  1. int cI,
  2. int cJ,
  3. GridWorld other
)

Copy this with the other world pasted in at the given location.

Result will be large enough to contain both.

Implementation

GridWorld paste(final int cI, final int cJ, final GridWorld other) =>
    GridWorld.empty(
        max(_numRows, cI + other.nRows), max(_numCols, cJ + other.nCols))
      .._paste(0, 0, this)
      .._paste(cI, cJ, other);