利きを局面に持たせるためのコード. More...
Classes | |
class | BoardBitEffect |
91マスの盤上の駒の有無を91ビットで表現するState. More... | |
struct | ApplyDoUndoSimpleMove< P, BoardBitEffect< BaseState > > |
struct | ApplyDoUndoDropMove< P, BoardBitEffect< BaseState > > |
struct | ApplyDoUndoCaptureMove< P, BoardBitEffect< BaseState > > |
struct | BoardBitMask |
SSE2も可なのだが,あまり良い方法が見つからない More... | |
class | BoardBitMaskTable |
union | Byte8 |
class | EffectedNum |
盤面上の駒が「黒から見た」方向に長い利きをつけられている時に, 利きをつけている駒の番号を得る たとえば,Uの時は下から上方向の長い利きがついているものとする. その方向の利きがついていない場合はEMPTY_NUM(0x80)を入れておく. More... | |
class | EffectedNumTable |
class | AddMaskAction |
Liberty8で使われるHelper. More... | |
class | Liberty8 |
自分の駒があるマスの8近傍の敵の利きの状態を得る. More... | |
struct | LongEffect8 |
8近傍のどこに長い利きを持つか. More... | |
class | Liberty8Table |
Liberty8を得るために使うテーブル. More... | |
struct | SignatureTraits |
class | MoveSignatureTable |
PtypeOからMoveSignatureを求めるテーブル. More... | |
class | NumBitmapEffect |
現在の定義 (2005/3/4以降) More... | |
class | NumSimpleEffectTable |
局面全体の利きデータ. More... | |
class | SignatureTable |
class | SignatureEffect |
マスごとの利き(MoveSignature)も保持するState. More... | |
struct | ApplyDoUndoSimpleMove< P, SignatureEffect< BaseState > > |
struct | ApplyDoUndoDropMove< P, SignatureEffect< BaseState > > |
struct | ApplyDoUndoCaptureMove< P, SignatureEffect< BaseState > > |
Typedefs | |
typedef unsigned char | MoveSignature |
マスの利きを表す型(SignatureEffectで使う予定). | |
Functions | |
BoardBitMask & | operator^= (BoardBitMask &lhs, BoardBitMask const &rhs) |
BoardBitMask | operator^ (BoardBitMask const &lhs, BoardBitMask const &rhs) |
std::ostream & | operator<< (std::ostream &os, BoardBitMask const &boardBitMask) |
bool | operator== (const EffectedNumTable &, const EffectedNumTable &) |
std::ostream & | operator<< (std::ostream &, const EffectedNumTable &) |
template<Player P> | |
std::ostream & | operator<< (std::ostream &os, Liberty8< P > const &liberty) |
template<Player P> | |
MoveSignature | getPlayerMask () |
template<> | |
MoveSignature | getPlayerMask< BLACK > () |
template<> | |
MoveSignature | getPlayerMask< WHITE > () |
std::ostream & | operator<< (std::ostream &os, const MoveSignature signature) |
bool | operator== (const NumSimpleEffectTable &, const NumSimpleEffectTable &) |
std::ostream & | operator<< (std::ostream &, const NumSimpleEffectTable &) |
bool | operator!= (const NumSimpleEffectTable &et1, const NumSimpleEffectTable &et2) |
static void | setBetweenMask (BoardBitMask &mask, Square from, Square to, Ptype ptype) |
template std::ostream & | operator<< (std::ostream &os, Liberty8< BLACK > const &liberty) |
template std::ostream & | operator<< (std::ostream &os, Liberty8< WHITE > const &liberty) |
static bool | hasShortMove (Ptype ptype, int dx, int dy, int dx0, int dy0) |
黒の攻め方の駒ptype から dx, dyの位置にdirectMoveがあるか? | |
static bool | hasLongMove (Ptype ptype, int dx, int dy, int dx0, int dy0) |
黒の攻め方の駒ptype から dx, dyの位置にInDirectMoveがあるか? ただし,隣で伸ばした先が8近傍内に無い場合は shortMoveにする また,目的のちょうど対称の時もshortMoveにする | |
static unsigned char | shortMaskOf (Ptype ptype, int dx, int dy) |
黒の攻め方の駒ptype から dx, dyの位置にいる白玉の 近隣 Dir(白玉に白の目から見てDirの動き到達可能なマス) に 利きを持つ場合は dirToMask(Dir)が0, そうでない場合は1 | |
static unsigned int | directionOf (int dx, int dy) |
std::ostream & | operator<< (std::ostream &os, LongEffect8 const &longEffect) |
Variables | |
const Liberty8Table | Liberty8_Table |
const int | MS_PLAYER = (1<<7) |
const int | MS_LONG_U = (1<<5) |
const int | MS_U = (1<<4) |
const int | MS_UL_UR = (1<<3) |
const int | MS_L_R_D = (1<<2) |
const int | MS_DL_DR = (1<<1) |
const int | MS_UUL_UUR = (1<<0) |
const MoveSignature | signature_EMPTY = getPlayerMask<BLACK>() |
const MoveSignature | signature_EDGE = getPlayerMask<WHITE>() |
const MoveSignatureTable | Move_Signature_Table |
利きを局面に持たせるためのコード.
typedef unsigned char osl::effect::MoveSignature |
static unsigned int osl::effect::directionOf | ( | int | dx, |
int | dy | ||
) | [static] |
-dx, -dyの動きが黒に取って, dir であるときに 1<<dirを返す dx, dyは 8近傍の動きのみ許す
Definition at line 81 of file liberty8Table.cc.
References osl::BLACK, osl::Board_Table, osl::BoardTable::getLongDirection(), osl::isLong(), and osl::longToShort().
Referenced by osl::effect::Liberty8Table::longEffectOf().
MoveSignature osl::effect::getPlayerMask | ( | ) | [inline] |
MoveSignature osl::effect::getPlayerMask< BLACK > | ( | ) | [inline] |
Definition at line 30 of file moveSignature.h.
Referenced by osl::effect::MoveSignatureTable::setSignature().
MoveSignature osl::effect::getPlayerMask< WHITE > | ( | ) | [inline] |
Definition at line 33 of file moveSignature.h.
References MS_PLAYER.
Referenced by osl::effect::MoveSignatureTable::setSignature().
static bool osl::effect::hasLongMove | ( | Ptype | ptype, |
int | dx, | ||
int | dy, | ||
int | dx0, | ||
int | dy0 | ||
) | [static] |
黒の攻め方の駒ptype から dx, dyの位置にInDirectMoveがあるか? ただし,隣で伸ばした先が8近傍内に無い場合は shortMoveにする また,目的のちょうど対称の時もshortMoveにする
Definition at line 48 of file liberty8Table.cc.
References osl::BLACK, osl::PtypeTable::getEffect(), osl::EffectContent::hasEffect(), hasShortMove(), osl::newPtypeO(), and osl::Ptype_Table.
Referenced by osl::effect::Liberty8Table::longEffectOf().
static bool osl::effect::hasShortMove | ( | Ptype | ptype, |
int | dx, | ||
int | dy, | ||
int | dx0, | ||
int | dy0 | ||
) | [static] |
黒の攻め方の駒ptype から dx, dyの位置にdirectMoveがあるか?
Definition at line 15 of file liberty8Table.cc.
References osl::BLACK, osl::Board_Table, osl::Offset::dx(), osl::Offset::dy(), osl::PtypeTable::getEffect(), osl::BoardTable::getShortOffset(), osl::EffectContent::hasBlockableEffect(), osl::EffectContent::hasUnblockableEffect(), osl::newPtypeO(), osl::Ptype_Table, and osl::Offset::zero().
Referenced by hasLongMove(), and shortMaskOf().
bool osl::effect::operator!= | ( | const NumSimpleEffectTable & | et1, |
const NumSimpleEffectTable & | et2 | ||
) | [inline] |
Definition at line 272 of file numSimpleEffect.h.
template std::ostream& osl::effect::operator<< | ( | std::ostream & | os, |
Liberty8< BLACK > const & | liberty | ||
) |
template std::ostream& osl::effect::operator<< | ( | std::ostream & | os, |
Liberty8< WHITE > const & | liberty | ||
) |
std::ostream & osl::effect::operator<< | ( | std::ostream & | os, |
const NumSimpleEffectTable & | effectTable | ||
) |
Definition at line 216 of file numSimpleEffect.cc.
References osl::effect::NumSimpleEffectTable::effectSetAt().
std::ostream & osl::effect::operator<< | ( | std::ostream & | os, |
const MoveSignature | signature | ||
) |
Definition at line 9 of file moveSignature.cc.
std::ostream& osl::effect::operator<< | ( | std::ostream & | , |
const EffectedNumTable & | |||
) |
std::ostream & osl::effect::operator<< | ( | std::ostream & | os, |
BoardBitMask const & | boardBitMask | ||
) |
Definition at line 11 of file boardBitMask.cc.
References osl::effect::BoardBitMask::bMask.
std::ostream & osl::effect::operator<< | ( | std::ostream & | os, |
Liberty8< P > const & | liberty | ||
) |
Definition at line 12 of file liberty8.cc.
std::ostream& osl::effect::operator<< | ( | std::ostream & | os, |
LongEffect8 const & | longEffect | ||
) |
Definition at line 172 of file liberty8Table.cc.
References osl::effect::LongEffect8::getMask(), and osl::effect::LongEffect8::getOffset().
bool osl::effect::operator== | ( | const NumSimpleEffectTable & | et1, |
const NumSimpleEffectTable & | et2 | ||
) |
bool osl::effect::operator== | ( | const EffectedNumTable & | e1, |
const EffectedNumTable & | e2 | ||
) |
Definition at line 46 of file effectedNumTable.cc.
BoardBitMask osl::effect::operator^ | ( | BoardBitMask const & | lhs, |
BoardBitMask const & | rhs | ||
) | [inline] |
Definition at line 123 of file boardBitMask.h.
References osl::effect::BoardBitMask::mask.
BoardBitMask& osl::effect::operator^= | ( | BoardBitMask & | lhs, |
BoardBitMask const & | rhs | ||
) | [inline] |
Definition at line 113 of file boardBitMask.h.
References osl::effect::BoardBitMask::mask.
static void osl::effect::setBetweenMask | ( | BoardBitMask & | mask, |
Square | from, | ||
Square | to, | ||
Ptype | ptype | ||
) | [static] |
Definition at line 36 of file boardBitMask.cc.
References osl::BLACK, osl::effect::BoardBitMask::clearAll(), osl::PtypeTable::getEffect(), osl::EffectContent::hasBlockableEffect(), osl::newPtypeO(), osl::EffectContent::offset(), osl::Ptype_Table, and osl::effect::BoardBitMask::setBit().
Referenced by osl::effect::BoardBitMaskTable::initBetweenMask().
static unsigned char osl::effect::shortMaskOf | ( | Ptype | ptype, |
int | dx, | ||
int | dy | ||
) | [static] |
黒の攻め方の駒ptype から dx, dyの位置にいる白玉の 近隣 Dir(白玉に白の目から見てDirの動き到達可能なマス) に 利きを持つ場合は dirToMask(Dir)が0, そうでない場合は1
自分が動いて元のマスに利きをつける手は生成しない
Definition at line 60 of file liberty8Table.cc.
References osl::Board_Table, osl::BoardTable::getDxForBlack(), osl::BoardTable::getDyForBlack(), and hasShortMove().
Referenced by osl::effect::Liberty8Table::Liberty8Table().
Definition at line 111 of file tables.cc.
Referenced by osl::effect::AddMaskAction< Liberty, P, T >::operator()().
Definition at line 126 of file tables.cc.
Referenced by osl::effect::ApplyDoUndoCaptureMove< P, SignatureEffect< BaseState > >::doUndoCaptureMove(), osl::effect::ApplyDoUndoDropMove< P, SignatureEffect< BaseState > >::doUndoDropMove(), osl::effect::ApplyDoUndoSimpleMove< P, SignatureEffect< BaseState > >::doUndoSimpleMove(), and osl::effect::SignatureTable::SignatureTable().
const int osl::effect::MS_DL_DR = (1<<1) |
Definition at line 23 of file moveSignature.h.
const int osl::effect::MS_L_R_D = (1<<2) |
Definition at line 22 of file moveSignature.h.
const int osl::effect::MS_LONG_U = (1<<5) |
Definition at line 19 of file moveSignature.h.
const int osl::effect::MS_PLAYER = (1<<7) |
Definition at line 18 of file moveSignature.h.
Referenced by getPlayerMask< WHITE >().
const int osl::effect::MS_U = (1<<4) |
Definition at line 20 of file moveSignature.h.
const int osl::effect::MS_UL_UR = (1<<3) |
Definition at line 21 of file moveSignature.h.
const int osl::effect::MS_UUL_UUR = (1<<0) |
Definition at line 24 of file moveSignature.h.
Definition at line 49 of file moveSignature.h.
Referenced by osl::effect::MoveSignatureTable::MoveSignatureTable(), and osl::effect::SignatureTable::SignatureTable().
Definition at line 48 of file moveSignature.h.
Referenced by osl::effect::ApplyDoUndoCaptureMove< P, SignatureEffect< BaseState > >::doUndoCaptureMove(), osl::effect::ApplyDoUndoDropMove< P, SignatureEffect< BaseState > >::doUndoDropMove(), osl::effect::ApplyDoUndoSimpleMove< P, SignatureEffect< BaseState > >::doUndoSimpleMove(), and osl::effect::MoveSignatureTable::MoveSignatureTable().