局面全体の利きデータ. More...
#include <numSimpleEffect.h>

Public Member Functions | |
| template<Player P, Ptype T, Direction Dir, NumBitmapEffect::Op OP, bool UC> | |
| void | doEffectShort (const SimpleState &state, Square pos, int num) |
| ある位置からある方向に短い利きがある時に,その方向の利きを更新する. More... | |
| template<Player P, Ptype T, Direction Dir, NumBitmapEffect::Op OP, bool UC> | |
| void | doEffectLong (const SimpleState &state, Square pos, int num) |
| ある位置からある方向に長い利きがある時に,その方向の利きを更新する. More... | |
| template<Player P, Ptype T, NumBitmapEffect::Op OP, bool UC> | |
| void | doEffectBy (const SimpleState &state, Square pos, int num) |
| ある種類の駒が持つ利きを更新する. More... | |
| template<NumBitmapEffect::Op OP, bool UC> | |
| void | doEffect (const SimpleState &state, PtypeO ptypeo, Square pos, int num) |
| ある種類の駒が持つ利きを更新する. More... | |
| template<NumBitmapEffect::Op OP, bool UC> | |
| void | doEffect (const SimpleState &state, Piece p) |
| ある駒が持つ利きを更新する. More... | |
| void | init (const SimpleState &state) |
| 盤面のデータを元に初期化する. More... | |
| NumSimpleEffectTable (const SimpleState &state) | |
| コンストラクタ. More... | |
| const NumBitmapEffect | effectSetAt (Square pos) const |
| ある位置の利きデータを取り出す. More... | |
| template<NumBitmapEffect::Op OP, bool UC> | |
| void | doBlockAt (const SimpleState &state, Square pos, int piece_num) |
| posに駒を設置/削除して長い利きをブロック/延長する際の利きデータの更新. More... | |
| const BoardMask | changedEffects (Player pl) const |
| const NumBitmapEffect | changedPieces () const |
| const PieceMask | effectedMask (Player pl) const |
| const PieceMask | effectedChanged (Player pl) const |
| void | setChangedPieces (NumBitmapEffect const &effect) |
| void | clearChangedEffects () |
| void | invalidateChangedEffects () |
| void | clearEffectedChanged () |
| void | copyFrom (const NumSimpleEffectTable &src) |
| 主要部分を高速にコピーする. More... | |
Public Attributes | |
| CArray< PieceMask, 2 > | effected_mask |
| CArray< PieceMask, 2 > | effected_changed_mask |
| mobility::MobilityTable | mobilityTable |
| mobility More... | |
| EffectedNumTable | effectedNumTable |
| effected num More... | |
Protected Attributes | |
| CArray< NumBitmapEffect, Square::SIZE > | effects |
| CArray< BoardMask, 2 > | changed_effects |
| NumBitmapEffect | changed_effect_pieces |
| set of pieces whose effect changed by previous move More... | |
Friends | |
| bool | operator== (const NumSimpleEffectTable &et1, const NumSimpleEffectTable &et2) |
局面全体の利きデータ.
Definition at line 30 of file numSimpleEffect.h.
|
inline |
|
inline |
Definition at line 239 of file numSimpleEffect.h.
References changed_effects.
Referenced by osl::state::NumEffectState::changedEffects(), and osl::state::NumEffectState::hasChangedEffects().
|
inline |
Definition at line 242 of file numSimpleEffect.h.
References changed_effect_pieces.
Referenced by osl::state::NumEffectState::changedPieces().
|
inline |
Definition at line 254 of file numSimpleEffect.h.
References changed_effect_pieces, and changed_effects.
Referenced by osl::state::NumEffectState::makeMovePass().
|
inline |
Definition at line 264 of file numSimpleEffect.h.
References effected_changed_mask.
Referenced by osl::state::NumEffectState::makeMovePass().
| void osl::effect::NumSimpleEffectTable::copyFrom | ( | const NumSimpleEffectTable & | src) |
主要部分を高速にコピーする.
盤の外や直前の利きの変化などの情報はコピーされない
Definition at line 24 of file numSimpleEffect.cc.
References changed_effect_pieces, changed_effects, effected_changed_mask, effected_mask, effectedNumTable, effects, osl::Square::index(), and mobilityTable.
| void osl::effect::NumSimpleEffectTable::doBlockAt | ( | const SimpleState & | state, |
| Square | pos, | ||
| int | piece_num | ||
| ) |
posに駒を設置/削除して長い利きをブロック/延長する際の利きデータの更新.
| OP(template) | - 利きを足すか,減らすか |
| state | - 局面の状態 posに駒を置く前でも後でもよい |
| pos | - 変化する位置 |
xorなのでposに元々駒があって,取り除く時にも呼び出せる.
| state | - 局面の状態 posに駒を置く前でも後でもよい |
| pos | - 変化する位置 |
Definition at line 290 of file numSimpleEffect.h.
References osl::BLACK, osl::Board_Table, osl::EMPTY_NUM, osl::BoardTable::getShort8(), osl::Square::index(), osl::Piece::owner(), osl::PPAWN, osl::Piece::ptype(), and osl::Piece::square().
| void osl::effect::NumSimpleEffectTable::doEffect | ( | const SimpleState & | state, |
| PtypeO | ptypeo, | ||
| Square | pos, | ||
| int | num | ||
| ) |
ある種類の駒が持つ利きを更新する.
| OP(template) | - 利きを足すか,減らすか |
| state | - 盤面(動かした後) |
| ptypeo | - 駒の種類 |
| pos | - 駒の位置 |
| num | - 駒番号 |
Definition at line 13 of file numSimpleEffect.tcc.
References osl::BISHOP, osl::BLACK, osl::GOLD, osl::KING, osl::KNIGHT, osl::LANCE, NEW_PTYPEO, osl::PAWN, osl::PBISHOP, osl::PKNIGHT, osl::PLANCE, osl::PPAWN, osl::PROOK, osl::PSILVER, osl::ROOK, osl::SILVER, and osl::WHITE.
|
inline |
ある駒が持つ利きを更新する.
| OP(template) | - 利きを足すか,減らすか |
| state | - 盤面(動かした後) |
| p | - 駒 |
Definition at line 202 of file numSimpleEffect.h.
References osl::Piece::number(), osl::Piece::ptypeO(), and osl::Piece::square().
| void osl::effect::NumSimpleEffectTable::doEffectBy | ( | const SimpleState & | state, |
| Square | pos, | ||
| int | num | ||
| ) |
ある種類の駒が持つ利きを更新する.
| P(template) | - ある位置にある駒の所有者 |
| T(template) | - ある位置にある駒の種類 |
| OP(template) | - 利きを足すか,減らすか |
| state | - 盤面(動かした後) |
| pos | - 駒の位置 |
| num | - 駒番号 |
Definition at line 51 of file numSimpleEffect.tcc.
References osl::BISHOP, osl::LANCE, osl::PBISHOP, osl::PROOK, and osl::ROOK.
|
inline |
ある位置からある方向に長い利きがある時に,その方向の利きを更新する.
| P(template) | - ある位置にある駒の所有者 |
| T(template) | - ある位置にある駒の種類 |
| Dir(template) | - 黒の立場から見た方向 |
| OP(template) | - 利きを足すか,減らすか |
| state | - 盤面(動かした後) |
| pos | - 駒の位置 |
| num | - 駒番号 |
Definition at line 93 of file numSimpleEffect.h.
References changed_effects, count, osl::D, osl::DL, osl::DR, effected_changed_mask, effected_mask, effectedNumTable, effects, osl::EMPTY_NUM, osl::mobility::MobilityTable::get(), osl::Square::index(), osl::Piece::isEdgeNum(), osl::Piece::isEmptyNum(), osl::L, osl::longToShort(), mobilityTable, osl::effect::NumBitmapEffect::playerEffectMask(), osl::mobility::MobilityTable::set(), osl::Square::STAND(), osl::effect::NumBitmapEffect::Sub, osl::U, osl::UL, osl::UR, osl::Square::x(), osl::Square::y(), and osl::Offset::zero().
|
inline |
ある位置からある方向に短い利きがある時に,その方向の利きを更新する.
| P(template) | - ある位置にある駒の所有者 |
| T(template) | - ある位置にある駒の種類 |
| D(template) | - 駒の所有者の立場から見た方向 |
| OP(template) | - 利きを足すか,減らすか |
| pos | - 駒の位置 |
| num | - 駒番号 |
Definition at line 58 of file numSimpleEffect.h.
References osl::effect::NumBitmapEffect::Add, changed_effects, effected_changed_mask, effected_mask, effects, osl::Square::index(), osl::Piece::isPieceNum(), osl::effect::NumBitmapEffect::playerEffectMask(), and target.
|
inline |
Definition at line 248 of file numSimpleEffect.h.
References effected_changed_mask, and osl::playerToIndex().
|
inline |
Definition at line 245 of file numSimpleEffect.h.
References effected_mask, and osl::playerToIndex().
|
inline |
ある位置の利きデータを取り出す.
| pos | - 位置 |
Definition at line 223 of file numSimpleEffect.h.
References effects, and osl::Square::index().
Referenced by osl::state::NumEffectState::effectSetAt(), osl::state::NumEffectState::isConsistent(), osl::effect::operator<<(), and osl::effect::operator==().
| void osl::effect::NumSimpleEffectTable::init | ( | const SimpleState & | state) |
盤面のデータを元に初期化する.
| state | - 盤面 |
Definition at line 8 of file numSimpleEffect.cc.
Referenced by NumSimpleEffectTable().
|
inline |
Definition at line 259 of file numSimpleEffect.h.
References changed_effect_pieces, and changed_effects.
|
inline |
Definition at line 251 of file numSimpleEffect.h.
References changed_effect_pieces.
|
friend |
|
protected |
set of pieces whose effect changed by previous move
Definition at line 40 of file numSimpleEffect.h.
Referenced by changedPieces(), clearChangedEffects(), copyFrom(), invalidateChangedEffects(), and setChangedPieces().
|
protected |
Definition at line 38 of file numSimpleEffect.h.
Referenced by changedEffects(), clearChangedEffects(), copyFrom(), doEffectLong(), doEffectShort(), and invalidateChangedEffects().
| CArray<PieceMask,2> osl::effect::NumSimpleEffectTable::effected_changed_mask |
Definition at line 43 of file numSimpleEffect.h.
Referenced by clearEffectedChanged(), copyFrom(), doEffectLong(), doEffectShort(), osl::state::NumEffectState::effectedChanged(), effectedChanged(), and osl::state::NumEffectState::NumEffectState().
| CArray<PieceMask,2> osl::effect::NumSimpleEffectTable::effected_mask |
Definition at line 42 of file numSimpleEffect.h.
Referenced by copyFrom(), doEffectLong(), doEffectShort(), osl::state::NumEffectState::effectedMask(), effectedMask(), osl::state::NumEffectState::NumEffectState(), and osl::effect::operator==().
| EffectedNumTable osl::effect::NumSimpleEffectTable::effectedNumTable |
effected num
Definition at line 47 of file numSimpleEffect.h.
Referenced by copyFrom(), doEffectLong(), osl::state::NumEffectState::findLongAttackAt(), osl::state::NumEffectState::isConsistent(), osl::state::NumEffectState::longEffectNumTable(), and osl::effect::operator==().
|
protected |
Definition at line 37 of file numSimpleEffect.h.
Referenced by copyFrom(), doEffectLong(), doEffectShort(), and effectSetAt().
| mobility::MobilityTable osl::effect::NumSimpleEffectTable::mobilityTable |
mobility
Definition at line 45 of file numSimpleEffect.h.
Referenced by copyFrom(), doEffectLong(), osl::state::NumEffectState::mobilityOf(), and osl::effect::operator==().
1.8.4