AIsOfCatan.Board.Board C# (CSharp) Method

Board() private method

private Board ( ) : System
return System
        private Board()
        {
            // initialize fields
            roads = new Dictionary<Edge, int>(22);
            settlements = new Dictionary<Intersection, Piece>(22);
            harbors = new Harbor[9];

            // create board
            terrain = new Tile[7][];
            bool longrow = false;
            for (int i = 0; i < 7; i++)
            {
                terrain[i] = new Tile[longrow ? 7 : 6];
                longrow = !longrow;
            }

            // place water
            foreach (int water in WaterTiles)
            {
                Tuple<int, int> coords = GetTerrainCoords(water);
                terrain[coords.Item1][coords.Item2] = new Tile(Terrain.Water, 0);
            }
        }

Same methods

Board::Board ( Tile terrain, int>.Dictionary roads, Piece>.Dictionary settlements, int robber, Harbor harbors, Intersection inter, Edge edges ) : System
Board::Board ( int terrainSeed ) : System
Board::Board ( int terrainSeed, int numberSeed ) : System