예제 #1
0
        /// <summary>
        /// Get random phrase from phrasesContainer.
        /// Place it in the HangManGameWindow.
        /// Set the first image from statusImageManager.
        /// </summary>
        public void Init()
        {
            PhrasesContainer phrasesContainer = PhrasesContainer.Instance();

            phrase = phrasesContainer.RandomPhrase;
            PlacePhrase(phrase);
            statusImageManager.SetNextImage(StatusImage);
        }
예제 #2
0
 /// <summary>
 /// Singleton constructor method.
 /// </summary>
 /// <returns>Existing instance of PhrasesContainer or new instance if no instance already exists.</returns>
 public static PhrasesContainer Instance()
 {
     if (instance == null)
     {
         instance = new PhrasesContainer();
     }
     return(instance);
 }