コード例 #1
0
        private void Generate()
        {
            int randomNum = LFSR16.Random16();

            shiftCount      = LFSR16.GetFullCycleShiftCount(randomNum);
            shiftResults    = new int[shiftCount + 1];
            randomBox.Text  = randomNum.ToString();
            shiftResults[0] = randomNum;
            CalculateShift(randomNum);
        }
コード例 #2
0
        private void CalculateShift(int _num)
        {
            int shifted = LFSR16.Shift(_num);

            for (int i = 1; i <= shiftCount; i++)
            {
                shiftResults[i] = shifted;
                shifted         = LFSR16.Shift(shifted);
            }
        }