setByPosition method

void setByPosition(
  1. Position position
)

Implementation

void setByPosition(Position position) {
  x = position.x;
  y = position.y;
}