Esempio n. 1
0
    public void SetNeighbor(StartTopHexDir direction, List <Coordinates> coords, Coordinates cell)
    {
        _neighborIndexes[(int)direction] = new Neighbor(direction.ToString(), coords.IndexOf(cell));  //, cell);
        var opposite = direction.Opposite();

        cell._neighborIndexes[(int)opposite] = new Neighbor(opposite.ToString(), coords.IndexOf(this));  //, this);
    }
Esempio n. 2
0
 public static StartTopHexDir Opposite(this StartTopHexDir direction)
 {
     return((int)direction < 3 ? (direction + 3) : (direction - 3));
 }