Exemplo n.º 1
0
        public Game(List <Question> l1, List <Question> l2, List <Question> l3)
        {
            InitializeComponent();
            richTextBox1.Hide();
            chart1.Hide();


            easylist   = new List <Question>(l1);
            mediumlist = new List <Question>(l2);
            hardlist   = new List <Question>(l3);

            /*
             * Question q11 = new Question("Proizvod od pcela ?", "Otok", "Med", "Mleko", "Sirenje","Med");
             * Question q12 = new Question("PRVI 5-2", "TOCNO", "gRESKA", "GRESKA", "greska", "TOCNO");
             * Question q13 = new Question("PRVI 5-3", "TOCNO", "gRESKA", "GRESKA", "greska", "TOCNO");
             * Question q14 = new Question("PRVI 5-4", "TOCNO", "gRESKA", "GRESKA", "greska", "TOCNO");
             * Question q15 = new Question("PRVI 5-5", "TOCNO", "gRESKA", "GRESKA", "greska", "TOCNO");
             * Question q21 = new Question("PRVI 10-1", "TOCNO", "gRESKA", "GRESKA", "greska", "TOCNO");
             * Question q22 = new Question("PRVI 10-2", "TOCNO", "gRESKA", "GRESKA", "greska", "TOCNO");
             * Question q23 = new Question("PRVI 10-3", "TOCNO", "gRESKA", "GRESKA", "greska", "TOCNO");
             * Question q24 = new Question("PRVI 10-4", "TOCNO", "gRESKA", "GRESKA", "greska", "TOCNO");
             * Question q25 = new Question("PRVI 10-5", "TOCNO", "gRESKA", "GRESKA", "greska", "TOCNO");
             * Question q31 = new Question("PRVI 15-1", "TOCNO", "gRESKA", "GRESKA", "greska", "TOCNO");
             * Question q32 = new Question("PRVI 15-2", "TOCNO", "gRESKA", "GRESKA", "greska", "TOCNO");
             * Question q33 = new Question("PRVI 15-3", "TOCNO", "gRESKA", "GRESKA", "greska", "TOCNO");
             * Question q34 = new Question("PRVI 15-4", "TOCNO", "gRESKA", "GRESKA", "greska", "TOCNO");
             * Question q35 = new Question("PRVI 15-5", "TOCNO", "gRESKA", "GRESKA", "greska", "TOCNO");
             * easylist.Add(q11);
             * easylist.Add(q12);
             * easylist.Add(q13);
             * easylist.Add(q14);
             * easylist.Add(q15);
             * mediumlist.Add(q21);
             * mediumlist.Add(q22);
             * mediumlist.Add(q23);
             * mediumlist.Add(q24);
             * mediumlist.Add(q25);
             * hardlist.Add(q31);
             * hardlist.Add(q32);
             * hardlist.Add(q33);
             * hardlist.Add(q34);
             * hardlist.Add(q35);
             */
            listBox1.SelectedIndex = 16 - CURRENT_Q;

            idx = Question.rand.Next(0, 5);
            q   = easylist.ElementAt(idx);
            shuffleAnswers();
            q.joker5050();
        }
Exemplo n.º 2
0
        public Game(List <Question> l1, List <Question> l2, List <Question> l3)
        {
            InitializeComponent();
            richTextBox1.Hide();
            chart1.Hide();
            audFriend.settings.setMode("loop", true);

            playBackgroundSong(1);

            easylist   = new List <Question>(l1);
            mediumlist = new List <Question>(l2);
            hardlist   = new List <Question>(l3);

            listBox1.SelectedIndex = 16 - CURRENT_Q;

            //idx = Question.rand.Next(0, l1.Count);
            //currentQuestion = easylist.ElementAt(idx);
            currentQuestion = getQuestion();
            shuffleAnswers();
            currentQuestion.joker5050();
        }
