Skip to content

Instantly share code, notes, and snippets.

@TinkerWorX
Created April 25, 2012 06:47
Show Gist options
  • Save TinkerWorX/2487437 to your computer and use it in GitHub Desktop.
Save TinkerWorX/2487437 to your computer and use it in GitHub Desktop.
/// <summary>
/// This is a box realm, which is a realm with a width and height.
/// </summary>
public abstract class BoxRealm : Realm
{
public Int32 Width { get; protected set; }
public Int32 Height { get; protected set; }
protected BoxRealm(Int32 width, Int32 height)
{
if (width % TileWorX.SECTOR_TILE_SIZE != 0) throw new ArgumentException("Invalid value(" + width + "), must be divisable with " + TileWorX.SECTOR_TILE_SIZE, "width");
if (height % TileWorX.SECTOR_TILE_SIZE != 0) throw new ArgumentException("Invalid value(" + height + "), must be divisable with " + TileWorX.SECTOR_TILE_SIZE, "height");
this.Width = width;
this.Height = height;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment