Beispiel #1
0
        public void DoRegistQuiz()
        {
            SQuiz pQuizNew = new SQuiz();

            pQuizNew.strQuizMaker = strQuizMaker;
            pQuizNew.strQuiz      = strQuiz;
            pQuizNew.strAnswer    = strAnswer;

            pQuizNew.strQuizLevel = nameof(EUserRole.지망생);
            pQuizNew = pQuizNew.DoInsert_ToDB();
            Program.listQuiz.Add(pQuizNew);
        }
        // ==================================================================================== //

        private SQuiz ProcGenerateQuiz(DiscordUser pUser)
        {
            System.Random pRandom      = new System.Random();
            int           iRandomIndex = pRandom.Next(0, Program.listQuiz.Count);
            SQuiz         pQuiz        = Program.listQuiz[iRandomIndex];

            pQuiz.DoAdd_QuizCount();

            _mapQuizPlayer.Add(pUser, pQuiz);

            return(pQuiz);
        }
 private bool TryGetPlayingQuiz(DiscordUser pUser, out SQuiz pQuiz)
 {
     return(_mapQuizPlayer.TryGetValue(pUser, out pQuiz));
 }