/// <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); }
/// <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); }