public Position MoveNorth(Position position) { var newPosition = position; newPosition.IncrementY(); if (!Plateau.isValid(newPosition)) { throw new InvalidOperationException(); } return(newPosition); }
public Position MoveWest(Position position) { var newPosition = position; newPosition.DecrementX(); if (!Plateau.isValid(newPosition)) { throw new InvalidOperationException(); } return(newPosition); }