osl::mobility::BishopMobility Struct Reference

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Static Public Member Functions | List of all members
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 : 相手の利きがない動けるマス 両方を求める More...
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)
| 斜め方向，利きに関係なく動けるマスの数 More...
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)
| 斜め方向，相手の利きがない動けるマスを求める More...
static int | countSafe (Player pl, const NumEffectState &state, Piece p)

## Detailed Description

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

Definition at line 14 of file bishopMobility.h.

## Member Function Documentation

template<Player P>

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

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

Definition at line 45 of file bishopMobility.h.

References count, osl::DL, osl::DR, osl::UL, osl::UR, and osl::Square::y().

Referenced by countBoth().

template<Player P>

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

Definition at line 59 of file bishopMobility.h.

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

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

Definition at line 65 of file bishopMobility.h.

References osl::BLACK.

template<Player P, Direction Dir>

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

Definition at line 73 of file bishopMobility.h.

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

template<Direction dir>

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

Definition at line 85 of file bishopMobility.h.

References osl::BLACK.

template<Player P>

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

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

Definition at line 25 of file bishopMobility.h.

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

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

Definition at line 35 of file bishopMobility.h.

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

template<Player P>

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

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

Definition at line 95 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().

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

Definition at line 106 of file bishopMobility.h.

References osl::BLACK.

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

- bishopMobility.h