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

#include <usiResponse.h>

Collaboration diagram for osl::game_playing::UsiResponse:
Collaboration graph
[legend]

Public Member Functions

 UsiResponse (const UsiState &, bool new_move_probability, bool verbose)
 
 ~UsiResponse ()
 
bool hasImmediateResponse (const std::string &command, std::string &out)
 
void genmoveProbability (int limit, MoveLogProbVector &out)
 

Private Member Functions

MoveVector generateGoodMoves ()
 
void genmoveProbability (int limit, std::string &out)
 
void genmove (std::string &out)
 
void csashow (const NumEffectState &state, std::string &out)
 
void csamove (const NumEffectState &state, const std::string &str, std::string &out)
 
void ki2moves (const NumEffectState &current, const std::string &moves_str, std::string &out)
 Convert a usi moves string to a ki2 (Kanji) moves string. More...
 
void ki2currentinfo (const NumEffectState &current, std::string &out)
 Outputs the number of moves and the last move in the ki2 format. More...
 
void isValidPosition (const std::string &line, std::string &out)
 

Private Attributes

const UsiStateusi_state
 
const bool new_move_probability
 
const bool verbose
 

Detailed Description

Definition at line 15 of file usiResponse.h.

Constructor & Destructor Documentation

osl::game_playing::UsiResponse::UsiResponse ( const UsiState u,
bool  new_move_probability,
bool  verbose 
)

Definition at line 21 of file usiResponse.cc.

osl::game_playing::UsiResponse::~UsiResponse ( )

Definition at line 26 of file usiResponse.cc.

Member Function Documentation

void osl::game_playing::UsiResponse::csamove ( const NumEffectState &  state,
const std::string &  str,
std::string &  out 
)
private

Definition at line 120 of file usiResponse.cc.

References osl::record::csa::show(), and osl::record::usi::strToMove().

void osl::game_playing::UsiResponse::csashow ( const NumEffectState &  state,
std::string &  out 
)
private

Definition at line 111 of file usiResponse.cc.

osl::MoveVector osl::game_playing::UsiResponse::generateGoodMoves ( )
private
void osl::game_playing::UsiResponse::genmove ( std::string &  out)
private

Definition at line 100 of file usiResponse.cc.

References moves, and osl::record::usi::show().

void osl::game_playing::UsiResponse::genmoveProbability ( int  limit,
MoveLogProbVector &  out 
)
void osl::game_playing::UsiResponse::genmoveProbability ( int  limit,
std::string &  out 
)
private
bool osl::game_playing::UsiResponse::hasImmediateResponse ( const std::string &  command,
std::string &  out 
)

Definition at line 199 of file usiResponse.cc.

References limit, and out.

Referenced by usiMovesToKanji().

void osl::game_playing::UsiResponse::isValidPosition ( const std::string &  line,
std::string &  out 
)
private

Definition at line 182 of file usiResponse.cc.

References moves, and osl::record::usi::parse().

void osl::game_playing::UsiResponse::ki2currentinfo ( const NumEffectState &  current,
std::string &  out 
)
private

Outputs the number of moves and the last move in the ki2 format.

Definition at line 160 of file usiResponse.cc.

References osl::Move::isValid(), and osl::record::ki2::show().

void osl::game_playing::UsiResponse::ki2moves ( const NumEffectState &  current,
const std::string &  moves_str,
std::string &  out 
)
private

Convert a usi moves string to a ki2 (Kanji) moves string.

Definition at line 133 of file usiResponse.cc.

References moves, osl::record::ki2::show(), and osl::record::usi::strToMove().

Member Data Documentation

const bool osl::game_playing::UsiResponse::new_move_probability
private

Definition at line 18 of file usiResponse.h.

const UsiState& osl::game_playing::UsiResponse::usi_state
private

Definition at line 17 of file usiResponse.h.

const bool osl::game_playing::UsiResponse::verbose
private

Definition at line 18 of file usiResponse.h.


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