eliottxt.cpp File Reference

#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include <string.h>
#include <ctype.h>
#include <fstream>
#include <readline/readline.h>
#include <readline/history.h>
#include "dic.h"
#include "dic_search.h"
#include "game_io.h"
#include "game_factory.h"
#include "training.h"
#include "duplicate.h"
#include "freegame.h"

Go to the source code of this file.

Functions

char * rl_gets ()
 Read a string, and return a pointer to it.
char * next_token_alpha (char *cmd, const char *delim)
char * next_token_alphanum (char *cmd, const char *delim)
char * next_token_alphaplusjoker (char *cmd, const char *delim)
char * next_token_digit (char *cmd, const char *delim)
char * next_token_cross (char *cmd, const char *delim)
char * next_token_filename (char *cmd, const char *delim)
void eliottxt_get_cross (const Dictionary &iDic, char *cros)
void help_training ()
void help_freegame ()
void help_duplicate ()
void help ()
void display_data (const Game &iGame, const char *delim)
void loop_training (Training &iGame)
void loop_freegame (FreeGame &iGame)
void loop_duplicate (Duplicate &iGame)
void main_loop (const Dictionary &iDic)
int main (int argc, char *argv[])

Variables

static char * line_read = NULL


Function Documentation

void display_data const Game iGame,
const char *  delim
 

Definition at line 264 of file eliottxt.cpp.

References Game::currPlayer(), next_token_alpha(), next_token_digit(), GameIO::printAllPoints(), GameIO::printAllRacks(), GameIO::printBoard(), GameIO::printBoardJoker(), GameIO::printBoardMultipliers(), GameIO::printBoardMultipliers2(), GameIO::printNonPlayed(), GameIO::printPlayedRack(), GameIO::printPoints(), GameIO::printSearchResults(), and Game::save().

Referenced by loop_duplicate(), loop_freegame(), and loop_training().

void eliottxt_get_cross const Dictionary iDic,
char *  cros
 

Definition at line 159 of file eliottxt.cpp.

References Dic_search_Cros(), DIC_WORD_MAX, and RES_CROS_MAX.

Referenced by loop_training().

void help  ) 
 

Definition at line 249 of file eliottxt.cpp.

Referenced by main_loop().

void help_duplicate  ) 
 

Definition at line 225 of file eliottxt.cpp.

Referenced by loop_duplicate().

void help_freegame  ) 
 

Definition at line 200 of file eliottxt.cpp.

Referenced by loop_freegame().

void help_training  ) 
 

Definition at line 173 of file eliottxt.cpp.

Referenced by loop_training().

void loop_duplicate Duplicate iGame  ) 
 

Definition at line 553 of file eliottxt.cpp.

References Dic_search_word(), display_data(), Game::getDic(), help_duplicate(), next_token_alpha(), next_token_alphanum(), next_token_digit(), next_token_filename(), Duplicate::play(), rl_gets(), Game::save(), and Duplicate::setPlayer().

Referenced by main_loop().

void loop_freegame FreeGame iGame  ) 
 

Definition at line 460 of file eliottxt.cpp.

References Game::currPlayer(), Dic_search_word(), display_data(), Game::getDic(), help_freegame(), next_token_alpha(), next_token_alphanum(), next_token_filename(), FreeGame::pass(), FreeGame::play(), rl_gets(), and Game::save().

Referenced by main_loop().

void loop_training Training iGame  ) 
 

Definition at line 336 of file eliottxt.cpp.

References Game::back(), Dic_search_word(), display_data(), eliottxt_get_cross(), Game::getDic(), help_training(), next_token_alpha(), next_token_alphanum(), next_token_alphaplusjoker(), next_token_cross(), next_token_digit(), next_token_filename(), Training::play(), Training::playResult(), Game::RACK_ALL, Game::RACK_NEW, rl_gets(), Game::save(), Training::search(), Training::setRackManual(), and Training::setRackRandom().

Referenced by main_loop().

int main int  argc,
char *  argv[]
 

Definition at line 795 of file eliottxt.cpp.

References GameFactory::Destroy(), Dic_destroy(), Dic_load(), line_read, and main_loop().

void main_loop const Dictionary iDic  ) 
 

Definition at line 650 of file eliottxt.cpp.

References Game::addAIPlayer(), Game::addHumanPlayer(), GameFactory::createDuplicate(), GameFactory::createFreeGame(), GameFactory::createTraining(), Training::getMode(), Game::getMode(), help(), GameFactory::Instance(), Game::kFREEGAME, Game::kTRAINING, Game::load(), loop_duplicate(), loop_freegame(), loop_training(), next_token_digit(), next_token_filename(), GameFactory::releaseGame(), rl_gets(), FreeGame::start(), Duplicate::start(), and Training::start().

Referenced by main().

char* next_token_alpha char *  cmd,
const char *  delim
 

Definition at line 68 of file eliottxt.cpp.

Referenced by display_data(), loop_duplicate(), loop_freegame(), and loop_training().

char* next_token_alphanum char *  cmd,
const char *  delim
 

Definition at line 82 of file eliottxt.cpp.

Referenced by loop_duplicate(), loop_freegame(), and loop_training().

char* next_token_alphaplusjoker char *  cmd,
const char *  delim
 

Definition at line 96 of file eliottxt.cpp.

Referenced by loop_training().

char* next_token_cross char *  cmd,
const char *  delim
 

Definition at line 127 of file eliottxt.cpp.

Referenced by loop_training().

char* next_token_digit char *  cmd,
const char *  delim
 

Definition at line 113 of file eliottxt.cpp.

Referenced by display_data(), loop_duplicate(), loop_training(), and main_loop().

char* next_token_filename char *  cmd,
const char *  delim
 

Definition at line 143 of file eliottxt.cpp.

Referenced by loop_duplicate(), loop_freegame(), loop_training(), and main_loop().

char* rl_gets  ) 
 

Read a string, and return a pointer to it.

Returns NULL on EOF.

Definition at line 46 of file eliottxt.cpp.

References line_read.

Referenced by loop_duplicate(), loop_freegame(), loop_training(), and main_loop().


Variable Documentation

char* line_read = NULL [static]
 

Definition at line 40 of file eliottxt.cpp.

Referenced by main(), and rl_gets().


Generated on Thu Dec 29 02:01:15 2005 for Eliot by  doxygen 1.4.5