Ejemplo n.º 1
0
 public void CreateEmptyMap(int size)
 {
     List<SystemType> systems = new List<SystemType>();
     int radius = size / 2;
     HexLocation center = new HexLocation(radius, radius);
     for (int y = 0; y <= size; ++y)
     {
         for (int x = 0; x <= size; ++x)
         {
             HexLocation loc = new HexLocation(x, y);
             int distanceFromCenter = loc.DistanceTo(center);
             if (distanceFromCenter <= radius)
             {
                 systems.Add(App.CreateSystem(SetupTileName(distanceFromCenter), loc, loc.ToString()));
             }
         }
     }
     this.Map = systems.ToArray();
 }