Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

ComputerPlayer Class Reference

#include </home/clem/local/src/opie/noncore/games/wordgame/wordgame.h>

Collaboration diagram for ComputerPlayer:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ComputerPlayer (Board *b, Rack *r)
 ~ComputerPlayer ()
bool step ()

Private Member Functions

void findBest (QPoint at, const QPoint &d, const QDawg::Node *node, ulong used, uchar *nletter, const Tile **tiles, int n, Tile *blankvalues, int blused)
void noteChoice (const Tile **tiles, int n, const QPoint &d, const Tile *blankvalues, int blused)

Private Attributes

Boardboard
Rackrack
bool across
int dict
QPoint current
const Tile ** best
int best_n
Tilebest_blankvalues
int best_blused
int best_score
QPoint best_dir
QPoint best_start

Constructor & Destructor Documentation

ComputerPlayer::ComputerPlayer Board b,
Rack r
 

Definition at line 569 of file wordgame.cpp.

References across, best_score, dict, and FALSE.

ComputerPlayer::~ComputerPlayer  ) 
 

Definition at line 578 of file wordgame.cpp.

References best, and best_blankvalues.


Member Function Documentation

void ComputerPlayer::findBest QPoint  at,
const QPoint &  d,
const QDawg::Node node,
ulong  used,
uchar nletter,
const Tile **  tiles,
int  n,
Tile blankvalues,
int  blused
[private]
 

Definition at line 626 of file wordgame.cpp.

References board, Board::contains(), Rack::count(), Tile::isBlank(), QDawg::Node::isWord(), QDawg::Node::jump(), l, QDawg::Node::letter(), QDawg::Node::next(), noteChoice(), rack, rc, t, Tile::text(), Board::tile(), Rack::tileRef(), QChar::unicode(), and Opie::MM::x.

Referenced by step().

void ComputerPlayer::noteChoice const Tile **  tiles,
int  n,
const QPoint &  d,
const Tile blankvalues,
int  blused
[private]
 

Definition at line 678 of file wordgame.cpp.

References best, best_blankvalues, best_blused, best_dir, best_n, best_score, best_start, board, current, i, s, Board::score(), and TRUE.

Referenced by findBest().

bool ComputerPlayer::step  ) 
 

Definition at line 584 of file wordgame.cpp.

References across, Rack::arrangeTiles(), best, best_blankvalues, best_dir, best_n, best_score, best_start, board, current, d, Global::dawg(), dict, FALSE, findBest(), Global::fixedDawg(), i, Tile::isBlank(), rack, Board::scoreTurn(), Rack::setBlanks(), Board::showTurn(), Tile::text(), Rack::tileRef(), TRUE, Board::xTiles(), and Board::yTiles().

Referenced by WordGame::think().


Member Data Documentation

bool ComputerPlayer::across [private]
 

Definition at line 250 of file wordgame.h.

Referenced by ComputerPlayer(), and step().

const Tile** ComputerPlayer::best [private]
 

Definition at line 254 of file wordgame.h.

Referenced by noteChoice(), step(), and ~ComputerPlayer().

Tile* ComputerPlayer::best_blankvalues [private]
 

Definition at line 256 of file wordgame.h.

Referenced by noteChoice(), step(), and ~ComputerPlayer().

int ComputerPlayer::best_blused [private]
 

Definition at line 257 of file wordgame.h.

Referenced by noteChoice().

QPoint ComputerPlayer::best_dir [private]
 

Definition at line 259 of file wordgame.h.

Referenced by noteChoice(), and step().

int ComputerPlayer::best_n [private]
 

Definition at line 255 of file wordgame.h.

Referenced by noteChoice(), and step().

int ComputerPlayer::best_score [private]
 

Definition at line 258 of file wordgame.h.

Referenced by ComputerPlayer(), noteChoice(), and step().

QPoint ComputerPlayer::best_start [private]
 

Definition at line 260 of file wordgame.h.

Referenced by noteChoice(), and step().

Board* ComputerPlayer::board [private]
 

Definition at line 247 of file wordgame.h.

Referenced by findBest(), noteChoice(), and step().

QPoint ComputerPlayer::current [private]
 

Definition at line 252 of file wordgame.h.

Referenced by noteChoice(), and step().

int ComputerPlayer::dict [private]
 

Definition at line 251 of file wordgame.h.

Referenced by ComputerPlayer(), and step().

Rack* ComputerPlayer::rack [private]
 

Definition at line 248 of file wordgame.h.

Referenced by findBest(), and step().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 17:29:19 2005 for OPIE by  doxygen 1.4.2