osl::mobility::BishopMobility Struct Reference

盤上の角および馬が動けるマスの数を数える More...

`#include <bishopMobility.h>`

## Static Public Member Functions

template<Player P>
static void | countBoth (const NumEffectState &state, Piece p, int &countAll, int &countSafe)
| 斜め方向， P : 駒pの持ち主 countAll : 利きに関係なく動けるマス countSafe : 相手の利きがない動けるマス 両方を求める
static void | countBoth (Player pl, const NumEffectState &state, Piece p, int &countAll, int &countSafe)
template<Player P>
static int | countAll (const NumEffectState &state, int num)
| 斜め方向，利きに関係なく動けるマスの数
template<Player P>
static int | countAll (const NumEffectState &state, Piece p)
static int | countAll (Player pl, const NumEffectState &state, Piece p)
template<Player P, Direction Dir>
static int | countAllDir (const NumEffectState &state, Piece p)
template<Direction dir>
static int | countAllDir (Player pl, const NumEffectState &state, Piece p)
template<Player P>
static int | countSafe (const NumEffectState &state, Piece p)
| 斜め方向，相手の利きがない動けるマスを求める
static int | countSafe (Player pl, const NumEffectState &state, Piece p)

## Detailed Description

盤上の角および馬が動けるマスの数を数える

Definition at line 15 of file bishopMobility.h.

## Member Function Documentation

## countAll() [1/3]

template<Player P>

int osl::mobility::BishopMobility::countAll | ( | const NumEffectState & | state,
|  | int | num )

inline static

斜め方向，利きに関係なく動けるマスの数

Definition at line 46 of file bishopMobility.h.

References osl::DL, osl::DR, osl::NumEffectState::mobilityOf(), osl::SimpleState::pieceAt(), osl::UL, osl::UR, and osl::Square::y().

Referenced by countAll(), countAll(), countBoth(), and countBoth().

## countAll() [2/3]

template<Player P>

int osl::mobility::BishopMobility::countAll | ( | const NumEffectState & | state,
|  | Piece | p )

inline static

Definition at line 60 of file bishopMobility.h.

References osl::BISHOP, countAll(), osl::Piece::isOnBoard(), osl::Piece::number(), osl::Piece::owner(), osl::PBISHOP, and osl::Piece::ptype().

## countAll() [3/3]

int osl::mobility::BishopMobility::countAll | ( | Player | pl,
|  | const NumEffectState & | state,
|  | Piece | p )

inline static

Definition at line 66 of file bishopMobility.h.

References osl::BLACK, and countAll().

## countAllDir() [1/2]

template<Player P, Direction Dir>

int osl::mobility::BishopMobility::countAllDir | ( | const NumEffectState & | state,
|  | Piece | p )

inline static

Definition at line 74 of file bishopMobility.h.

References osl::BISHOP, osl::BLACK, osl::DL, osl::DR, osl::inverse(), osl::Piece::isOnBoard(), osl::NumEffectState::mobilityOf(), osl::Piece::number(), osl::Piece::owner(), osl::PBISHOP, osl::SimpleState::pieceAt(), osl::Piece::ptype(), osl::Piece::square(), osl::UL, osl::UR, and osl::Square::y().

Referenced by countAllDir(), and osl::eval::ml::BishopMobilityAll::eval().

## countAllDir() [2/2]

template<Direction dir>

int osl::mobility::BishopMobility::countAllDir | ( | Player | pl,
|  | const NumEffectState & | state,
|  | Piece | p )

inline static

Definition at line 86 of file bishopMobility.h.

References osl::BLACK, and countAllDir().

## countBoth() [1/2]

template<Player P>

void osl::mobility::BishopMobility::countBoth | ( | const NumEffectState & | state,
|  | Piece | p,
|  | int & | countAll,
|  | int & | countSafe )

inline static

斜め方向， P : 駒pの持ち主 countAll : 利きに関係なく動けるマス countSafe : 相手の利きがない動けるマス 両方を求める

Definition at line 26 of file bishopMobility.h.

References osl::BISHOP, countAll(), osl::mobility::countMobilityBoth(), countSafe(), osl::Piece::isOnBoard(), osl::Piece::owner(), osl::PBISHOP, osl::Piece::ptype(), and osl::Piece::square().

Referenced by countBoth().

## countBoth() [2/2]

void osl::mobility::BishopMobility::countBoth | ( | Player | pl,
|  | const NumEffectState & | state,
|  | Piece | p,
|  | int & | countAll,
|  | int & | countSafe )

inline static

Definition at line 36 of file bishopMobility.h.

References osl::BLACK, countAll(), countBoth(), and countSafe().

## countSafe() [1/2]

template<Player P>

int osl::mobility::BishopMobility::countSafe | ( | const NumEffectState & | state,
|  | Piece | p )

inline static

斜め方向，相手の利きがない動けるマスを求める

Definition at line 96 of file bishopMobility.h.

References osl::BISHOP, osl::mobility::countMobilitySafe(), osl::Piece::isOnBoard(), osl::Piece::owner(), osl::PBISHOP, osl::Piece::ptype(), and osl::Piece::square().

Referenced by countBoth(), countBoth(), and countSafe().

## countSafe() [2/2]

int osl::mobility::BishopMobility::countSafe | ( | Player | pl,
|  | const NumEffectState & | state,
|  | Piece | p )

inline static

Definition at line 107 of file bishopMobility.h.

References osl::BLACK, and countSafe().

The documentation for this struct was generated from the following file:

- bishopMobility.h