Ejemplo n.º 1
0
        //Create list of game options for the user
        private void createGameOptionList()
        {
            GameType option;                                                //Declare GameType object

            if (gameOptions == null)               //Instantiate list of GameTypes if it hasnt been already
            {
                gameOptions = new List<GameType>();
            }

            option = new GameType();                                //We then instantiate the GameType object, give its instance variable
            option.userChoice = " 4 Letter Word Jumble";            //(which is the variable we are binding) a value and add the 
            gameOptions.Add(option);                                //object to the list

            option = new GameType();
            option.userChoice = " 5 Letter Word Jumble";            //repeat this process for each game option
            gameOptions.Add(option);

            option = new GameType();
            option.userChoice = " 6 Letter Word Jumble";
            gameOptions.Add(option);

            option = new GameType();
            option.userChoice = " 7 Letter Word Jumble";
            gameOptions.Add(option);

            option = new GameType();
            option.userChoice = " High Scores Menu";
            gameOptions.Add(option);

        }//end createGameOptionList
        //Create list of high score options for the user
        private void createGameOptionList()
        {
            GameType option;                                        //Declare GameType object

            if (highscoreOptions == null)                       //Instantiate list of GameTypes if it hasnt been already
            {
                highscoreOptions = new List<GameType>();            //Instantiate done here
            }
            
            //We then instantiate the single GameType object, give its instance variable
            //(which is the variable we are binding) a value and add the 
            //object to the list
            option = new GameType();
            option.userChoice = " 4 Letter High Scores";
            highscoreOptions.Add(option);

            //Repeat the process for each high score option
            option = new GameType();
            option.userChoice = " 5 Letter High Scores";
            highscoreOptions.Add(option);

            option = new GameType();
            option.userChoice = " 6 Letter High Scores";
            highscoreOptions.Add(option);

            option = new GameType();
            option.userChoice = " 7 Letter High Scores";
            highscoreOptions.Add(option);
        }//end createGameOptionList()