public GardenTemplate Copy() { bool[] newData = data; int width = Width; int height = Height; GardenTemplate newShape = new GardenTemplate(width, height, newData); return(newShape); }
/// <summary> /// A function to help with the two-dimensional array /// </summary> /// <param name="template"></param> /// <param name="x"></param> /// <param name="y"></param> /// <returns></returns> public static int GetCorrectIndex(GardenTemplate template, int x, int y) { return(x * template.Width + y); }