#include <board.h>
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. | |
Accepts Steps as well as StepWithKills.
| 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.
| 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) |
| void Move::prependStep | ( | Step | step | ) |
Prepends step to the move.
move: A->B; step : C => move: C->A->B
1.5.7.1