All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Static Public Member Functions | List of all members
osl::move_generator::Escape< Action > Class Template Reference

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

#include <escape_.h>

Public Member Functions

template<Player P, bool CheapOnly>
void generateBlocking (const NumEffectState &state, Piece p, Square to, Square from, Action &action)
 Square toにある玉以外の駒にfromにある駒から王手がかかっている時に,長い利きの途中に入る手を 生成する(合駒,駒移動). pが動く手は生成しない CheapOnlyの時は TODO: 自殺手も生成してしまう 短い利きの時にもこちらに入ってしまう More...
 
template<Player P, bool CheapOnly>
void generateBlockingKing (const NumEffectState &state, Piece p, Square from, Action &action)
 玉pにfromにある駒から王手がかかっている時に,長い利きの途中に入る手を 生成する(合駒,駒移動). 短い利きの時にもこちらに入ってしまう More...
 
template<Player P, Ptype Type, bool CheapOnly>
void generateMovesBy (const NumEffectState &state, Piece p, Piece const attacker, Action &action)
 
template<Player P, bool CheapOnly>
void generateKingEscape (const NumEffectState &state, Action &action)
 
template<Player P, Ptype TYPE, bool CheapOnly>
void generateMovesBy (const NumEffectState &state, Piece p, Action &action)
 
template<Player P, bool CheapOnly>
void generateMoves (const NumEffectState &state, Piece piece, Piece attacker, Action &action)
 
template<Player P, bool shouldPromote, bool CheapOnly>
void generate (const NumEffectState &state, Piece piece, Action &action)
 

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から直接呼ばれる. More...
 
template<Player P, bool CheapOnly>
static void generateBlockingKing (const NumEffectState &state, Piece p, Square from, Action &action)
 玉pにfromにある駒から王手がかかってい る時に,長い利きの途中に入る手を 生成する(合駒,駒移動). breakThreatmateから直接呼ばれる. More...
 
template<Player P>
static void generateCaptureKing (const NumEffectState &state, Piece p, Square target, Action &action)
 相手の駒を取ることによって利きを逃れる. More...
 
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 からの利きを逃れる. More...
 
template<Player P, bool shouldPromote, bool CheapOnly>
static void generate (const NumEffectState &state, Piece piece, Action &action)
 attacker からの利きを逃れる. More...
 

Detailed Description

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

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

Definition at line 21 of file escape_.h.

Member Function Documentation

template<class Action>
template<Player P, bool shouldPromote, bool CheapOnly>
static void osl::move_generator::Escape< Action >::generate ( const NumEffectState &  state,
Piece  piece,
Action &  action 
)
static

attacker からの利きを逃れる.

template<class Action>
template<Player P, bool shouldPromote, bool CheapOnly>
void osl::move_generator::Escape< Action >::generate ( const NumEffectState &  state,
Piece  piece,
Action &  action 
)

Definition at line 236 of file escape_.tcc.

References osl::Piece::owner(), osl::Piece::square(), and target.

template<class Action>
template<Player P, bool CheapOnly>
static void osl::move_generator::Escape< Action >::generateBlocking ( const NumEffectState &  state,
Piece  p,
Square  to,
Square  from,
Action &  action 
)
static

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

template<class Action>
template<Player P, bool CheapOnly>
void osl::move_generator::Escape< Action >::generateBlocking ( const NumEffectState &  state,
Piece  p,
Square  to,
Square  from,
Action &  action 
)

Square toにある玉以外の駒にfromにある駒から王手がかかっている時に,長い利きの途中に入る手を 生成する(合駒,駒移動). pが動く手は生成しない CheapOnlyの時は TODO: 自殺手も生成してしまう 短い利きの時にもこちらに入ってしまう

Definition at line 102 of file escape_.tcc.

References osl::Board_Table, osl::BoardTable::getShortOffset(), and osl::Square::isOnBoard().

template<class Action>
template<Player P, bool CheapOnly>
static void osl::move_generator::Escape< Action >::generateBlockingKing ( const NumEffectState &  state,
Piece  p,
Square  from,
Action &  action 
)
static

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

