3#ifndef RECORD_KANJIPRINT_H
4#define RECORD_KANJIPRINT_H
18 std::ostream&
operator<<(std::ostream& os,
const Color& c);
37 return (this->valid == rhs.
valid) &&
38 (this->value == rhs.
value);
42 return !(*
this == rhs);
105 virtual const std::string&
getDan(
const size_t index)
const = 0;
107 virtual const std::string&
getSuji(
const size_t index)
const = 0;
109 virtual const std::string&
getPiece(
const size_t index)
const = 0;
112 const std::string&
getStand(
const size_t index)
const
137 assert(index < NPieces);
152 const std::string&
getDan(
const size_t index)
const {
return dan[index];}
153 const std::string&
getSuji(
const size_t index)
const {
return suji[index];}
164 const std::string&
getDan(
const size_t index)
const {
return dan[index];}
165 const std::string&
getSuji(
const size_t index)
const {
return suji[index];}
176 const std::string&
getDan(
const size_t index)
const {
return dan[index];}
177 const std::string&
getSuji(
const size_t index)
const {
return suji[index];}
188 const std::shared_ptr<Characters>
pieces;
208 const Move *last_move=NULL)
const;
ChangeShellColor(std::ostream &os, const Color &color)
virtual const std::string & getDan(const size_t index) const =0
段数の文字を返す
static const CArray< std::string, 32 > stand
const std::string & kanji(const PtypeO &ptypeo) const
virtual const std::string & getPiece(const size_t index) const =0
盤面上の駒を返す
const std::string & getStand(const size_t index) const
持ち駒の漢字文字を返す。1文字を期待する
const std::string & kanji(Ptype ptype) const
size_t piece_index(const PtypeO &ptypeo) const
const std::string & stand_kanji(const PtypeO &ptypeo) const
virtual const std::string & getSuji(const size_t index) const =0
筋の文字を返す。駒の文字幅に合わせる必要がある。
static const Color Yellow
bool operator!=(const Color &rhs) const
static const Color Purple
static const Color colorFor(const std::string &str)
文字列に対応するColor objectを返す
static const Color LightGreen
static const Color LightCyan
bool operator==(const Color &rhs) const
static const Color LightGray
static const Color LightBlue
static const Color DarkGray
friend std::ostream & operator<<(std::ostream &os, const Color &c)
static const Color LightRed
static const Color NONE
色指定しない(デフォルトのまま)ことを示す特別なオブジェクト
const std::string & getName() const
static const Color LightPurple
KanjiPrint(std::ostream &os, const std::shared_ptr< Characters > pieces=std::shared_ptr< Characters >(new StandardCharacters()))
void setLastMoveColor(const Color &c)
void setWhiteColor(const Color &c)
void print(const SimpleState &state, const Move *last_move=NULL) const
出力
const std::shared_ptr< Characters > pieces
void setBlackColor(const Color &c)
std::string kanjiNumber(const int n)
漢数字を返す(持ち駒の数などで用いる)
std::ostream & operator<<(std::ostream &os, const Color &c)
PtypeO
Player + Ptype [-15, 15] PtypeO の O は Owner の O.
PtypeO newPtypeO(Player player, Ptype ptype)
static const CArray< std::string, 10 > dan
static const CArray< std::string, 32 > pieces
const std::string & getSuji(const size_t index) const
筋の文字を返す。駒の文字幅に合わせる必要がある。
static const CArray< std::string, 10 > suji
const std::string & getPiece(const size_t index) const
盤面上の駒を返す
const std::string & getDan(const size_t index) const
段数の文字を返す
const std::string & getDan(const size_t index) const
段数の文字を返す
static const CArray< std::string, 10 > suji
const std::string & getSuji(const size_t index) const
筋の文字を返す。駒の文字幅に合わせる必要がある。
static const CArray< std::string, 10 > dan
const std::string & getPiece(const size_t index) const
盤面上の駒を返す
static const CArray< std::string, 32 > pieces
const std::string & getSuji(const size_t index) const
筋の文字を返す。駒の文字幅に合わせる必要がある。
const std::string & getDan(const size_t index) const
段数の文字を返す
static const CArray< std::string, 32 > pieces
盤面上の駒の漢字文字
const std::string & getPiece(const size_t index) const
盤面上の駒を返す
static const CArray< std::string, 10 > dan
段数の文字
static const CArray< std::string, 10 > suji
筋の文字。駒の文字幅に合わせる必要がある。