Пример #1
0
 public void SetNormalSites(int x, int y, VertexOrientation vo, VertexOrientation vo2)
 {
     var hex = Board[x, y];
     if (hex == null)
         return;
     hex[vo].MakeMultiSite();
     hex[vo2].MakeMultiSite();
 }
Пример #2
0
 public Vertex(Hexagon hex, VertexOrientation vo)
 {
     AdjacentForUpdate.Add(hex);
     _originalHexagon = hex;
     _originalOrientation = vo;
     Position = new VertexPosition(hex.Position, vo);
     Reset();
 }
Пример #3
0
 public void SetSpecializedSites(int x, int y,
                                 VertexOrientation vo, VertexOrientation vo2, DegreeType degree)
 {
     var hex = Board[x, y];
     if (hex != null)
     {
         hex[vo].MakeSpecialSite(degree);
         hex[vo2].MakeSpecialSite(degree);
     }
 }
Пример #4
0
 internal Vertex this[VertexOrientation vo]
 {
     get { return _vertices[(int) vo]; }
     set { _vertices[(int) vo] = value; }
 }
Пример #5
0
 IVertex IHexagon.this[VertexOrientation vo]
 {
     get { return _vertices[(int) vo]; }
 }
Пример #6
0
 private Vertex UseOtherOrCreateVertex(Board board, VertexOrientation vo)
 {
     // can be 2 adjacent hexagons
     foreach (var pos in VertexStaticInfo.Get(vo).RelativePositions)
     {
         var hex = board[_hex.Position.Add(pos.Offset)];
         if (hex == null)
             continue;
         var vertex = hex[pos.Orientation];
         if (vertex != null)
         {
             return vertex;
         }
     }
     return new Vertex(_hex, vo);
 }
Пример #7
0
 public VertexPosition(int x, int y, VertexOrientation vo)
     : this(new Position(x, y), vo)
 {
 }
Пример #8
0
 public VertexPosition(Position position, VertexOrientation vo)
 {
     HexPosition = position;
     Orientation = vo;
 }
Пример #9
0
 protected void BuildCampus(int x, int y, VertexOrientation vo, CampusType type)
 {
     var whereAt = new VertexPosition(new Position(x, y), vo);
     BuildCampus(whereAt, type);
 }
Пример #10
0
 public static VertexStaticInfo Get(VertexOrientation vo)
 {
     return _lookUp[vo];
 }