All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
osl::game_playing::GameState Class Reference

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

#include <gameState.h>

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はできない More...
 
const vector< int > & evalStack () const
 
void generateNotLosingMoves (container::MoveVector &normal_or_win_or_draw, container::MoveVector &loss) const
 
void generateMoves (container::MoveVector &normal_moves, container::MoveVector &win, container::MoveVector &draw, container::MoveVector &loss) const
 
bool rejectByStack (Move move) 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)
explicitprivate

Definition at line 44 of file gameState.cc.

Referenced by clone().

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

Definition at line 38 of file gameState.cc.

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

Definition at line 50 of file gameState.cc.

Member Function Documentation

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

Definition at line 129 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 135 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 148 of file gameState.cc.

References stack.

void osl::game_playing::GameState::generateMoves ( container::MoveVector normal_moves,
container::MoveVector win,
container::MoveVector draw,
container::MoveVector loss 
) const
void osl::game_playing::GameState::generateNotLosingMoves ( container::MoveVector normal_or_win_or_draw,
container::MoveVector loss 
) const

Definition at line 199 of file gameState.cc.

References generateMoves().

Referenced by osl::game_playing::UsiResponse::generateGoodMoves(), and run().

const osl::state::SimpleState & osl::game_playing::GameState::getInitialState ( ) const

Definition at line 142 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 105 of file gameState.cc.

References stack.

Referenced by chessMoves().

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

Definition at line 87 of file gameState.cc.

References canPopMove(), result, and stack.

const osl::Sennichite osl::game_playing::GameState::pushMove ( Move  m,
int  eval = 0 
)
bool osl::game_playing::GameState::rejectByStack ( Move  move) const
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: