Exemplo n.º 1
0
        private void ConstructSquares(string blockName)
        {
            //The CBs will have temporary names. When they actually get placed onto the board, they'll be given their proper Square names.

            try
            {
                switch (blockName)
                {
                    case "Claw":
                        {
                            Square CBA1 = new Square("CBA1", Resources.ClawA1);
                            Square CBA2 = new Square("CBA2", Resources.ClawA2);
                            Square CBA3 = new Square("CBA3", Resources.ClawA3);
                            Square CBA4 = new Square("CBA4", Resources.ClawA4, 2.5, 2.5, false);
                            this.RowCBA.InsertRange(RowCBA.Count, new Square[] { CBA1, CBA2, CBA3, CBA4 });

                            FlammableSquare CBB1 = new FlammableSquare("CBB1", Resources.ClawB1, 2);
                            FlammableSquare CBB2 = new FlammableSquare("CBB2", Resources.ClawB2, 3);
                            FlammableSquare CBB3 = new FlammableSquare("CBB3", Resources.ClawB3, 3);
                            Square CBB4 = new Square("CBB4", Resources.ClawB4);
                            this.RowCBB.InsertRange(RowCBB.Count, new ISquareTypes[] { CBB1, CBB2, CBB3, CBB4 });

                            Square CBC1 = new Square("CBC1", Resources.ClawC1);
                            FlammableSquare CBC2 = new FlammableSquare("CBC2", Resources.ClawC2, 4);
                            FlammableSquare CBC3 = new FlammableSquare("CBC3", Resources.ClawC3, 4);
                            Square CBC4 = new Square("CBC4", Resources.ClawC4);
                            this.RowCBC.InsertRange(RowCBC.Count, new ISquareTypes[] { CBC1, CBC2, CBC3, CBC4 });

                            FlammableSquare CBD1 = new FlammableSquare("CBD1", Resources.ClawD1, 2);
                            FlammableSquare CBD2 = new FlammableSquare("CBD2", Resources.ClawD2, 3);
                            FlammableSquare CBD3 = new FlammableSquare("CBD3", Resources.ClawD3, 3);
                            Square CBD4 = new Square("CBD4", Resources.ClawD4, 2.5, 2.5, false);
                            this.RowCBD.InsertRange(RowCBD.Count, new ISquareTypes[] { CBD1, CBD2, CBD3, CBD4 });

                            this.RandomizerSquares.InsertRange(this.RandomizerSquares.Count, new FlammableSquare[] { CBB1, CBB2, CBB3, CBC2, CBC3, CBD1, CBD2, CBD3 });

                            //Create large buildings.
                            List<FlammableSquare> ClawLB1Squares = new List<FlammableSquare>();
                            ClawLB1Squares.Add(CBB1);
                            ClawLB1Squares.Add(CBB2);
                            Building ClawLB1 = new Building(2, ClawLB1Squares);

                            List<FlammableSquare> ClawLB2Squares = new List<FlammableSquare>();
                            ClawLB2Squares.Add(CBD1);
                            ClawLB2Squares.Add(CBD2);
                            Building ClawLB2 = new Building(2, ClawLB2Squares);

                            this.LargeBuildings.Add(ClawLB1);
                            this.LargeBuildings.Add(ClawLB2);

                            break;
                        }
                    case "Donut":
                        {
                            Square CBA1 = new Square("CBA1", Resources.DonutA1, 2.5, 2.5, false);
                            FlammableSquare CBA2 = new FlammableSquare("CBA2", Resources.DonutA2, 4);
                            FlammableSquare CBA3 = new FlammableSquare("CBA3", Resources.DonutA3, 3);
                            FlammableSquare CBA4 = new FlammableSquare("CBA4", Resources.DonutA4, 2);
                            this.RowCBA.InsertRange(RowCBA.Count, new ISquareTypes[] { CBA1, CBA2, CBA3, CBA4 });

                            Square CBB1 = new Square("CBB1", Resources.DonutB1);
                            FlammableSquare CBB2 = new FlammableSquare("CBB2", Resources.DonutB2, 3);
                            Square CBB3 = new Square("CBB3", Resources.DonutB3);
                            FlammableSquare CBB4 = new FlammableSquare("CBB4", Resources.DonutB4, 3);
                            this.RowCBB.InsertRange(RowCBB.Count, new ISquareTypes[] { CBB1, CBB2, CBB3, CBB4 });

                            Square CBC1 = new Square("CBC1", Resources.DonutC1);
                            FlammableSquare CBC2 = new FlammableSquare("CBC2", Resources.DonutC2, 2);
                            FlammableSquare CBC3 = new FlammableSquare("CBC3", Resources.DonutC3, 3);
                            FlammableSquare CBC4 = new FlammableSquare("CBC4", Resources.DonutC4, 4);
                            this.RowCBC.InsertRange(RowCBC.Count, new ISquareTypes[] { CBC1, CBC2, CBC3, CBC4 });

                            Square CBD1 = new Square("CBD1", Resources.DonutD1);
                            Square CBD2 = new Square("CBD2", Resources.DonutD2);
                            Square CBD3 = new Square("CBD3", Resources.DonutD3);
                            Square CBD4 = new Square("CBD4", Resources.DonutD4, 2.5, 2.5, false);
                            this.RowCBD.InsertRange(RowCBD.Count, new ISquareTypes[] { CBD1, CBD2, CBD3, CBD4 });

                            this.RandomizerSquares.InsertRange(this.RandomizerSquares.Count, new FlammableSquare[] { CBA2, CBA3, CBA4, CBB2, CBB4, CBC2, CBC3, CBC4 });

                            //Create large buildings.
                            List<FlammableSquare> DonutLB1Squares = new List<FlammableSquare>();
                            DonutLB1Squares.Add(CBA2);
                            DonutLB1Squares.Add(CBA3);
                            Building DonutLB1 = new Building(2, DonutLB1Squares);

                            List<FlammableSquare> DonutLB2Squares = new List<FlammableSquare>();
                            DonutLB2Squares.Add(CBC3);
                            DonutLB2Squares.Add(CBC4);
                            Building DonutLB2 = new Building(2, DonutLB2Squares);

                            this.LargeBuildings.Add(DonutLB1);
                            this.LargeBuildings.Add(DonutLB2);

                            break;
                        }

                    case "Easy Board 1":
                        {
                            FlammableSquare CBA1 = new FlammableSquare("CBA1", Resources.EasyBoard1A1, 3);
                            FlammableSquare CBA2 = new FlammableSquare("CBA2", Resources.EasyBoard1A2, 4);
                            FlammableSquare CBA3 = new FlammableSquare("CBA3", Resources.EasyBoard1A3, 3);
                            Square CBA4 = new Square("CBA4", Resources.EasyBoard1A4, 2.5, 2.5, false);
                            this.RowCBA.InsertRange(RowCBA.Count, new ISquareTypes[] { CBA1, CBA2, CBA3, CBA4 });

                            FlammableSquare CBB1 = new FlammableSquare("CBB1", Resources.EasyBoard1B1, 2);
                            Square CBB2 = new Square("CBB2", Resources.EasyBoard1B2);
                            FlammableSquare CBB3 = new FlammableSquare("CBB3", Resources.EasyBoard1B3, 4);
                            Square CBB4 = new Square("CBB4", Resources.EasyBoard1B4);
                            this.RowCBB.InsertRange(RowCBB.Count, new ISquareTypes[] { CBB1, CBB2, CBB3, CBB4 });

                            Square CBC1 = new Square("CBC1", Resources.EasyBoard1C1);
                            Square CBC2 = new Square("CBC2", Resources.EasyBoard1C2);
                            FlammableSquare CBC3 = new FlammableSquare("CBC3", Resources.EasyBoard1C3, 3);
                            FlammableSquare CBC4 = new FlammableSquare("CBC4", Resources.EasyBoard1C4, 3);
                            this.RowCBC.InsertRange(RowCBC.Count, new ISquareTypes[] { CBC1, CBC2, CBC3, CBC4 });

                            Square CBD1 = new Square("CBD1", Resources.EasyBoard1D1, 2.5, 2.5, false);
                            Square CBD2 = new Square("CBD2", Resources.EasyBoard1D2);
                            Square CBD3 = new Square("CBD3", Resources.EasyBoard1D3);
                            FlammableSquare CBD4 = new FlammableSquare("CBD4", Resources.EasyBoard1D4, 2);
                            this.RowCBD.InsertRange(RowCBD.Count, new ISquareTypes[] { CBD1, CBD2, CBD3, CBD4 });

                            this.RandomizerSquares.InsertRange(this.RandomizerSquares.Count, new FlammableSquare[] { CBA1, CBA2, CBA3, CBB1, CBB3, CBC3, CBC4, CBD4 });

                            //Create large buildings.
                            List<FlammableSquare> EasyBoard1LB1Squares = new List<FlammableSquare>();
                            EasyBoard1LB1Squares.Add(CBA1);
                            EasyBoard1LB1Squares.Add(CBB1);
                            Building EasyBoard1LB1 = new Building(2, EasyBoard1LB1Squares);

                            List<FlammableSquare> EasyBoard1LB2Squares = new List<FlammableSquare>();
                            EasyBoard1LB2Squares.Add(CBC4);
                            EasyBoard1LB2Squares.Add(CBD4);
                            Building EasyBoard1LB2 = new Building(2, EasyBoard1LB2Squares);

                            this.LargeBuildings.Add(EasyBoard1LB1);
                            this.LargeBuildings.Add(EasyBoard1LB2);

                            break;
                        }

                    case "Easy Board 2":
                        {
                            FlammableSquare CBA1 = new FlammableSquare("CBA1", Resources.EasyBoard2A1, 2);
                            FlammableSquare CBA2 = new FlammableSquare("CBA2", Resources.EasyBoard2A2, 3);
                            Square CBA3 = new Square("CBA3", Resources.EasyBoard2A3);
                            Square CBA4 = new Square("CBA4", Resources.EasyBoard2A4, 2.5, 2.5, false);
                            this.RowCBA.InsertRange(RowCBA.Count, new ISquareTypes[] { CBA1, CBA2, CBA3, CBA4 });

                            Square CBB1 = new Square("CBB1", Resources.EasyBoard2B1);
                            FlammableSquare CBB2 = new FlammableSquare("CBB2", Resources.EasyBoard2B2, 4);
                            FlammableSquare CBB3 = new FlammableSquare("CBB3", Resources.EasyBoard2B3, 4);
                            Square CBB4 = new Square("CBB4", Resources.EasyBoard2B4);
                            this.RowCBB.InsertRange(RowCBB.Count, new ISquareTypes[] { CBB1, CBB2, CBB3, CBB4 });

                            Square CBC1 = new Square("CBC1", Resources.EasyBoard2C1);
                            Square CBC2 = new Square("CBC2", Resources.EasyBoard2C2);
                            FlammableSquare CBC3 = new FlammableSquare("CBC3", Resources.EasyBoard2C3, 4);
                            Square CBC4 = new Square("CBC4", Resources.EasyBoard2C4);
                            this.RowCBC.InsertRange(RowCBC.Count, new ISquareTypes[] { CBC1, CBC2, CBC3, CBC4 });

                            Square CBD1 = new Square("CBD1", Resources.EasyBoard2D1, 2.5, 2.5, false);
                            FlammableSquare CBD2 = new FlammableSquare("CBD2", Resources.EasyBoard2D2, 2);
                            FlammableSquare CBD3 = new FlammableSquare("CBD3", Resources.EasyBoard2D3, 3);
                            FlammableSquare CBD4 = new FlammableSquare("CBD4", Resources.EasyBoard2D4, 2);
                            this.RowCBD.InsertRange(RowCBD.Count, new ISquareTypes[] { CBD1, CBD2, CBD3, CBD4 });

                            this.RandomizerSquares.InsertRange(this.RandomizerSquares.Count, new FlammableSquare[] { CBA1, CBA2, CBB2, CBB3, CBC3, CBD2, CBD3, CBD4 });

                            //Create large buildings.
                            List<FlammableSquare> EasyBoard2LB1Squares = new List<FlammableSquare>();
                            EasyBoard2LB1Squares.Add(CBA1);
                            EasyBoard2LB1Squares.Add(CBA2);
                            Building EasyBoard2LB1 = new Building(2, EasyBoard2LB1Squares);

                            List<FlammableSquare> EasyBoard2LB2Squares = new List<FlammableSquare>();
                            EasyBoard2LB2Squares.Add(CBD2);
                            EasyBoard2LB2Squares.Add(CBD3);
                            EasyBoard2LB2Squares.Add(CBD4);
                            Building EasyBoard2LB2 = new Building(3, EasyBoard2LB2Squares);

                            this.LargeBuildings.Add(EasyBoard2LB1);
                            this.LargeBuildings.Add(EasyBoard2LB2);

                            break;
                        }

                    case "Funky":
                        {
                            FlammableSquare CBA1 = new FlammableSquare("CBA1", Resources.FunkyA1, 3);
                            FlammableSquare CBA2 = new FlammableSquare("CBA2", Resources.FunkyA2, 3);
                            Square CBA3 = new Square("CBA3", Resources.FunkyA3);
                            Square CBA4 = new Square("CBA4", Resources.FunkyA4);
                            this.RowCBA.InsertRange(RowCBA.Count, new ISquareTypes[] { CBA1, CBA2, CBA3, CBA4 });

                            FlammableSquare CBB1 = new FlammableSquare("CBB1", Resources.FunkyB1, 3);
                            FlammableSquare CBB2 = new FlammableSquare("CBB2", Resources.FunkyB2, 3);
                            FlammableSquare CBB3 = new FlammableSquare("CBB3", Resources.FunkyB3, 4);
                            FlammableSquare CBB4 = new FlammableSquare("CBB4", Resources.FunkyB4, 3);
                            this.RowCBB.InsertRange(RowCBB.Count, new ISquareTypes[] { CBB1, CBB2, CBB3, CBB4 });

                            FlammableSquare CBC1 = new FlammableSquare("CBC1", Resources.FunkyC1, 2);
                            Square CBC2 = new Square("CBC2", Resources.FunkyC2);
                            FlammableSquare CBC3 = new FlammableSquare("CBC3", Resources.FunkyC3, 4);
                            Square CBC4 = new Square("CBC4", Resources.FunkyC4);
                            this.RowCBC.InsertRange(RowCBC.Count, new ISquareTypes[] { CBC1, CBC2, CBC3, CBC4 });

                            Square CBD1 = new Square("CBD1", Resources.FunkyD1, 2.5, 2.5, false);
                            Square CBD2 = new Square("CBD2", Resources.FunkyD2);
                            Square CBD3 = new Square("CBD3", Resources.FunkyD3);
                            Square CBD4 = new Square("CBD4", Resources.FunkyD4, 2.5, 2.5, false);
                            this.RowCBD.InsertRange(RowCBD.Count, new ISquareTypes[] { CBD1, CBD2, CBD3, CBD4 });

                            this.RandomizerSquares.InsertRange(this.RandomizerSquares.Count, new FlammableSquare[] { CBA1, CBA2, CBB1, CBB2, CBB3, CBB4, CBC1, CBC3 });

                            //Create large buildings.
                            List<FlammableSquare> FunkyLB1Squares = new List<FlammableSquare>();
                            FunkyLB1Squares.Add(CBB1);
                            FunkyLB1Squares.Add(CBC1);
                            Building FunkyLB1 = new Building(2, FunkyLB1Squares);

                            List<FlammableSquare> FunkyLB2Squares = new List<FlammableSquare>();
                            FunkyLB2Squares.Add(CBB3);
                            FunkyLB2Squares.Add(CBB4);
                            FunkyLB2Squares.Add(CBC3);
                            Building FunkyLB2 = new Building(3, FunkyLB2Squares);

                            this.LargeBuildings.Add(FunkyLB1);
                            this.LargeBuildings.Add(FunkyLB2);

                            break;
                        }

                    case "L Shaped":
                        {
                            FlammableSquare CBA1 = new FlammableSquare("CBA1", Resources.L_ShapedA1, 2);
                            Square CBA2 = new Square("CBA2", Resources.L_ShapedA2);
                            Square CBA3 = new Square("CBA3", Resources.L_ShapedA3, 2.5, 2.5, false);
                            Square CBA4 = new Square("CBA4", Resources.L_ShapedA4);
                            this.RowCBA.InsertRange(RowCBA.Count, new ISquareTypes[] { CBA1, CBA2, CBA3, CBA4 });

                            FlammableSquare CBB1 = new FlammableSquare("CBB1", Resources.L_ShapedB1, 4);
                            FlammableSquare CBB2 = new FlammableSquare("CBB2", Resources.L_ShapedB2, 3);
                            Square CBB3 = new Square("CBB3", Resources.L_ShapedB3);
                            Square CBB4 = new Square("CBB4", Resources.L_ShapedB4);
                            this.RowCBB.InsertRange(RowCBB.Count, new ISquareTypes[] { CBB1, CBB2, CBB3, CBB4 });

                            FlammableSquare CBC1 = new FlammableSquare("CBC1", Resources.L_ShapedC1, 3);
                            FlammableSquare CBC2 = new FlammableSquare("CBC2", Resources.L_ShapedC2, 3);
                            Square CBC3 = new Square("CBC3", Resources.L_ShapedC3);
                            Square CBC4 = new Square("CBC4", Resources.L_ShapedC4);
                            this.RowCBC.InsertRange(RowCBC.Count, new ISquareTypes[] { CBC1, CBC2, CBC3, CBC4 });

                            FlammableSquare CBD1 = new FlammableSquare("CBD1", Resources.L_ShapedD1, 3);
                            FlammableSquare CBD2 = new FlammableSquare("CBD2", Resources.L_ShapedD2, 4);
                            FlammableSquare CBD3 = new FlammableSquare("CBD3", Resources.L_ShapedD3, 2);
                            Square CBD4 = new Square("CBD4", Resources.L_ShapedD4, 2.5, 2.5, false);
                            this.RowCBD.InsertRange(RowCBD.Count, new ISquareTypes[] { CBD1, CBD2, CBD3, CBD4 });

                            this.RandomizerSquares.InsertRange(this.RandomizerSquares.Count, new FlammableSquare[] { CBA1, CBB1, CBB2, CBC1, CBC2, CBD1, CBD2, CBD3 });

                            //Create large buildings.
                            List<FlammableSquare> LShapedLB1Squares = new List<FlammableSquare>();
                            LShapedLB1Squares.Add(CBA1);
                            LShapedLB1Squares.Add(CBB1);
                            Building LShapedLB1 = new Building(2, LShapedLB1Squares);

                            List<FlammableSquare> LShapedLB2Squares = new List<FlammableSquare>();
                            LShapedLB2Squares.Add(CBD2);
                            LShapedLB2Squares.Add(CBD3);
                            Building LShapedLB2 = new Building(2, LShapedLB2Squares);

                            this.LargeBuildings.Add(LShapedLB1);
                            this.LargeBuildings.Add(LShapedLB2);

                            break;
                        }
                    case "Monster":
                        {
                            Square CBA1 = new Square("CBA1", Resources.MonsterA1, 2.5, 2.5, false);
                            FlammableSquare CBA2 = new FlammableSquare("CBA2", Resources.MonsterA2, 3);
                            FlammableSquare CBA3 = new FlammableSquare("CBA3", Resources.MonsterA3, 3);
                            Square CBA4 = new Square("CBA4", Resources.MonsterA4);
                            this.RowCBA.InsertRange(RowCBA.Count, new ISquareTypes[] { CBA1, CBA2, CBA3, CBA4 });

                            Square CBB1 = new Square("CBB1", Resources.MonsterB1);
                            FlammableSquare CBB2 = new FlammableSquare("CBB2", Resources.MonsterB2, 3);
                            FlammableSquare CBB3 = new FlammableSquare("CBB3", Resources.MonsterB3, 3);
                            Square CBB4 = new Square("CBB4", Resources.MonsterB4);
                            this.RowCBB.InsertRange(RowCBB.Count, new ISquareTypes[] { CBB1, CBB2, CBB3, CBB4 });

                            Square CBC1 = new Square("CBC1", Resources.MonsterC1);
                            Square CBC2 = new Square("CBC2", Resources.MonsterC2);
                            FlammableSquare CBC3 = new FlammableSquare("CBC3", Resources.MonsterC3, 3);
                            FlammableSquare CBC4 = new FlammableSquare("CBC4", Resources.MonsterC4, 3);
                            this.RowCBC.InsertRange(RowCBC.Count, new ISquareTypes[] { CBC1, CBC2, CBC3, CBC4 });

                            Square CBD1 = new Square("CBD1", Resources.MonsterD1, 2.5, 2.5, false);
                            Square CBD2 = new Square("CBD2", Resources.MonsterD2);
                            FlammableSquare CBD3 = new FlammableSquare("CBD3", Resources.MonsterD3, 3);
                            FlammableSquare CBD4 = new FlammableSquare("CBD4", Resources.MonsterD4, 3);
                            this.RowCBD.InsertRange(RowCBD.Count, new ISquareTypes[] { CBD1, CBD2, CBD3, CBD4 });

                            this.RandomizerSquares.InsertRange(this.RandomizerSquares.Count, new FlammableSquare[] { CBA2, CBA3, CBB2, CBB3, CBC3, CBC4, CBD3, CBD4 });

                            //Create large buildings.
                            List<FlammableSquare> MonsterLB1Squares = new List<FlammableSquare>();
                            MonsterLB1Squares.Add(CBB3);
                            MonsterLB1Squares.Add(CBC3);
                            Building MonsterLB1 = new Building(2, MonsterLB1Squares);

                            this.LargeBuildings.Add(MonsterLB1);

                            break;
                        }
                    case "Up In Flames":
                        {
                            Square CBA1 = new Square("CBA1", Resources.UpInFlamesA1, 2.5, 2.5, false);
                            Square CBA2 = new Square("CBA2", Resources.UpInFlamesA2);
                            FlammableSquare CBA3 = new FlammableSquare("CBA3", Resources.UpInFlamesA3, 2);
                            Square CBA4 = new Square("CBA4", Resources.UpInFlamesA4);
                            this.RowCBA.InsertRange(RowCBA.Count, new ISquareTypes[] { CBA1, CBA2, CBA3, CBA4 });

                            Square CBB1 = new Square("CBB1", Resources.UpInFlamesB1);
                            FlammableSquare CBB2 = new FlammableSquare("CBB2", Resources.UpInFlamesB2, 3);
                            FlammableSquare CBB3 = new FlammableSquare("CBB3", Resources.UpInFlamesB3, 4);
                            FlammableSquare CBB4 = new FlammableSquare("CBB4", Resources.UpInFlamesB4, 3);
                            this.RowCBB.InsertRange(RowCBB.Count, new ISquareTypes[] { CBB1, CBB2, CBB3, CBB4 });

                            Square CBC1 = new Square("CBC1", Resources.UpInFlamesC1);
                            FlammableSquare CBC2 = new FlammableSquare("CBC2", Resources.UpInFlamesC2, 3);
                            FlammableSquare CBC3 = new FlammableSquare("CBC3", Resources.UpInFlamesC3, 4);
                            FlammableSquare CBC4 = new FlammableSquare("CBC4", Resources.UpInFlamesC4, 3);
                            this.RowCBC.InsertRange(RowCBC.Count, new ISquareTypes[] { CBC1, CBC2, CBC3, CBC4 });

                            Square CBD1 = new Square("CBD1", Resources.UpInFlamesD1, 2.5, 2.5, false);
                            Square CBD2 = new Square("CBD2", Resources.UpInFlamesD2);
                            FlammableSquare CBD3 = new FlammableSquare("CBD3", Resources.UpInFlamesD3, 2);
                            Square CBD4 = new Square("CBD4", Resources.UpInFlamesD4);
                            this.RowCBD.InsertRange(RowCBD.Count, new ISquareTypes[] { CBD1, CBD2, CBD3, CBD4 });

                            this.RandomizerSquares.InsertRange(this.RandomizerSquares.Count, new FlammableSquare[] { CBA3, CBB2, CBB3, CBB4, CBC2, CBC3, CBC4, CBD3 });

                            //Create large buildings.
                            List<FlammableSquare> UIFLB1Squares = new List<FlammableSquare>();
                            UIFLB1Squares.Add(CBA3);
                            UIFLB1Squares.Add(CBB3);
                            Building UIFLB1 = new Building(2, UIFLB1Squares);

                            List<FlammableSquare> UIFLB2Squares = new List<FlammableSquare>();
                            UIFLB2Squares.Add(CBC3);
                            UIFLB2Squares.Add(CBD3);
                            Building UIFLB2 = new Building(2, UIFLB2Squares);

                            this.LargeBuildings.Add(UIFLB1);
                            this.LargeBuildings.Add(UIFLB2);

                            break;
                        }

                }
            }
            catch(Exception e)
            {
                MessageBox.Show(e.ToString());
            }
        }
