Пример #1
0
 public TTskSelector(TTskFreqList _parentCharFreqList, int _tskNo)
     : base(null, _tskNo)
 {
     parentCharFreqList = _parentCharFreqList;
     tskList            = new List <TTskRandom>();
     fTskCount          = 0;
 }
Пример #2
0
 public TRandom(TTskFreqList _parentCharFreqList, int _tskNo)
 {
     fFreqs = new TFreq(_parentCharFreqList, _tskNo);
     only   = new HashSet <int>();
     fChars = "";
     skip   = new TSkip();
 }
Пример #3
0
        public Game()
        {
            fLives        = new TLives();
            turnInt       = new TInterval();
            _FlyingScores = new ObservableCollection <FlyingScore>();
            fFreqList     = new TTskFreqList();
            fTaskBox      = new TTaskBox(this);
            SetMode(GameMode.GAME_OVER_ESC);

            xyDirs = new TXYDir[Direction.directions.Length];
            for (int i = 0; i < xyDirs.Length; i++)
            {
                xyDirs[i] = new TXYDir(Direction.directions[i]);
            }
            load();
            foreach (TTskSet tsk in cfg.tskSetsSpetial)
            {
                taskBox.tskProvider.tskSelector.tskAdd(tsk);
            }
        }
Пример #4
0
        public TTskRandom(TTskFreqList _parentCharFreqList, int _tskNo, string right, string left, bool _isAlone, Color _col, int _minLen, int _maxLen) : base(_parentCharFreqList, _tskNo)       //maxLen==0 - spetial chars
        {
            TCharFingers leftData, rightData, tempData;

            scanStr(left, 0, out leftData);
            scanStr(right, 5, out rightData);
            fingerNums = new Byte[leftData.Count + rightData.Count];
            if (leftData.Count > rightData.Count)
            {
                tempData  = rightData;
                rightData = leftData;
                leftData  = tempData;
            }
            string       allChars = "";
            TCharFingers pairs    = new TCharFingers();

            foreach (TCharFinger pair in rightData)
            {
                pairs.Clear();
                pairs.Enqueue(pair);
                if (leftData.Count > 0)
                {
                    pairs.Enqueue(leftData.Dequeue());
                }
                foreach (TCharFinger intPair in pairs)
                {
                    fingerNums[allChars.Length] = intPair.Value;
                    allChars += intPair.Key;
                }
            }
            chars   = allChars;
            col     = _col;
            isAlone = _isAlone;
            minLen  = _minLen;
            maxLen  = _maxLen;
            count   = 0;
        }
Пример #5
0
 public TRandom(string value, TTskFreqList _parentCharFreqList, int _tskNo)
     : this(_parentCharFreqList, _tskNo)
 {
     chars = value;
 }
Пример #6
0
 public TFreq(TTskFreqList _parentCharFreqList, int _tskNo)
 {
     parentCharFreqList = _parentCharFreqList;
     tskNo    = _tskNo;
     freqList = new TDoubleSortList();
 }