Exemplo n.º 3
0
        public void checkAnswerAfterTimer()
        {
            chart1.Hide();
            richTextBox1.Hide();
            string money = "";

            if (nextQ)
            {
                // if (listBox1.SelectedIndex == 1)
                //money = "you won 1 000 000 $";

                button1.BackgroundImage = Image.FromFile("C:\\Users\\Dragan\\Desktop\\SelectedVsNot.jpg");
                button2.BackgroundImage = Image.FromFile("C:\\Users\\Dragan\\Desktop\\SelectedVsNot.jpg");
                button3.BackgroundImage = Image.FromFile("C:\\Users\\Dragan\\Desktop\\SelectedVsNot.jpg");
                button4.BackgroundImage = Image.FromFile("C:\\Users\\Dragan\\Desktop\\SelectedVsNot.jpg");

                CURRENT_Q++;
                if (CURRENT_Q == 16)
                {
                    money = "You won a million !";
                    GameOver gameover = new GameOver(money);
                    gameover.ShowDialog();
                    return;
                }
                q = getQuestion();
                shuffleAnswers();
                q.joker5050();
                listBox1.SelectedIndex = 16 - CURRENT_Q;
            }
            //da ostane zeleno tocnoto prasanje
            else
            {
                if (whichBlink == 1)
                {
                    button1.BackgroundImage = Image.FromFile("C:\\Users\\Dragan\\Desktop\\Green3.jpg");
                }
                else if (whichBlink == 2)
                {
                    button2.BackgroundImage = Image.FromFile("C:\\Users\\Dragan\\Desktop\\Green3.jpg");
                }
                else if (whichBlink == 3)
                {
                    button3.BackgroundImage = Image.FromFile("C:\\Users\\Dragan\\Desktop\\Green3.jpg");
                }
                else
                {
                    button4.BackgroundImage = Image.FromFile("C:\\Users\\Dragan\\Desktop\\Green3.jpg");
                }



                if (listBox1.SelectedIndex + 1 <= 15)
                {
                    int idx = listBox1.SelectedIndex;
                    idx += 1;
                    if (CURRENT_Q < 6)
                    {
                        money += "Sorry, You won nothing";
                    }
                    else if (CURRENT_Q > 5 && CURRENT_Q < 11)
                    {
                        money += "             1000";
                    }
                    else if (CURRENT_Q <= 15)
                    {
                        money += "           32000";
                    }
                    money += " $";
                }
                else if (listBox1.SelectedIndex == 15)
                {
                    money = null;
                    money = "Sorry, You won nothing";
                }

                GameOver gameover = new GameOver(money);
                gameover.ShowDialog();
            }
        }
Exemplo n.º 4
0
        public void checkAnswerAfterTimer()
        {
            chart1.Hide();
            richTextBox1.Hide();
            string money = "";

            if (nextQ)
            {
                button1.BackgroundImage = Image.FromFile("SelectedVsNot.jpg");
                button2.BackgroundImage = Image.FromFile("SelectedVsNot.jpg");
                button3.BackgroundImage = Image.FromFile("SelectedVsNot.jpg");
                button4.BackgroundImage = Image.FromFile("SelectedVsNot.jpg");

                CURRENT_Q++;
                if (CURRENT_Q == 16)
                {
                    money = "Вие сте милионер !!!";
                    GameOver gameover = new GameOver(money);
                    bg.URL = "winner.mp3";
                    gameover.ShowDialog();

                    return;
                }

                if (CURRENT_Q == 6)
                {
                    answer.URL = "transition.mp3";
                    bg.controls.stop();
                    MessageBox.Show("Освоивте 5000 $");
                }
                if (CURRENT_Q == 11)
                {
                    answer.URL = "transition.mp3";
                    bg.controls.stop();
                    MessageBox.Show("Браво, освоивте 32000 $");
                }

                currentQuestion = getQuestion();
                shuffleAnswers();
                currentQuestion.joker5050();
                listBox1.SelectedIndex = 16 - CURRENT_Q;
            }

            else   //da ostane zeleno tocnoto prasanje
            {
                if (whichBlink == 1)
                {
                    button1.BackgroundImage = Image.FromFile("Green3.jpg");
                }
                else if (whichBlink == 2)
                {
                    button2.BackgroundImage = Image.FromFile("Green3.jpg");
                }
                else if (whichBlink == 3)
                {
                    button3.BackgroundImage = Image.FromFile("Green3.jpg");
                }
                else
                {
                    button4.BackgroundImage = Image.FromFile("Green3.jpg");
                }



                if (listBox1.SelectedIndex + 1 <= 15)
                {
                    int idx = listBox1.SelectedIndex;
                    idx += 1;
                    if (CURRENT_Q < 6)
                    {
                        money += "Sorry, You won nothing";
                    }
                    else if (CURRENT_Q > 5 && CURRENT_Q < 11)
                    {
                        money += "Congratz, You won 1000 $";
                    }
                    else if (CURRENT_Q <= 15)
                    {
                        money += "Congratz, You won 32000 $";
                    }
                }
                else if (listBox1.SelectedIndex == 15)
                {
                    money = null;
                    money = "Sorry, You won nothing";
                }

                GameOver gameover = new GameOver(money);
                bg.controls.stop();
                gameover.ShowDialog();
            }
        }