template<class Action>
template<Player P, bool CheapOnly>
void osl::move_generator::Escape< Action >::generateBlockingKing ( const NumEffectState &  state,
Piece  p,
Square  from,
Action &  action 
)

玉pにfromにある駒から王手がかかっている時に,長い利きの途中に入る手を 生成する(合駒,駒移動). 短い利きの時にもこちらに入ってしまう

Definition at line 133 of file escape_.tcc.

References osl::Board_Table, osl::BoardTable::getShortOffset(), osl::Piece::square(), and osl::Offset::zero().

template<class Action>
template<Player P>
static void osl::move_generator::Escape< Action >::generateCapture ( const NumEffectState &  state,
Piece  p,
Square  target,
Action &  action 
)
inlinestatic

Definition at line 51 of file escape_.h.

References target.

template<class Action>
template<Player P>
static void osl::move_generator::Escape< Action >::generateCaptureKing ( const NumEffectState &  state,
Piece  p,
Square  target,
Action &  action 
)
inlinestatic

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

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

Parameters
targettoru koma no pos

Definition at line 47 of file escape_.h.

References target.

template<class Action>
template<Player P, Ptype Type>
static void osl::move_generator::Escape< Action >::generateEscape ( const NumEffectState &  state,
Piece  p,
Action &  action,
Int2Type< Type >   
)
static
template<class Action>
template<Player P, Ptype Type>
static void osl::move_generator::Escape< Action >::generateEscape ( const NumEffectState &  state,
Piece  p,
Action &  action 
)
inlinestatic
Parameters
p逃げ出す駒
Parameters
王の場合だけ特別扱いできる

Definition at line 61 of file escape_.h.

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

template<class Action>
template<Player P, bool cheapOnly>
static void osl::move_generator::Escape< Action >::generateKingEscape ( const NumEffectState &  state,
Action &  action 
)
static
template<class Action>
template<Player P, bool CheapOnly>
void osl::move_generator::Escape< Action >::generateKingEscape ( const NumEffectState &  state,
Action &  action 
)

Definition at line 183 of file escape_.tcc.

template<class Action>
template<Player P, bool CheapOnly>
static void osl::move_generator::Escape< Action >::generateMoves ( const NumEffectState &  state,
Piece  piece,
Piece  attacker,
Action &  action 
)
static

attacker からの利きを逃れる.

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

template<class Action>
template<Player P, bool CheapOnly>
void osl::move_generator::Escape< Action >::generateMoves ( const NumEffectState &  state,
Piece  piece,
Piece  attacker,
Action &  action 
)
template<class Action>
template<Player P, Ptype Type, bool CheapOnly>
static void osl::move_generator::Escape< Action >::generateMovesBy ( const NumEffectState &  state,
Piece  p,
Piece  attacker,
Action &  action 
)
static
Parameters
p例えば king
template<class Action>
template<Player P, Ptype Type, bool CheapOnly>
static void osl::move_generator::Escape< Action >::generateMovesBy ( const NumEffectState &  state,
Piece  p,
Move  last_move,
Action &  action 
)
static
template<class Action>
template<Player P, Ptype Type, bool CheapOnly>
static void osl::move_generator::Escape< Action >::generateMovesBy ( const NumEffectState &  state,
Piece  p,
Action &  action 
)
static
template<class Action>
template<Player P, Ptype Type, bool CheapOnly>
void osl::move_generator::Escape< Action >::generateMovesBy ( const NumEffectState &  state,
Piece  p,
Piece const  attacker,
Action &  action 
)

escape only

escape

合い駒

escape

合い駒

Definition at line 148 of file escape_.tcc.

References osl::Piece::EMPTY(), osl::KING, and osl::Piece::square().

template<class Action>
template<Player P, Ptype TYPE, bool CheapOnly>
void osl::move_generator::Escape< Action >::generateMovesBy ( const NumEffectState &  state,
Piece  p,
Action &  action 
)

Definition at line 197 of file escape_.tcc.

References osl::Piece::square(), and target.


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