Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes
osl::game_playing::GameState Class Reference

State と千日手状態などを一元管理 More...

#include <gameState.h>

List of all members.

Classes

struct  State

Public Types

enum  MoveType { VALID, PAWN_DROP_FOUL, UNSAFE_KING, OTHER_INVALID }

Public Member Functions

 GameState (const SimpleState &initial_state)
 ~GameState ()
MoveType isIllegal (Move m) const
const Sennichite pushMove (Move m, int eval=0)
const Move popMove ()
bool canPopMove () const
const NumEffectState & state () const
const RepetitionCountercounter () const
const container::MoveStackmoveHistory () const
const hash::HashKeyStackhashHistory () const
int moves () const
int chessMoves () const
const SimpleState & getInitialState () const
const boost::shared_ptr
< GameState
clone () const
 GameState のコピーを作る. 現在の局面を初期局面として扱うため, pushMoveしない限りpopMoveはできない
const vector< int > & evalStack () const
void generateNotLosingMoves (container::MoveVector &normal_or_win_or_draw, container::MoveVector &loss) const

Private Member Functions

 GameState (const State &src)

Private Attributes

boost::scoped_ptr< Statestack

Detailed Description

State と千日手状態などを一元管理

Definition at line 32 of file gameState.h.


Member Enumeration Documentation

Enumerator:
VALID 
PAWN_DROP_FOUL 
UNSAFE_KING 
OTHER_INVALID 

Definition at line 42 of file gameState.h.


Constructor & Destructor Documentation

osl::game_playing::GameState::GameState ( const State src) [explicit, private]

Definition at line 43 of file gameState.cc.

Referenced by clone().

osl::game_playing::GameState::GameState ( const SimpleState &  initial_state) [explicit]

Definition at line 37 of file gameState.cc.

osl::game_playing::GameState::~GameState ( )

Definition at line 49 of file gameState.cc.


Member Function Documentation

bool osl::game_playing::GameState::canPopMove ( ) const

Definition at line 128 of file gameState.cc.

References stack.

Referenced by popMove().

int osl::game_playing::GameState::chessMoves ( ) const [inline]

Definition at line 53 of file gameState.h.

References moves().

const boost::shared_ptr< osl::game_playing::GameState > osl::game_playing::GameState::clone ( ) const

GameState のコピーを作る. 現在の局面を初期局面として扱うため, pushMoveしない限りpopMoveはできない

Definition at line 134 of file gameState.cc.

References GameState(), result, and stack.

Referenced by osl::game_playing::SpeculativeSearchPlayer::selectBestMoveCleanUp(), and osl::game_playing::SpeculativeAllMoves::SearchAllMoves::setUp().

const osl::RepetitionCounter & osl::game_playing::GameState::counter ( ) const
const osl::vector< int > & osl::game_playing::GameState::evalStack ( ) const

Definition at line 147 of file gameState.cc.

References stack.

void osl::game_playing::GameState::generateNotLosingMoves ( container::MoveVector normal_or_win_or_draw,
container::MoveVector loss 
) const
const osl::state::SimpleState & osl::game_playing::GameState::getInitialState ( ) const

Definition at line 141 of file gameState.cc.

References stack.

Referenced by osl::game_playing::HistoryToTable::setPV().

const osl::hash::HashKeyStack & osl::game_playing::GameState::hashHistory ( ) const
osl::game_playing::GameState::MoveType osl::game_playing::GameState::isIllegal ( Move  m) const
const osl::MoveStack & osl::game_playing::GameState::moveHistory ( ) const
int osl::game_playing::GameState::moves ( ) const

Definition at line 104 of file gameState.cc.

References stack.

Referenced by chessMoves().

const osl::Move osl::game_playing::GameState::popMove ( )

Definition at line 86 of file gameState.cc.

References canPopMove(), result, and stack.

const osl::Sennichite osl::game_playing::GameState::pushMove ( Move  m,
int  eval = 0 
)

Definition at line 54 of file gameState.cc.

References result, stack, and osl::game_playing::GameState::State::state.

Referenced by run().

const osl::NumEffectState & osl::game_playing::GameState::state ( ) const

Member Data Documentation

boost::scoped_ptr<State> osl::game_playing::GameState::stack [private]

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines