コード例 #1
0
        public static SongFile GetInstance()
        {
            if (_instance == null)
            {
                _instance = new SongFile();
            }

            return(_instance);
        }
コード例 #2
0
        public Game()
        {
            // Initialize the random number generator
            _randomNumberGenerator = new Random();
            // Initialize the song file
            _theSongFile = SongFile.GetInstance();
            // Shuffle the songs
            ShuffleSongs();

            _currentGame = null;
            _songIndex   = -1;
        }