public HexVisual(Point2D point, Hex hex) : base(point) { _Hex = hex; Init(); InitHex(); }
public TerritoryVisual(Point2D point, Territory territory) : base(point) { _Territory = territory; Init(); }
private Point2D AddOffset(Point2D point, EPointPositionOnHex positionOnHex) { switch (positionOnHex) { case (EPointPositionOnHex.TopMiddle): return new Point2D( point.X + Hex.HalfWidth, point.Y); case (EPointPositionOnHex.RightTop): return new Point2D( point.X + Hex.Width, point.Y + Hex.BottomHeight); case (EPointPositionOnHex.RightBottom): return new Point2D( point.X + Hex.Width, point.Y + Hex.PartialHeight); case (EPointPositionOnHex.BottomMiddle): return new Point2D( point.X + Hex.HalfWidth, point.Y + Hex.PartialHeight); } throw new ArgumentException("Enum cannot be " + positionOnHex.ToString()); }
public Point2D AddOffset(EPointPositionOnHex position, BoardVisual b, Point2D point) { Point2D result = new Point2D(); // Offsets for positioning the visuals correctly double offsetx = 0;// (b.Board.Width * Hex.Width) / 2; double offsety = 0;// ((b.Board.Height * Hex.PartialHeight) + Hex.BottomHeight) / 2; switch (position) { case EPointPositionOnHex.TopMiddle: result.X = point.X + offsetx + Hex.HalfWidth; result.Y = point.Y + offsety; return result; case EPointPositionOnHex.RightTop: result.X = point.X + offsetx + Hex.Width; result.Y = point.Y + offsety + Hex.BottomHeight; return result; case EPointPositionOnHex.RightBottom: result.X = point.X + offsetx + Hex.Width; result.Y = point.Y + offsety + Hex.PartialHeight; return result; case EPointPositionOnHex.BottomMiddle: result.X = point.X + offsetx + Hex.HalfWidth; result.Y = point.Y + offsety + Hex.Height; return result; } throw new Exception("Should not reach this"); }
public Pirate(Point2D point, HexLocation location) : base(point) { _Location = location; Init(); }
private Point2D AddRobberOffset(Point2D point) { point.X += Hex.HalfWidth; point.Y += (Hex.Height / 2); return point; }
public PlayerPiece(Point2D point, Color color) : base(point) { _Color = color; }
public Piece(Point2D point) { _Point = point; }
public HexSideVisual(Point2D point, HexSide location) : base(point) { _Location = location; Init(); }
public BuildPointVisual(Point2D point, HexPoint location) : base(point) { _Location = location; Init(); }
public ControlPiece(Point2D point) : base(point) { }
public BonusVP(Point2D point) : base(point) { Init(); }
public Card(Point2D point) : base(point) { }
public ChitVisual(Point2D point, EChitNumber n) : base(point) { this._Number = n; Init(); }
public Robber(Point2D point, HexLocation location) : base(point) { _Location = location; Init(); }
public Road(Point2D point, Color color, HexSide location) : base(point, color) { _Location = location; Init(); }
public Traveller(Point2D point) : base(point) { }
public City(Point2D point, Color color, HexPoint location) : base(point, color) { Location = location; Init(); }
public PortVisual(Point2D point, Port pt) : base(point) { this._XmlPort = pt; Init(); }