示例#1
0
        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();
        }
示例#2
0
 public void getPrevQuest()
 {
     currentQuestion = this.prevQuestions.Pop();
     if (this.prevQuestions.Count == 0)
     {
         this.buttonPrev.Enabled = false;
     }
     displayQuest();
 }
示例#3
0
 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();
 }
示例#4
0
 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>();
 }
示例#5
0
 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;
 }