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(); }
public Vertex(Hexagon hex, VertexOrientation vo) { AdjacentForUpdate.Add(hex); _originalHexagon = hex; _originalOrientation = vo; Position = new VertexPosition(hex.Position, vo); Reset(); }
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); } }
internal Vertex this[VertexOrientation vo] { get { return _vertices[(int) vo]; } set { _vertices[(int) vo] = value; } }
IVertex IHexagon.this[VertexOrientation vo] { get { return _vertices[(int) vo]; } }
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); }
public VertexPosition(int x, int y, VertexOrientation vo) : this(new Position(x, y), vo) { }
public VertexPosition(Position position, VertexOrientation vo) { HexPosition = position; Orientation = vo; }
protected void BuildCampus(int x, int y, VertexOrientation vo, CampusType type) { var whereAt = new VertexPosition(new Position(x, y), vo); BuildCampus(whereAt, type); }
public static VertexStaticInfo Get(VertexOrientation vo) { return _lookUp[vo]; }