My Project
king8_.cc
Go to the documentation of this file.
1 /* king8.cc
2  */
4 
5 const std::string osl::rating::AttackKing8::name(Ptype self, Ptype target, bool same)
6 {
7  return std::string(Ptype_Table.getCsaName(self)) + "-"
8  + Ptype_Table.getCsaName(target) + (same ? "=" : "!");
9 }
10 
11 const std::string osl::rating::DefenseKing8::name(Ptype self, bool drop, int danger)
12 {
13  return std::string(Ptype_Table.getCsaName(self)) + "-"
14  + (drop ? "d" : "m") + (char)('0' + danger);
15 }
16 
17 
18 /* ------------------------------------------------------------------------- */
19 // ;;; Local Variables:
20 // ;;; mode:c++
21 // ;;; c-basic-offset:2
22 // ;;; End:
osl::rating::AttackKing8::target
Ptype target
Definition: std/osl/rating/feature/king8.h:16
osl::rating::Feature::name
const std::string & name() const
Definition: rating/feature.h:24
king8.h
osl::Ptype
Ptype
駒の種類を4ビットでコード化する
Definition: basic_type.h:84
osl::Ptype_Table
const PtypeTable Ptype_Table
Definition: tables.cc:97
osl::rating::AttackKing8::same
bool same
Definition: std/osl/rating/feature/king8.h:17
osl::PtypeTable::getCsaName
const char * getCsaName(Ptype ptype) const
Definition: ptypeTable.h:80