コード例 #1
0
 public void StartGame()
 {
     for (int i = 1; i <= 4; i++)
     {
         CorrectAnswer.Add(i, random.Next(1, 7));
     }
 }
コード例 #2
0
        internal void FillDialog()
        {
            /* * 0 - content, 1 .. 5 - answer, 6 - points, 7 - id*/
            Name = QuestionString[0];
            for (int i = 0; i < 5; i++)
            {
                string[] splitted = QuestionString[i + 1].Split('_');
                if (splitted.Length == 2)
                {
                    Answers.Add(splitted[0]);
                    CorrectAnswer.Add(splitted[1] == "1" ? true : false);
                }
                else
                {
                    Answers.Add("");
                    CorrectAnswer.Add(false);
                }
            }

            Length = Int32.Parse(QuestionString[6].Replace("-", ""));
        }