Skip to content

Instantly share code, notes, and snippets.


explorer14/Terrain.cs Secret

Created Jun 22, 2020
What would you like to do?
public sealed class Terrain
private const int ORIGIN = 0;
public Terrain(int maxX, int maxY)
if (maxX < ORIGIN || maxY < ORIGIN)
throw new ArgumentOutOfRangeException(
$"{nameof(maxX)}, {nameof(maxY)}",
$"This terrain can only contain " +
$"positive co-ordinatesm with origin at ({ORIGIN},{ORIGIN})");
MaxX = maxX;
MaxY = maxY;
public int MaxX { get; }
public int MaxY { get; }
public int MinX { get; }
public int MinY { get; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.