示例#1
0
        public MergeResult[,] GetExtendedMap(int[,] array)
        {
            var output = new MergeResult[this._size, this._size];

            for (var i = 0; i < this._size; i++)
            {
                for (var j = 0; j < this._size; j++)
                {
                    output[i, j] = GetTerrainEx(array, i, j);
                }
            }

            return(output);
        }
示例#2
0
        public MergeResult AddItem(XCell item, MergeResult mr)
        {
            if (item.Consider)
            {
                return(new MergeResult()
                {
                    Value = mr.Value + item.V,
                    SumItemsNew = mr.SumItemsNew,
                });
            }

            return(new MergeResult()
            {
                Value = mr.Value,
                SumItemsNew = --mr.SumItemsNew
            });
        }