AIsOfCatan.MapScreen.GetTerrainIndex C# (CSharp) Method

GetTerrainIndex() static private method

static private GetTerrainIndex ( int row, int col ) : int
row int
col int
return int
        internal static int GetTerrainIndex(int row, int col)
        {
            int index = 0;
            bool longrow = false;
            while (row > 0)
            {
                row--;
                index += longrow ? 7 : 6;
                longrow = !longrow;
            }
            return index + col;
        }