public void getNextQuest() { if (currentQuestion != null) { this.prevQuestions.Push(currentQuestion); this.buttonPrev.Enabled = true; } currentQuestion = new MultiWordQuestion(); int minLen = 0; int maxLen = 0; switch (difficulty) { case 3: minLen = 8; maxLen = 20; break; case 2: minLen = 5; maxLen = 7; break; default: minLen = 0; maxLen = 4; break; } currentQuestion.Words = ag.getRandomWords(NUM_IMAGES, minLen, maxLen); currentQuestion.AnswerIndex = rnd.Next(NUM_IMAGES); displayQuest(); }
public void getPrevQuest() { currentQuestion = this.prevQuestions.Pop(); if (this.prevQuestions.Count == 0) { this.buttonPrev.Enabled = false; } displayQuest(); }
private void getNextQuest() { if (currentQuestion != null) { this.prevQuestions.Push(currentQuestion); this.buttonPrev.Enabled = true; } currentQuestion = new MultiWordQuestion(); currentQuestion.Words = ag.getRandomWords(NUM_IMAGES, azbukaGame.FirstLetterCondition.AllDifferent); currentQuestion.AnswerIndex = rnd.Next(NUM_IMAGES); displayQuest(); }
public Game4Form(azbukaGame game) { InitializeComponent(); ag = game; difficulty = 1; player = new SoundPlayer(); rnd = new Random(); img = null; failNum = 0; score = 0; currentQuestion = null; prevQuestions = new Stack <MultiWordQuestion>(); }
public Game3Form(azbukaGame game) { InitializeComponent(); ag = game; difficulty = 1; rnd = new Random(); images = new Image[NUM_IMAGES]; for (int i = 0; i < NUM_IMAGES; i++) { images[i] = null; } failNum = 0; score = 0; player = new SoundPlayer(); prevQuestions = new Stack <MultiWordQuestion>(); currentQuestion = null; }