/[eliot]/eliot/game/game_factory.cpp
ViewVC logotype

Diff of /eliot/game/game_factory.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5.2.2 by afrab, Sun Oct 23 18:44:43 2005 UTC revision 1.5.2.3 by ipkiss, Sun Oct 23 19:12:14 2005 UTC
# Line 135  Game *GameFactory::createFromCmdLine(int Line 135  Game *GameFactory::createFromCmdLine(int
135      // 2) Make sure the mandatory options are present      // 2) Make sure the mandatory options are present
136      if (!found_d || !found_m)      if (!found_d || !found_m)
137      {      {
138          cerr << "Mandatory option missing: ";          std::cerr << "Mandatory option missing: ";
139          if (!found_d)          if (!found_d)
140              cerr << "dict";              std::cerr << "dict";
141          else if (!found_m)          else if (!found_m)
142              cerr << "mode";              std::cerr << "mode";
143          cerr << "\n";          std::cerr << "\n";
144    
145          printUsage(argv[0]);          printUsage(argv[0]);
146          return NULL;          return NULL;
# Line 199  void GameFactory::releaseGame(Game &iGam Line 199  void GameFactory::releaseGame(Game &iGam
199  void GameFactory::printUsage(const std::string &iBinaryName) const  void GameFactory::printUsage(const std::string &iBinaryName) const
200  {  {
201      std::cout << "Usage: " << iBinaryName << " [options]\n"      std::cout << "Usage: " << iBinaryName << " [options]\n"
202                << "\n"                << "\n"
203                << "  -h, --help               Print this help and exit\n"                << "  -h, --help               Print this help and exit\n"
204                << "  -v, --version            Print version information and exit\n"                << "  -v, --version            Print version information and exit\n"
205                << "  -m, --mode {duplicate,d,freegame,f,training,t}\n"                << "  -m, --mode {duplicate,d,freegame,f,training,t}\n"
206                << "                           Choose game mode\n"                << "                           Choose game mode\n"
207                << "  -d, --dict <string>      Choose a dictionary\n"                << "  -d, --dict <string>      Choose a dictionary\n"
208                << "      --human              Add a human player\n"                << "      --human              Add a human player\n"
209                << "      --ai                 Add a AI (Artificial Intelligence) player\n"                << "      --ai                 Add a AI (Artificial Intelligence) player\n"
210                << "      --joker              Play with the \"Joker game\" variant\n";                << "      --joker              Play with the \"Joker game\" variant\n";
211  }  }
212    
213    
214  void GameFactory::printVersion() const  void GameFactory::printVersion() const
215  {  {
216    std::cout << PACKAGE_STRING << "\n"    std::cout << PACKAGE_STRING << "\n"
217              << "This program comes with NO WARRANTY, to the extent permitted by "              << "This program comes with NO WARRANTY, to the extent permitted by "
218              << "law.\nYou may redistribute it under the terms of the GNU General "              << "law.\nYou may redistribute it under the terms of the GNU General "
219              << "Public License;\nsee the file named COPYING for details.\n";              << "Public License;\nsee the file named COPYING for details.\n";
220  }  }
221    
222    

Legend:
Removed from v.1.5.2.2  
changed lines
  Added in v.1.5.2.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26