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