Exemplo n.º 2
0
        public Board(string CB1, string CB2, string CB3 = null, string CB4 = null)
        {
            //Get the block string names.
            this.CB1Name = CB1;
            this.CB2Name = CB2;
            this.CB3Name = CB3;
            this.CB4Name = CB4;

            //Create new City Block objects.
            Block Block1 = new Block(CB1Name);
            this.BlocksInPlay.Add(Block1);
            Block1.BlockNumber = 1;
            this.Block1Randoms = Block1.GetRandomizerNumbers();
            Block Block2 = new Block(CB2Name);
            this.BlocksInPlay.Add(Block2);
            Block2.BlockNumber = 2;
            this.Block2Randoms = Block2.GetRandomizerNumbers();

            //If we don't have the block names, we're playing 2 or three player.
            //Initialize some blocks according to player number.

            if (CB3 == null)
            {
                this.numBoards = 2;
            }
            else if (CB4 == null && CB3 != null)
            {
                this.numBoards = 3;

                Block Block3 = new Block(CB3Name);
                this.BlocksInPlay.Add(Block3);
                Block3.BlockNumber = 3;
                this.Block3Randoms = Block3.GetRandomizerNumbers();
                this.Block3SquaresA = Block3.GetRowA();
                this.Block3SquaresB = Block3.GetRowB();
                this.Block3SquaresC = Block3.GetRowC();
                this.Block3SquaresD = Block3.GetRowD();

                this.RenameBlock(this.Block3SquaresA, 2, "G");
                this.RenameBlock(this.Block3SquaresB, 2, "H");
                this.RenameBlock(this.Block3SquaresC, 2, "I");
                this.RenameBlock(this.Block3SquaresD, 2, "J");

            }
            else
            {
                this.numBoards = 4;

                Block Block3 = new Block(CB3Name);
                this.BlocksInPlay.Add(Block3);
                Block3.BlockNumber = 3;
                this.Block3Randoms = Block3.GetRandomizerNumbers();
                this.Block3SquaresA = Block3.GetRowA();
                this.Block3SquaresB = Block3.GetRowB();
                this.Block3SquaresC = Block3.GetRowC();
                this.Block3SquaresD = Block3.GetRowD();

                this.RenameBlock(this.Block3SquaresA, 2, "G");
                this.RenameBlock(this.Block3SquaresB, 2, "H");
                this.RenameBlock(this.Block3SquaresC, 2, "I");
                this.RenameBlock(this.Block3SquaresD, 2, "J");

                Block Block4 = new Block(CB4Name);
                this.BlocksInPlay.Add(Block4);
                Block4.BlockNumber = 4;
                this.Block4Randoms = Block4.GetRandomizerNumbers();
                this.Block4SquaresA = Block4.GetRowA();
                this.Block4SquaresB = Block4.GetRowB();
                this.Block4SquaresC = Block4.GetRowC();
                this.Block4SquaresD = Block4.GetRowD();

                this.RenameBlock(this.Block4SquaresA, 7, "G");
                this.RenameBlock(this.Block4SquaresB, 7, "H");
                this.RenameBlock(this.Block4SquaresC, 7, "I");
                this.RenameBlock(this.Block4SquaresD, 7, "J");
            }

            //Get layouts from the City Blocks we're going to use.
            this.Block1SquaresA = Block1.GetRowA();
            this.Block1SquaresB = Block1.GetRowB();
            this.Block1SquaresC = Block1.GetRowC();
            this.Block1SquaresD = Block1.GetRowD();

            this.RenameBlock(this.Block1SquaresA, 2, "B");
            this.RenameBlock(this.Block1SquaresB, 2, "C");
            this.RenameBlock(this.Block1SquaresC, 2, "D");
            this.RenameBlock(this.Block1SquaresD, 2, "E");

            this.Block2SquaresA = Block2.GetRowA();
            this.Block2SquaresB = Block2.GetRowB();
            this.Block2SquaresC = Block2.GetRowC();
            this.Block2SquaresD = Block2.GetRowD();

            this.RenameBlock(this.Block2SquaresA, 7, "B");
            this.RenameBlock(this.Block2SquaresB, 7, "C");
            this.RenameBlock(this.Block2SquaresC, 7, "D");
            this.RenameBlock(this.Block2SquaresD, 7, "E");

            //Create the squares.

            //Firehouses, West, East, South, North
            Square FW = new Square("FW", Resources.FW, 2.5, 2.5, true, false, true);
            Square FE = new Square("FE", Resources.FE, 2.5, 2.5, true, false, true);
            Square FS = new Square("FS", Resources.FS, 2.5, 2.5, true, false, true);
            Square FN = new Square("FN", Resources.FN, 2.5, 2.5, true, false, true);

            switch (this.numBoards)
            {
                case 2:
                    {
                        this.FHs.InsertRange(FHs.Count, new ISquareTypes[] { FW, FE });
                        break;
                    }
                case 3:
                    {
                        this.FHs.InsertRange(FHs.Count, new ISquareTypes[] { FW, FE, FS });
                        break;
                    }
                case 4:
                    {
                        this.FHs.InsertRange(FHs.Count, new ISquareTypes[] { FW, FE, FS, FN });
                        break;
                    }
            }

            //Row A. Top row. No flammable squares.
            Square A1 = new Square("A1", Resources._0_1);
            Square A2 = new Square("A2", Resources._1_1);
            Square A3 = new Square("A3", Resources._2_1);
            Square A4 = new Square("A4", Resources._3_1);
            Square A5 = new Square("A5", Resources._4_1);
            Square A6 = new Square("A6", Resources._5_1);
            Square A7 = new Square("A7", Resources._6_1);
            Square A8 = new Square("A8", Resources._7_1);
            Square A9 = new Square("A9", Resources._8_1);
            Square A10 = new Square("A10", Resources._9_1);
            Square A11 = new Square("A11", Resources._10_1);

            this.RowA.InsertRange(RowA.Count, new ISquareTypes[] { A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11 });

            //Row B. Begin flammable squares now.
            Square B1 = new Square("B1", Resources._0_2);
            Square B6 = new Square("B6", Resources._5_2);
            Square B11 = new Square("B11", Resources._10_2);
            this.RowB.InsertRange(RowB.Count, new ISquareTypes[] { B1, this.Block1SquaresA[0], this.Block1SquaresA[1], this.Block1SquaresA[2], this.Block1SquaresA[3], B6, this.Block2SquaresA[0], this.Block2SquaresA[1], this.Block2SquaresA[2], this.Block2SquaresA[3], B11});

            //Row C.
            Square C1 = new Square("C1", Resources._0_3);
            Square C6 = new Square("C2", Resources._5_3);
            Square C11 = new Square("C3", Resources._10_3);
            this.RowC.InsertRange(RowC.Count, new ISquareTypes[] { C1, this.Block1SquaresB[0], this.Block1SquaresB[1], this.Block1SquaresB[2], this.Block1SquaresB[3], C6, this.Block2SquaresB[0], this.Block2SquaresB[1], this.Block2SquaresB[2], this.Block2SquaresB[3], C11 });

            //Row D.
            Square D1 = new Square("D1", Resources._0_4);
            Square D6 = new Square("D6", Resources._5_4);
            Square D11 = new Square("D11", Resources._10_4);
            this.RowD.InsertRange(RowD.Count, new ISquareTypes[] { D1, this.Block1SquaresC[0], this.Block1SquaresC[1], this.Block1SquaresC[2], this.Block1SquaresC[3], D6, this.Block2SquaresC[0], this.Block2SquaresC[1], this.Block2SquaresC[2], this.Block2SquaresC[3], D11 });

            //Row E.
            Square E1 = new Square("E1", Resources._0_5);
            Square E6 = new Square("E6", Resources._5_5);
            Square E11 = new Square("E11", Resources._10_5);
            this.RowE.InsertRange(RowE.Count, new ISquareTypes[] { E1, this.Block1SquaresD[0], this.Block1SquaresD[1], this.Block1SquaresD[2], this.Block1SquaresD[3], E6, this.Block2SquaresD[0], this.Block2SquaresD[1], this.Block2SquaresD[2], this.Block2SquaresD[3], E11 });

            //Row F.
            Square F1 = new Square("F1", Resources._0_6);
            Square F2 = new Square("F2", Resources._1_6);
            Square F3 = new Square("F3", Resources._2_6);
            Square F4 = new Square("F4", Resources._3_6);
            Square F5 = new Square("F5", Resources._4_6);
            Square F6 = new Square("F6", Resources._5_6);
            Square F7 = new Square("F7", Resources._6_6);
            Square F8 = new Square("F8", Resources._7_6);
            Square F9 = new Square("F9", Resources._8_6);
            Square F10 = new Square("F10", Resources._9_6);
            Square F11 = new Square("F11", Resources._10_6);
            this.RowF.InsertRange(RowF.Count, new ISquareTypes[] { F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11 });

            //Row G.
            if (this.numBoards > 2)
            {
                Square G1 = new Square("G1", Resources._0_7);
                Square G6 = new Square("G6", Resources._5_7);
                Square G11 = new Square("G11", Resources._10_7);
                this.RowG.InsertRange(RowG.Count, new ISquareTypes[] { G1, this.Block3SquaresA[0], this.Block3SquaresA[1], this.Block3SquaresA[2], this.Block3SquaresA[3], G6 });

                //4 Players
                if (this.numBoards > 3)
                {
                    this.RowG.InsertRange(RowG.Count, new ISquareTypes[] { this.Block4SquaresA[0], this.Block4SquaresA[1], this.Block4SquaresA[2], this.Block4SquaresA[3], G11 });
                }
            }

            //Row H.
            if (this.numBoards > 2)
            {
                Square H1 = new Square("H1", Resources._0_8);
                Square H6 = new Square("H6", Resources._5_8);
                Square H11 = new Square("H11", Resources._10_8);
                this.RowH.InsertRange(RowH.Count, new ISquareTypes[] { H1, this.Block3SquaresB[0], this.Block3SquaresB[1], this.Block3SquaresB[2], this.Block3SquaresB[3], H6 });

                //4 Players
                if (this.numBoards > 3)
                {
                    this.RowH.InsertRange(RowH.Count, new ISquareTypes[] { this.Block4SquaresB[0], this.Block4SquaresB[1], this.Block4SquaresB[2], this.Block4SquaresB[3], H11 });
                }
            }

            //Row I.
            if (this.numBoards > 2)
            {
                Square I1 = new Square("I1", Resources._0_9);
                Square I6 = new Square("I6", Resources._5_9);
                Square I11 = new Square("I11", Resources._10_9);
                this.RowI.InsertRange(RowI.Count, new ISquareTypes[] { I1, this.Block3SquaresC[0], this.Block3SquaresC[1], this.Block3SquaresC[2], this.Block3SquaresC[3], I6 });

                //4 Players
                if (this.numBoards > 3)
                {
                    this.RowI.InsertRange(RowI.Count, new ISquareTypes[] { this.Block4SquaresC[0], this.Block4SquaresC[1], this.Block4SquaresC[2], this.Block4SquaresC[3], I11 });
                }
            }

            //Row J.
            if (this.numBoards > 2)
            {
                Square J1 = new Square("J1", Resources._0_10);
                Square J6 = new Square("J6", Resources._5_10);
                Square J11 = new Square("J11", Resources._10_10);
                this.RowJ.InsertRange(RowJ.Count, new ISquareTypes[] { J1, this.Block3SquaresD[0], this.Block3SquaresD[1], this.Block3SquaresD[2], this.Block3SquaresD[3], J6 });

                //4 Players
                if (this.numBoards > 3)
                {
                    this.RowJ.InsertRange(RowJ.Count, new ISquareTypes[] { this.Block4SquaresD[0], this.Block4SquaresD[1], this.Block4SquaresD[2], this.Block4SquaresD[3], J11 });
                }
            }

            //Row K.
            if (this.numBoards > 2)
            {
                Square K1 = new Square("K1", Resources._0_11);
                Square K2 = new Square("K2", Resources._1_11);
                Square K3 = new Square("K3", Resources._2_11);
                Square K4 = new Square("K4", Resources._3_11);
                Square K5 = new Square("K5", Resources._4_11);
                Square K6 = new Square("K6", Resources._5_11);

                this.RowK.InsertRange(RowK.Count, new ISquareTypes[] { K1, K2, K3, K4, K5, K6 });

                //4 Players ONLY
                if (this.numBoards == 4)
                {
                    Square K7 = new Square("K7", Resources._6_11);
                    Square K8 = new Square("K8", Resources._7_11);
                    Square K9 = new Square("K9", Resources._8_11);
                    Square K10 = new Square("K10", Resources._9_11);
                    Square K11 = new Square("K11", Resources._10_11);
                    this.RowK.InsertRange(RowK.Count, new ISquareTypes[] { K7, K8, K9, K10, K11 });
                }
            }

            //Now let's add these rows to the board.
            this.NewBoard.Add(RowA);
            this.NewBoard.Add(RowB);
            this.NewBoard.Add(RowC);
            this.NewBoard.Add(RowD);
            this.NewBoard.Add(RowE);
            this.NewBoard.Add(RowF);

            if (this.numBoards > 2)
            {
                this.NewBoard.Add(RowG);
                this.NewBoard.Add(RowH);
                this.NewBoard.Add(RowI);
                this.NewBoard.Add(RowJ);
                this.NewBoard.Add(RowK);
            }

            //Tell the squares which squares are around them.
            this.FindNeighbors();

            //Assign each square its neighboring squares.
            this.AssignNeighbors();
        }