Exemple #1
0
        public Board()
        {
            squares = new Square[SquaresOnBoard];

            // Place the corner squares (GO, Jail etc)
            for (int i = 0; i < SquaresOnBoard - 1; i += 10)
            {
                squares[i] = new ActionSquare();
            }

            // Place the card squares.
            squares[2]  = new CardSquare();
            squares[7]  = new CardSquare();
            squares[17] = new CardSquare();
            squares[22] = new CardSquare();
            squares[33] = new CardSquare();
            squares[36] = new CardSquare();

            // Place the station squares.
            squares[5]  = new StationSquare();
            squares[15] = new StationSquare();
            squares[25] = new StationSquare();
            squares[35] = new StationSquare();

            // Place the utility squares.
            squares[12] = new UtilitySquare();
            squares[28] = new UtilitySquare();

            // Place the tax squares.
            squares[4]  = new ActionSquare();
            squares[38] = new ActionSquare();

            for (int i = 0; i < SquaresOnBoard; i++)
            {
                if (squares[i] == null)
                {
                    squares[i] = new StreetSquare();
                }
            }
        }
Exemple #2
0
        public Board()
        {
            squares = new Square[SquaresOnBoard];

            // Place the corner squares (GO, Jail etc)
            for (int i = 0; i < SquaresOnBoard - 1; i += 10)
            {
                squares[i] = new ActionSquare();
            }

            // Place the card squares.
            squares[2] = new CardSquare();
            squares[7] = new CardSquare();
            squares[17] = new CardSquare();
            squares[22] = new CardSquare();
            squares[33] = new CardSquare();
            squares[36] = new CardSquare();

            // Place the station squares.
            squares[5] = new StationSquare();
            squares[15] = new StationSquare();
            squares[25] = new StationSquare();
            squares[35] = new StationSquare();

            // Place the utility squares.
            squares[12] = new UtilitySquare();
            squares[28] = new UtilitySquare();

            // Place the tax squares.
            squares[4] = new ActionSquare();
            squares[38] = new ActionSquare();

            for (int i = 0; i < SquaresOnBoard; i++)
            {
                if(squares[i] == null)
                {
                    squares[i] = new StreetSquare();
                }
            }
        }