osl::move_generator::Escape< Action > Class Template Reference

逃げる手を生成 生成される手はunique More...

`#include <escape_.h>`

## Static Public Member Functions

template<Player P, bool CheapOnly>
static void | generateBlocking (const NumEffectState &state, Piece p, Square to, Square from, Action &action)
| Square toにある玉以外の駒pにfromにある駒から王手がかかってい る時に，長い利きの途中に入る手を 生成する(合駒，駒移動)． breakThreatmateから直接呼ばれる．
template<Player P, bool CheapOnly>
static void | generateBlockingKing (const NumEffectState &state, Piece p, Square from, Action &action)
| 玉pにfromにある駒から王手がかかってい る時に，長い利きの途中に入る手を 生成する(合駒，駒移動)． breakThreatmateから直接呼ばれる．
template<Player P>
static void | generateCaptureKing (const NumEffectState &state, Piece p, Square target, Action &action)
| 相手の駒を取ることによって利きを逃れる.
template<Player P>
static void | generateCapture (const NumEffectState &state, Piece p, Square target, Action &action)
template<Player P, Ptype Type>
static void | generateEscape (const NumEffectState &state, Piece p, Action &action, Int2Type< Type >)
template<Player P, Ptype Type>
static void | generateEscape (const NumEffectState &state, Piece p, Action &action)
template<Player P, bool cheapOnly>
static void | generateKingEscape (const NumEffectState &state, Action &action)
template<Player P, Ptype Type, bool CheapOnly>
static void | generateMovesBy (const NumEffectState &state, Piece p, Piece attacker, Action &action)
template<Player P, Ptype Type, bool CheapOnly>
static void | generateMovesBy (const NumEffectState &state, Piece p, Move last_move, Action &action)
template<Player P, Ptype Type, bool CheapOnly>
static void | generateMovesBy (const NumEffectState &state, Piece p, Action &action)
template<Player P, bool CheapOnly>
static void | generateMoves (const NumEffectState &state, Piece piece, Piece attacker, Action &action)
| attacker からの利きを逃れる.
template<Player P, bool shouldPromote, bool CheapOnly>
static void | generate (const NumEffectState &state, Piece piece, Action &action)
| attacker からの利きを逃れる.

## Detailed Description

template<class Action>
class osl::move_generator::Escape< Action >

逃げる手を生成 生成される手はunique

Definition at line 17 of file escape_.h.

## Member Function Documentation

## generate()

template<class Action>
template<Player P, bool shouldPromote, bool CheapOnly>

template void osl::move_generator::Escape< Action >::generate< WHITE, true, false > | ( | const NumEffectState & | state,
|  | Piece | piece,
|  | Action & | action )

static

attacker からの利きを逃れる.

## generateBlocking()

template<class Action>
template<Player P, bool CheapOnly>

template void osl::move_generator::Escape< Action >::generateBlocking< WHITE, true > | ( | const NumEffectState & | state,
|  | Piece | p,
|  | Square | to,
|  | Square | from,
|  | Action & | action )

static

Square toにある玉以外の駒pにfromにある駒から王手がかかってい る時に，長い利きの途中に入る手を 生成する(合駒，駒移動)． breakThreatmateから直接呼ばれる．

## generateBlockingKing()

template<class Action>
template<Player P, bool CheapOnly>

template void osl::move_generator::Escape< Action >::generateBlockingKing< WHITE, false > | ( | const NumEffectState & | state,
|  | Piece | p,
|  | Square | from,
|  | Action & | action )

static

玉pにfromにある駒から王手がかかってい る時に，長い利きの途中に入る手を 生成する(合駒，駒移動)． breakThreatmateから直接呼ばれる．

## generateCapture()

template<class Action>
template<Player P>

void osl::move_generator::Escape< Action >::generateCapture | ( | const NumEffectState & | state,
|  | Piece | p,
|  | Square | target,
|  | Action & | action )

inline static

Definition at line 46 of file escape_.h.

## generateCaptureKing()

template<class Action>
template<Player P>

void osl::move_generator::Escape< Action >::generateCaptureKing | ( | const NumEffectState & | state,
|  | Piece | p,
|  | Square | target,
|  | Action & | action )

inline static

相手の駒を取ることによって利きを逃れる.

逃げ出す駒で取る手は生成しない（2003/5/12）

Parameters

  target | toru koma no pos

Definition at line 42 of file escape_.h.

## generateEscape() [1/2]

template<class Action>
template<Player P, Ptype Type>

void osl::move_generator::Escape< Action >::generateEscape | ( | const NumEffectState & | state,
|  | Piece | p,
|  | Action & | action )

inline static

Parameters

  p | 逃げ出す駒

Parameters

  王の場合だけ特別扱いできる |

Definition at line 56 of file escape_.h.

References osl::KING, osl::Piece::owner(), osl::Piece::ptype(), and osl::Piece::square().

## generateEscape() [2/2]

template<class Action>
template<Player P, Ptype Type>

void osl::move_generator::Escape< Action >::generateEscape | ( | const NumEffectState & | state,
|  | Piece | p,
|  | Action & | action,
|  | Int2Type< Type > | )

static

## generateKingEscape()

template<class Action>
template<Player P, bool cheapOnly>

template void osl::move_generator::Escape< Action >::generateKingEscape< WHITE, true > | ( | const NumEffectState & | state,
|  | Action & | action )

static

Referenced by osl::move_generator::GenerateEscape< P >::generateCheapKingEscape(), and osl::move_generator::GenerateEscape< P >::generateKingEscape().

## generateMoves()

template<class Action>
template<Player P, bool CheapOnly>

template void osl::move_generator::Escape< Action >::generateMoves< WHITE, true > | ( | const NumEffectState & | state,
|  | Piece | piece,
|  | Piece | attacker,
|  | Action & | action )

static

attacker からの利きを逃れる.

CAVEAT: 両王手の場合はPIECE_EMPTYにしておく必要がある

## generateMovesBy() [1/3]

template<class Action>
template<Player P, Ptype Type, bool CheapOnly>

void osl::move_generator::Escape< Action >::generateMovesBy | ( | const NumEffectState & | state,
|  | Piece | p,
|  | Action & | action )

static

## generateMovesBy() [2/3]

template<class Action>
template<Player P, Ptype Type, bool CheapOnly>

void osl::move_generator::Escape< Action >::generateMovesBy | ( | const NumEffectState & | state,
|  | Piece | p,
|  | Move | last_move,
|  | Action & | action )

static

## generateMovesBy() [3/3]

template<class Action>
template<Player P, Ptype Type, bool CheapOnly>

void osl::move_generator::Escape< Action >::generateMovesBy | ( | const NumEffectState & | state,
|  | Piece | p,
|  | Piece | attacker,
|  | Action & | action )

static

Parameters

  p | 例えば king

The documentation for this class was generated from the following files:

- escape_.h
- escape_.cc