Exemplo n.º 1
0
        public GardenTemplate Copy()
        {
            bool[]         newData  = data;
            int            width    = Width;
            int            height   = Height;
            GardenTemplate newShape = new GardenTemplate(width, height, newData);

            return(newShape);
        }
Exemplo n.º 2
0
 /// <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);
 }