/* This file is part of cardwords
   (c) 1998 1999 Tobias Peters
   see file COPYING for the copyright terms.
   
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

// cardwords_dicbot.hh

#ifndef CARDWORDS_DICBOT_VERSION
#define CARDWORDS_DICBOT_VERSION "CardWords_DicBot version 0.0a"
#endif

// This file declares all global vars of DicBot.
#ifndef CARDWORDS_DICBOT_HH
#define CARDWORDS_DICBOT_HH

#include "cardwords_bonustable.hh"

// The number that tells the cardwords_server how long the answer is consists
// of this many digits:
#define DICBOT_ANSWER_DIGITS 8

// All possible exiting reasons:
#define ER_INVALID_INPUT 10
#define ER_INTERNAL_ERROR 11

// All global vars go inside this var (dicbot_global):
extern
class CardWords_DicBot_Global {
public:
  // A version String:
  const Machine_Char * version;
  
  size_t min_word_length, max_word_length;

  // Parameters for the hash tables that hold the words.
  // CardWords_FastHashKey::init needs them:
  size_t hash_table_size;
  size_t hashing_diff_factor;

  const Machine_Char * append_dict;

  CardWords_BonusTable * bonus_table;
  
  CardWords_DicBot_Global ()
    :
    version((Machine_Char *)CARDWORDS_DICBOT_VERSION),
    min_word_length(2), max_word_length(15),
    hash_table_size(6007), hashing_diff_factor(4),
    append_dict(0),
    bonus_table(0)
{}
} dicbot_global;
#endif

