Пример #1
0
void MakeThemeDictionary ( const string filename , const int maxLenght =
      MAX_WORD_LENGTH ) {
   myDict = ThemeDictionary( maxLenght , filename );
   myMenu.SetIntro(
         Banner() + HOW_MANY_WORDS
               + swansonString::GetString( myDict.NumWords() ) + " words!!!" );
   if ( !myDict.Filled() )
      usePreFabDict();
}
Пример #2
0
void PlainDict () {
   //Constructs a dict of MaxWordLength letter long words
   myDict = Dictionary( MAX_WORD_LENGTH );
   myMenu.SetIntro(
         Banner() + HOW_MANY_WORDS
               + swansonString::GetString( myDict.NumWords() ) + " words!!!" );

   if ( !myDict.Filled() )
      usePreFabDict();
}
Пример #3
0
void usePreFabDict () {
   myDict = Dictionary( PreFabDict::getSet() );

   myMenu.SetIntro(
         Banner() + HOW_MANY_WORDS
               + swansonString::GetString( myDict.NumWords() ) + " words!!!" );

   if ( myDict.Filled() ) {
      cout << endl
            << "something strange has happend, we had an empty dictionary"
            << " but don't worry, we can still play with my limited stored vocabulary";
      cout << endl << "press anything to continue:";
      getchar();
   } else {
      cout << endl
            << "something has gone very wrong here, we have no words, we cannot play";
      cout << endl << "press anything to exit:";
      exit( 1 );
   }
}
Пример #4
0
/**************************************************************
 *
 * * Entry: none
 *
 * * Exit: inflated dictionary with maxLength as its longest word(s)
 *
 * * Purpose: change word length to match difficulty
 *
 * ***************************************************************/
void SetDictionary ( int maxLength ) {
   myDict = Dictionary( maxLength );
   if ( !myDict.Filled() )
      myDict = PreFabDict::UsePreFabDict();
}