3 #ifndef PROGRESS_EFFECT5X3_H 4 #define PROGRESS_EFFECT5X3_H 56 assert(progress >= 0);
57 const int rank = progress / 8;
66 assert(progress >= 0);
67 const int rank = progress / 8;
78 return progress16(progresses[0] + progresses[1]);
91 template <Player Attack>
94 template <Player Attack,
bool AlwaysPromotable,
bool AlwaysNotPromotable>
109 void updateProgressBonuses(
const NumEffectState& state,
bool black=
true,
bool white=
true);
111 template <Player Defense>
static int makeProgressAll(Player defense, const NumEffectState &state, Square king)
CArray< PieceMask, 2 > effect_mask
const PieceMask effect5x3Mask(Player p) const
int min(Player p, int v1, int v2)
static const Progress16 progress16each(int progress)
0-15 の値を返す.
const Progress16 progress16(Player p) const
Effect5x3(const NumEffectState &state)
static const Progress16 progress16(int progress)
0-15 の値を返す
const Progress16 progress16bonus(Player p) const
ProgressN< 16 > Progress16
Square kingSquare() const
static int makeProgress(const NumEffectState &state)
CArray< int, 2 > area_progresses
const Progress16 progress16() const
static void updateStand(int &old_stand, Move last_move)
void update(const NumEffectState &new_state, Move last_move)
static int makeProgress(Player defense, const NumEffectState &state)
王の位置を指定したprogressの計算.
static int makeProgressStand(Player attack, const NumEffectState &state)
void updateStand(Player pl, Move m)
Effect5x3 expect(const NumEffectState &state, Move move) const
CArray< int, 2 > progress_bonuses
玉の周囲5x3の領域の利きの数と持駒から計算した進行度.
int progress(Player p) const
CArray< int, 2 > progresses
static int makeProgressArea(Player attack, const NumEffectState &state, Square king)
CArray< int, 2 > stand_progresses