public bool IsValidPosition(int X, int Y) { return ((X >= 0) && (Y >= 0) && (X < Width) && (Y < Height)); }