Esempio n. 1
0
        public QnABundle(Serialization.QnADataBundle data)
        {
            Category = data.category;
            QnAs     = new QnA[data.QnADatas.Length];

            //error handling?
            for (int i = 0; i < data.QnADatas.Length; i++)
            {
                QnAs[i] = new QnA(data.QnADatas[i]);
            }
        }
Esempio n. 2
0
        public void Shuffle()
        {
            var rng = new Random();
            int n   = QnAs.Length;

            while (n > 1)
            {
                int m = rng.Next(n);
                n--;
                QnA temp = QnAs[n];
                QnAs[n] = QnAs[m];
                QnAs[m] = temp;
            }
        }
Esempio n. 3
0
 public BeforeQuestionSelected(QnA QnA, QuestionCategory category)
 {
     this.QnA = QnA;
     Category = category;
 }