素抜きがあるため動けない駒を求める. [詳細]
#include <pin.h>
Static Public メソッド | |
| static PieceMask | makeNaive (const SimpleState &state, Position target, Player defense) |
| 8方向計算する方法 | |
| static PieceMask | makeByPiece (const NumEffectState &state, Position target, Player defense) |
| 飛車角は駒の位置から判断する計算方法. | |
| static PieceMask | makeByPieceKing (const NumEffectState &state, Position target, Player defense) |
| 飛車角は駒の位置から判断, KINGに特化 | |
| template<Player Defense, Direction DIR> | |
| static void | findDirectionStep (const NumEffectState &state, Position target, PieceMask &pins) |
| 駒から8近傍をサーチしていって,その方向の利きがあるか? | |
| template<Player Defense> | |
| static PieceMask | makeStep (const NumEffectState &state, Position target) |
| static PieceMask | makeStep (const NumEffectState &state, Position target, Player defense) |
| template<Player Defense> | |
| static PieceMask | makeStep1 (const NumEffectState &state, Position target) |
| static PieceMask | makeStep1 (const NumEffectState &state, Position target, Player defense) |
| static PieceMask | make (const NumEffectState &state, Position target, Player defense) |
| pin されている駒を計算する | |
| static PieceMask | make (const NumEffectState &state, Player defense) |
| defense の王を守るために pin されている駒を計算する | |
| static PieceMask | makeNaive (const SimpleState &state, Player defense) |
| static PieceMask | makeByPiece (const NumEffectState &state, Player defense) |
| static int | count (const NumEffectState &state, Player defense) |
| defense の王について pin されている駒を計算する | |
| static int | count (const NumEffectState &state, Position target, Player defense) |
Static Private メソッド | |
| template<Direction DIR> | |
| static void | findDirection (const SimpleState &state, Position target, Player defense, PieceMask &pins) |
| template<Player P> | |
| static void | findLance (const NumEffectState &state, Position target, PieceMask &pins) |
| targetにはdefenseのKINGがあるという前提 Pはdefense targetにdefenseのlanceがあると働かない. | |
| static bool | hasEffectWithOffset (const SimpleState &state, Piece attack_piece, Piece pin, Offset diff) |
| static bool | hasEffectWithOffset (const NumEffectState &state, Piece attack_piece, Piece pin, Offset) |
| static void | findOffset (const NumEffectState &state, Piece attack_piece, Position target, Player defense, Offset diff, PieceMask &pins) |
| template<Ptype PTYPE> | |
| static void | findPtype (const NumEffectState &state, Position target, Player attack, Player defense, PieceMask &result) |
素抜きがあるため動けない駒を求める.
TODO: 差分計算で高速に更新する
effect_util/pin.h の 69 行で定義されています。
| static int osl::effect_util::Pin::count | ( | const NumEffectState & | state, | |
| Position | target, | |||
| Player | defense | |||
| ) | [inline, static] |
effect_util/pin.h の 285 行で定義されています。
参照先 make().
| static int osl::effect_util::Pin::count | ( | const NumEffectState & | state, | |
| Player | defense | |||
| ) | [inline, static] |
| static void osl::effect_util::Pin::findDirectionStep | ( | const NumEffectState & | state, | |
| Position | target, | |||
| PieceMask & | pins | |||
| ) | [inline, static] |
駒から8近傍をサーチしていって,その方向の利きがあるか?
effect_util/pin.h の 186 行で定義されています。
参照先 osl::BLACK, osl::Piece::isEdgeNum(), osl::Piece::isEmptyNum(), と osl::Piece::isPieceNum().
| static void osl::effect_util::Pin::findLance | ( | const NumEffectState & | state, | |
| Position | target, | |||
| PieceMask & | pins | |||
| ) | [inline, static, private] |
targetにはdefenseのKINGがあるという前提 Pはdefense targetにdefenseのlanceがあると働かない.
effect_util/pin.h の 91 行で定義されています。
参照先 osl::Piece::EMPTY(), osl::Piece::isOnBoardByOwner(), と osl::Piece::number().
| static void osl::effect_util::Pin::findOffset | ( | const NumEffectState & | state, | |
| Piece | attack_piece, | |||
| Position | target, | |||
| Player | defense, | |||
| Offset | diff, | |||
| PieceMask & | pins | |||
| ) | [inline, static, private] |
effect_util/pin.h の 127 行で定義されています。
参照先 hasEffectWithOffset(), osl::Piece::isPiece(), osl::Piece::number(), と osl::Piece::owner().
参照元 findPtype().
| static void osl::effect_util::Pin::findPtype | ( | const NumEffectState & | state, | |
| Position | target, | |||
| Player | attack, | |||
| Player | defense, | |||
| PieceMask & | result | |||
| ) | [inline, static, private] |
effect_util/pin.h の 140 行で定義されています。
参照先 osl::BISHOP, osl::BOOST_STATIC_ASSERT(), findOffset(), osl::PtypeTable::getEffect(), osl::EffectContent::hasBlockableEffect(), osl::Piece::isOnBoardByOwner(), osl::newPtypeO(), osl::EffectContent::offset(), osl::Piece::position(), osl::Ptype_Table, osl::ROOK, と osl::Offset::zero().
| static bool osl::effect_util::Pin::hasEffectWithOffset | ( | const NumEffectState & | state, | |
| Piece | attack_piece, | |||
| Piece | pin, | |||
| Offset | ||||
| ) | [inline, static, private] |
effect_util/pin.h の 122 行で定義されています。
| static PieceMask osl::effect_util::Pin::make | ( | const NumEffectState & | state, | |
| Player | defense | |||
| ) | [inline, static] |
| static PieceMask osl::effect_util::Pin::make | ( | const NumEffectState & | state, | |
| Position | target, | |||
| Player | defense | |||
| ) | [inline, static] |
pin されている駒を計算する
| target | 守るマス | |
| defense | pin されている駒の所有者 |
effect_util/pin.h の 257 行で定義されています。
参照先 makeByPiece().
| static PieceMask osl::effect_util::Pin::makeByPiece | ( | const NumEffectState & | state, | |
| Player | defense | |||
| ) | [inline, static] |
effect_util/pin.h の 273 行で定義されています。
参照先 makeByPieceKing().
| osl::PieceMask osl::effect_util::Pin::makeByPiece | ( | const NumEffectState & | state, | |
| Position | target, | |||
| Player | defense | |||
| ) | [static] |
飛車角は駒の位置から判断する計算方法.
effect_util/pin.cc の 24 行で定義されています。
参照先 osl::alt(), osl::Position::isOnBoard(), と result.
参照元 make().
| osl::PieceMask osl::effect_util::Pin::makeByPieceKing | ( | const NumEffectState & | state, | |
| Position | target, | |||
| Player | defense | |||
| ) | [static] |
飛車角は駒の位置から判断, KINGに特化
effect_util/pin.cc の 39 行で定義されています。
参照先 osl::alt(), osl::BLACK, osl::Position::isOnBoard(), と result.
参照元 makeByPiece().
| static PieceMask osl::effect_util::Pin::makeNaive | ( | const SimpleState & | state, | |
| Player | defense | |||
| ) | [inline, static] |
effect_util/pin.h の 269 行で定義されています。
参照先 makeNaive().
| osl::PieceMask osl::effect_util::Pin::makeNaive | ( | const SimpleState & | state, | |
| Position | target, | |||
| Player | defense | |||
| ) | [static] |
8方向計算する方法
effect_util/pin.cc の 7 行で定義されています。
参照先 osl::Position::isOnBoard(), と result.
参照元 makeNaive().
| static PieceMask osl::effect_util::Pin::makeStep | ( | const NumEffectState & | state, | |
| Position | target, | |||
| Player | defense | |||
| ) | [inline, static] |
effect_util/pin.h の 227 行で定義されています。
参照先 osl::BLACK.
| static PieceMask osl::effect_util::Pin::makeStep | ( | const NumEffectState & | state, | |
| Position | target | |||
| ) | [inline, static] |
effect_util/pin.h の 213 行で定義されています。
| static PieceMask osl::effect_util::Pin::makeStep1 | ( | const NumEffectState & | state, | |
| Position | target, | |||
| Player | defense | |||
| ) | [inline, static] |
effect_util/pin.h の 243 行で定義されています。
参照先 osl::BLACK.
| static PieceMask osl::effect_util::Pin::makeStep1 | ( | const NumEffectState & | state, | |
| Position | target | |||
| ) | [inline, static] |
effect_util/pin.h の 236 行で定義されています。
1.6.3