Created
April 25, 2012 06:47
-
-
Save TinkerWorX/2487437 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <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