예제 #1
0
 public void CreateOperater(EliminateResult eliminateResult, bool isInclined, int shouldLineMin, int shouldComboLineMax)
 {
     GridOperater = new GridOperater(eliminateResult)
     {
         LinedRules         = new ComboRule[] { },
         IsInclined         = isInclined,
         ShouldLineMin      = shouldLineMin,
         ShouldComboLineMax = shouldComboLineMax,
     };
 }
예제 #2
0
        public void Clean()
        {
            mGridProcesser?.Dispose();
            EliminateResult?.Dispose();
            mLinedRulesMapper?.Clear();
            mRearranger?.Clear();
            mOperatingGrids?.Clear();

            mGridProcesser    = default;
            EliminateResult   = default;
            mLinedRulesMapper = default;
            mRearranger       = default;
            mOperatingGrids   = default;
        }
예제 #3
0
        public GridOperater(EliminateResult eliminateResult)
        {
            EliminateResult   = eliminateResult;
            mLinedRulesMapper = new Dictionary <int, ComboRule>();
            mRearranger       = new GridsRearranger();

            mOperatingGrids = new List <ElimlnateGrid>();//TODO 这里保存的自动消除的功能数据需要再看看如何实现

            mSupplementSizeData = new KeyValueList <int, int>();
            mHigestInCols       = new KeyValueList <int, int>();
            mObstacleCols       = new KeyValueList <int, int>();
            mUpdateCols         = new Queue <GridUpdateInfo>();
            mObstacleIndes      = new List <int>();

            mGridProcesser = new QueueExecuter(false);
            mGridProcesser.OnUnitCompleted += OnGridProcessComplete;
        }