protected override IEnumerable <NeighbourCoords> GetNeighbours(Hexside hexsides)
        {
            ICoordsCanon coords = this;

            foreach (Hexside hexside in Enum.GetValues(typeof(Hexside)))
            {
                if (hexside != Hexside.None && hexsides.HasFlag(hexside))
                {
                    yield return(new NeighbourCoords(hexside, coords.StepOut(hexside)));
                }
            }
        }
Пример #2
0
 public override int    StepCost(ICoordsCanon coords, Hexside hexSide)
 {
     return(IsOnBoard(coords.User) && this[coords.StepOut(hexSide)].Value == '.' ? 1 : -1);
 }