#include <iostream.h>

#include "header.h"
#include "Game.h"
#include "Win.h"
#include "Dictionary.h"
#include "draw.h"

gamestate_t state;
Win *win;
Dictionary dict(DICTIONARY);

int main(void)
{
     Game *game;
     
     cout << "**************************************************************\n"
	  << "XNineword by David Lawrence.\n"
	  << "Instructions:\n"
	  << "Each letter must be used once only, each word must contain\n"
	  << "the center letter and there must be at least one nine letter\n"
	  << "word. No plurals ending in 'S', no words with inital capitals\n"
	  << "no hyphenated words. The root of every word is in the file\n"
	  << "\"" << DICTIONARY << "\"\n"
	  << "**************************************************************\n"
	  << endl;

     win = new Win(BOARD_W + MENU_W, BOARD_H + 24, "XNineword");
     draw_default_board(win);

     do {
	  game = new Game( dict.random_word() );
	  game->play();
	  delete game;
     } while ( state != GS_QUIT );

     delete win;
     return 0;
     
}
