//private int questionCount; //private List<QuizAnswers> userAnswers; public QuizPlayerController(Quiz q) { quiz = q; if (quiz.getQuestions().Count == 0) { setATestQuiz(); } //setATestQuiz(); }
private void setATestQuiz() { quiz = new Quiz("My test quiz", 0, 0); for (int i = 0; i < 10; i++) { Question q = new Question("TEST1" + i, i, i, DateTime.Now); q.AddAnswer(new Answer("testMy test quizMy test quizMy test quizMy test quizMy test quizMy test quiztestMy test quizMy test quizMy test quizMy test quizMy test quizMy test quiztestMy test quizMy test quizMy test quizMy test quizMy test quizMy test quizMy test quizMy test quizMy test quizMy test quizMy test quizMy test quizMy test quizMy test quizMy test quizMy test quizMy test quizMy test quizMy test quizMy test quizMy test quiz" + i, true)); q.AddAnswer(new Answer("testMy test quizMy test quizMy test quizMy test quizMy test quizMy test quizMy test quizMy test quizMy test quizMy test quizMy test quizMy test quizMy test quizMy test quizMy test quizMy test quiz" + i, false)); q.AddAnswer(new Answer("test" + i, false)); q.AddAnswer(new Answer("testMy test quizMy test quizMy test quiz" + i, false)); q.AddAnswer(new Answer("testMy test quizMy test quizMy test quizMy test quizMy test quizMy test quizMy test quizMy test quizMy test quiz" + i, false)); q.AddAnswer(new Answer("testMy test quizMy test quizMy test quizMy test quizMy test quiz" + i, false)); q.AddAnswer(new Answer("testMy test quizMy test quizMy test quizMy test quiz" + i, false)); quiz.AddQuestion(q, 1); } }
public static void SetQuiz() { myQuiz = new Quiz(); myQuestion = new Question(); }
//δημιουργία καινούριου quiz public static void SetQuiz(string quizName, int subject, int user_id) { myQuiz = new Quiz(quizName, subject, user_id); }