Classes | Functions
osl::psn Namespace Reference

gnushogi で使われるフォーマット. More...

Classes

class  ParseError
 

Functions

const Move strToMove (const std::string &, const SimpleState &)
 
const Square strToPos (const std::string &)
 
Ptype charToPtype (char)
 
const std::string show (Move)
 
const std::string show (Square)
 
char show (Ptype)
 
const std::string showXP (Move)
 decorate capture by 'x', promote by '+', and unpromote by '=' More...
 

Detailed Description

gnushogi で使われるフォーマット.

何種類かある.

Function Documentation

◆ charToPtype()

osl::Ptype osl::psn::charToPtype ( char  c)

◆ show() [1/3]

const std::string osl::psn::show ( Move  m)

◆ show() [2/3]

const std::string osl::psn::show ( Square  pos)

Definition at line 9 of file usi.cc.

References show(), osl::Square::x(), and osl::Square::y().

◆ show() [3/3]

char osl::psn::show ( Ptype  ptype)

Definition at line 20 of file usi.cc.

References osl::BISHOP, osl::GOLD, osl::KING, osl::KNIGHT, osl::LANCE, osl::PAWN, osl::ROOK, show(), and osl::SILVER.

◆ showXP()

const std::string osl::psn::showXP ( Move  m)

◆ strToMove()

const osl::Move osl::psn::strToMove ( const std::string &  str,
const SimpleState s 
)

◆ strToPos()

const osl::Square osl::psn::strToPos ( const std::string &  str)

Definition at line 115 of file usi.cc.

References charToPtype().

Referenced by osl::psn::ParseError::ParseError(), and strToMove().