예제 #1
0
        HexCell GetCell(HexCoordinate coor)
        {
            HexCell cell;

            if (cells.TryGetValue(coor, out cell))
            {
                return(cell);
            }
            else
            {
                return(null);
            }
        }
예제 #2
0
        static public MapCoordinate HexCoorToMap(HexCoordinate coor, bool isOddOffset = true)
        {
            int offset = isOddOffset ? 1 : 0;

            return(new MapCoordinate(coor.Row, coor.Col + ((coor.Row + offset) / 2)));
        }