Example #1
0
        private void generateSquares()
        {
            squares     = new Square[numOfPlayers][];
            exitSquares = new ExitSquare[numOfPlayers][];

            for (int side = 0; side < numOfPlayers; side++)
            {
                squares[side] = new Square[numOfSquaresPerSide];
                for (int position = 0; position < numOfSquaresPerSide; position++)
                {
                    int squarePosition = position + (side * numOfSquaresPerSide);
                    squares[side][position] = new Square((Colors)side, squarePosition);
                }

                exitSquares[side] = new ExitSquare[numOfExitSquaresPerSide];
                for (int position = 0; position < numOfExitSquaresPerSide; position++)
                {
                    exitSquares[side][position] = new ExitSquare((Colors)side, position);
                }
            }
        }
Example #2
0
        private void generateSquares()
        {
            squares = new Square[numOfPlayers][];
            exitSquares = new ExitSquare[numOfPlayers][];

            for (int side = 0; side < numOfPlayers; side++)
            {
                squares[side] = new Square[numOfSquaresPerSide];
                for (int position = 0; position < numOfSquaresPerSide; position++)
                {
                    int squarePosition = position + (side * numOfSquaresPerSide);
                    squares[side][position] = new Square((Colors)side, squarePosition);
                }

                exitSquares[side] = new ExitSquare[numOfExitSquaresPerSide];
                for (int position = 0; position < numOfExitSquaresPerSide; position++)
                {
                    exitSquares[side][position] = new ExitSquare((Colors)side, position);
                }
            }
        }