Move Class Reference

Move = list of steps (up to STEP_IN_MOVE). More...

#include <board.h>

List of all members.

Public Member Functions

 Move (string moveStr)
 Constructor from string.
void appendStep (Step)
 Appends step to the move.
void prependStep (Step)
 Prepends step to the move.
void appendStepList (StepList)
 Append steplist to the move.
StepList getStepList () const
 Steps getter.
int getStepCount () const
 Step count in move getter.
bool isOpening () const
 Opening getter.
player_t getPlayer () const
 Player getter.
bool operator== (const Move &other) const
string toString () const
 Representation.

Private Member Functions

recordAction_e parseRecordActionToken (const string &token, player_t &player, piece_t &piece, coord_t &from, coord_t &to)
 Parsing single token for init from game record.
void updateStepCount (const Step &step)

Private Attributes

StepList stepList_
int stepCount_
bool opening_
 Is opening move.


Detailed Description

Move = list of steps (up to STEP_IN_MOVE).

Accepts Steps as well as StepWithKills.


Member Function Documentation

void Move::appendStep ( Step  step  ) 

Appends step to the move.

move: A->B; step : C => move: A->B->C

void Move::appendStepList ( StepList  stepList  ) 

Append steplist to the move.

Takes steps from given stepList and appends them to the move.

StepList Move::getStepList (  )  const

Steps getter.

Function returns list of steps.

recordAction_e Move::parseRecordActionToken ( const string &  token,
player_t &  player,
piece_t &  piece,
coord_t &  from,
coord_t &  to 
) [private]

Parsing single token for init from game record.

Parameters:
token given string token (e.g. Ra1n)
player player parsed from the token
piece piece parsed from the token
from position parsed from the token
to (optional) new position parsed from the token (only if it is a step)
Returns:
what recordAction was parsed (i.e. placement in the beginning,...)

void Move::prependStep ( Step  step  ) 

Prepends step to the move.

move: A->B; step : C => move: C->A->B


The documentation for this class was generated from the following files:

Generated on Thu Aug 6 23:29:08 2009 for akimot by  doxygen 1.5.7.1