コード例 #1
0
 public static IEnumerable <NeighbourHex> GetNeighbours(IGridHex hex)
 {
     return(hex.Coords.GetNeighbours(~Hexside.None)
            .Select((nn, seq) => new NeighbourHex(hex.Board[nn.Coords.User], nn.Direction, seq))
            .Where(n => n.Hex != null)
            .Select(nh => nh));
 }
コード例 #2
0
 public NeighbourHex(IGridHex hex, Hexside direction, int seqNo) : this()
 {
     Hex        = hex;
     Direction  = direction;
     SequenceNo = seqNo;
 }
コード例 #3
0
 public NeighbourHex(IGridHex hex, Hexside direction) : this(hex, direction, 0)
 {
 }