3 #ifndef _PROGRESS_EFFECT5X3_TABLE_H
4 #define _PROGRESS_EFFECT5X3_TABLE_H
107 assert(pos.
isOnBoard() && 0<=x && x<5 && 0<= y && y<3);
112 assert(pos.
isOnBoard() && 0<=x && x<5 && 0<= y && y<3);
117 std::ostream&
operator<<(std::ostream& os,LongEffect
const& longEffect);
unsigned int index() const
unsigned int index() const
bool isOnBoard() const
盤面上を表すかどうかの判定. 1<=x() && x()<=9 && 1<=y() && y()<=9 Squareの内部表現に依存する.
LongEffect4 const & getLongEffect(PtypeO ptypeO, Offset32 offset32) const
5x3領域へのPtypeOを限定した長い利きの計算.
CArray3d< unsigned int, 2, Square::SIZE, 5 *3 > attackEffect
CArray2d< LongEffect4, PTYPEO_SIZE, Offset32::SIZE > longEffect
CArray2d< unsigned int, PTYPEO_SIZE, Offset32::SIZE > shortEffect
CArray2d< LongEffect, 8, Offset32::SIZE > blockEffect
CArray3d< unsigned int, 2, Square::SIZE, 5 *3 > defenseEffect
CArray< unsigned int, PTYPE_SIZE > onStand
LongEffect const & getBlockEffect(Direction d, Offset32 offset32) const
5x3領域へのdirectionを限定した長い利きの計算.
unsigned int piecesOnStand(Ptype ptype) const
持駒のPtypeごとの寄与を表すテーブルの参照.
unsigned int getAttackEffect(Player pl, Square pos, int x, int y) const
unsigned int getDefenseEffect(Player pl, Square pos, int x, int y) const
void setupDefenseEffect()
unsigned int countShortEffect(PtypeO ptypeO, Offset32 offset32) const
5x3領域への短い利きの数の計算.
std::ostream & operator<<(std::ostream &os, LongEffect const &longEffect)
CArray< LongEffect, 4 > LongEffect4
長い利きの方向は高々4なので,長さ4のCArrayで表現.
Effect5x3Table Effect5x3_Table
PtypeO
Player + Ptype [-15, 15] PtypeO の O は Owner の O.
5x3領域への長い利きの始まりと終わり. offset - 利きの方向が0の時は利きが無いことを示す minIndex - 利きが領域に入るindex maxIndex - 利きが領域から出る手前のin...