示例#1
0
        /// <summary>
        /// Initialize a new MapElement
        /// </summary>
        /// <param name="x">X size of the map (in square)</param>
        /// <param name="y">Y size of the map (in square)</param>
        public MapElements(int x, int y)
        {
            this.SizeX = x;
            this.SizeY = y;
            this.Board = new SquareProxy[x][];
            this.Score = new ScoreInfoProxy();

            for (var i = 0; i < x; i++)
            {
                this.Board[i] = new SquareProxy[y];
                for (var j = 0; j < y; j++)
                {
                    this.Board[i][j] = new SquareProxy();
                }
            }
            this.Bombset = new List<List<BombInfoProxy>> {new List<BombInfoProxy>()};
        }
示例#2
0
 /// <summary>
 /// Initialize a new MapElement by default
 /// </summary>
 public MapElements()
 {
     if (Score == null)
         Score = new ScoreInfoProxy();
 }