osl::checkmate::ImmediateCheckmate Class 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
Public Member Functions | Static Public Member Functions | Static Private Member Functions | List of all members
osl::checkmate::ImmediateCheckmate Class Reference

`#include <immediateCheckmate.h>`

## Public Member Functions
template<osl::Player P, bool setBestMove>
bool | hasCheckmateDrop (NumEffectState const &state, Square target, King8Info canMoveMask, Move &bestMove)
template<osl::Player P, bool setBestMove>
bool | slowHasCheckmateMoveDirPiece (NumEffectState const &state, Square target, King8Info canMoveMask, Direction d, Square pos, Piece p, Ptype ptype, Move &bestMove)
template<osl::Player P, bool setBestMove>
bool | hasCheckmateMoveDirPiece (NumEffectState const &state, Square target, King8Info canMoveMask, Direction d, Square pos, Piece p, Move &bestMove)
template<osl::Player P, bool setBestMove>
bool | hasCheckmateMoveDir (NumEffectState const &state, Square target, King8Info canMoveMask, Direction d, Move &bestMove)
template<osl::Player P, bool setBestMove>
bool | hasCheckmateMove (NumEffectState const &state, Square target, King8Info canMoveMask, Move &bestMove)
template<osl::Player P>
bool | hasCheckmateMove (NumEffectState const &state, King8Info canMoveMask)
template<osl::Player P>
bool | hasCheckmateMove (NumEffectState const &state)
template<osl::Player P>
bool | hasCheckmateMove (NumEffectState const &state, King8Info canMoveMask, Square target, Move &bestMove)
template<osl::Player P>
bool | hasCheckmateMove (NumEffectState const &state, Move &bestMove)

## Static Public Member Functions
template<Player P, bool setBestMove>
static bool | slowHasCheckmateMoveDirPiece (NumEffectState const &state, Square target, King8Info mask, Direction d, Square pos, Piece p, Ptype ptype, Move &bestMove)
template<Player P, bool setBestMove>
static bool | hasCheckmateMoveDirPiece (NumEffectState const &state, Square target, King8Info mask, Direction d, Square pos, Piece p, Move &bestMove)
template<Player P, bool setBestMove>
static bool | hasCheckmateMoveDir (NumEffectState const &state, Square target, King8Info mask, Direction d, Move &bestMove)
template<Player P, bool setBestMove>
static bool | hasCheckmateMove (NumEffectState const &state, Square target, King8Info mask, Move &bestMove)
template<Player P>
static bool | hasCheckmateMove (NumEffectState const &state)
| 一手詰めがある局面かどうか判定(move). More...
template<Player P>
static bool | hasCheckmateMove (NumEffectState const &state, King8Info)
template<Player P>
static bool | hasCheckmateMove (NumEffectState const &state, Move &bestMove)
| 一手詰めがある局面かどうか判定(move). More...
template<Player P>
static bool | hasCheckmateMove (NumEffectState const &state, King8Info canMoveMask, Square king, Move &bestMove)
static bool | hasCheckmateMove (Player pl, NumEffectState const &state)
static bool | hasCheckmateMove (Player pl, NumEffectState const &state, Move &bestMove)

## Static Private Member Functions
template<Player P, bool setBestMove>
static bool | hasCheckmateDrop (NumEffectState const &state, Square target, King8Info mask, Move &bestMove)

## Detailed Description

Definition at line 13 of file immediateCheckmate.h.

## Member Function Documentation

template<Player P, bool setBestMove>

static bool osl::checkmate::ImmediateCheckmate::hasCheckmateDrop | ( | NumEffectState const & | state,
|  | Square | target,
|  | King8Info | mask,
|  | Move & | bestMove
| ) |  |
| staticprivate

template<osl::Player P, bool setBestMove>

bool osl::checkmate::ImmediateCheckmate::hasCheckmateDrop | ( | NumEffectState const & | state,
|  | Square | target,
|  | King8Info | canMoveMask,
|  | Move & | bestMove
| ) |  |

Definition at line 199 of file immediateCheckmate.tcc.

References osl::checkmate::ImmediateCheckmateTable::dropPtypeMask(), osl::checkmate::Immediate_Checkmate_Table, osl::PTYPE_BASIC_MIN, and target.

template<Player P, bool setBestMove>

static bool osl::checkmate::ImmediateCheckmate::hasCheckmateMove | ( | NumEffectState const & | state,
|  | Square | target,
|  | King8Info | mask,
|  | Move & | bestMove
| ) |  |
| static

Referenced by osl::rating::BradleyTerry::accumulate(), osl::game_playing::GameState::generateMoves(), osl::rating::Threatmate::Helper::operator()(), and osl::search::AlphaBeta2Tree< EvalT >::quiesce().

template<Player P>

template bool osl::checkmate::ImmediateCheckmate::hasCheckmateMove< WHITE > | ( | NumEffectState const & | state) |  |
| static

一手詰めがある局面かどうか判定(move).

手番の側に王手がかかっている場合は除く 長い利きによる王手は生成しない． pinされている駒の利きがないために詰みになる例も扱わない．

Parameters

  P(template) | - 攻撃側(手番側)のプレイヤー
  state | - 局面

template<Player P>

static bool osl::checkmate::ImmediateCheckmate::hasCheckmateMove | ( | NumEffectState const & | state,
|  | King8Info |
| ) |  |
| static

template<Player P>

template bool osl::checkmate::ImmediateCheckmate::hasCheckmateMove< WHITE > | ( | NumEffectState const & | state,
|  | Move & | bestMove
| ) |  |
| static

一手詰めがある局面かどうか判定(move).

手番の側に王手がかかっている場合は除く 長い利きによる王手は生成しない． pinされている駒の利きがないために詰みになる例も扱わない．

Parameters

  P(template) | - 攻撃側(手番側)のプレイヤー
  state | - 局面
  best_move | - ある場合に詰めの手を返す

template<Player P>

template bool osl::checkmate::ImmediateCheckmate::hasCheckmateMove< WHITE > | ( | NumEffectState const & | state,
|  | King8Info | canMoveMask,
|  | Square | king,
|  | Move & | bestMove
| ) |  |
| static

bool osl::checkmate::ImmediateCheckmate::hasCheckmateMove | ( | Player | pl,
|  | NumEffectState const & | state
| ) |  |
| static

Definition at line 35 of file immediateCheckmate.cc.

References osl::BLACK.

bool osl::checkmate::ImmediateCheckmate::hasCheckmateMove | ( | Player | pl,
|  | NumEffectState const & | state,
|  | Move & | bestMove
| ) |  |
| static

Definition at line 44 of file immediateCheckmate.cc.

References osl::BLACK.

template<osl::Player P, bool setBestMove>

bool osl::checkmate::ImmediateCheckmate::hasCheckmateMove | ( | NumEffectState const & | state,
|  | Square | target,
|  | King8Info | canMoveMask,
|  | Move & | bestMove
| ) |  |

Definition at line 385 of file immediateCheckmate.tcc.

References osl::checkmate::King8Info::uint64Value().

template<osl::Player P>

bool osl::checkmate::ImmediateCheckmate::hasCheckmateMove | ( | NumEffectState const & | state,
|  | King8Info | canMoveMask
| ) |  |

Definition at line 400 of file immediateCheckmate.tcc.

References osl::Square::isOnBoard(), and target.

template<osl::Player P>

bool osl::checkmate::ImmediateCheckmate::hasCheckmateMove | ( | NumEffectState const & | state) |  |

Definition at line 414 of file immediateCheckmate.tcc.

References osl::Square::isOnBoard(), and target.

template<osl::Player P>

bool osl::checkmate::ImmediateCheckmate::hasCheckmateMove | ( | NumEffectState const & | state,
|  | King8Info | canMoveMask,
|  | Square | target,
|  | Move & | bestMove
| ) |  |

Definition at line 427 of file immediateCheckmate.tcc.

References osl::Square::isOnBoard(), and target.

template<osl::Player P>

bool osl::checkmate::ImmediateCheckmate::hasCheckmateMove | ( | NumEffectState const & | state,
|  | Move & | bestMove
| ) |  |

Definition at line 440 of file immediateCheckmate.tcc.

References target.

template<Player P, bool setBestMove>

static bool osl::checkmate::ImmediateCheckmate::hasCheckmateMoveDir | ( | NumEffectState const & | state,
|  | Square | target,
|  | King8Info | mask,
|  | Direction | d,
|  | Move & | bestMove
| ) |  |
| static

template<osl::Player P, bool setBestMove>

bool osl::checkmate::ImmediateCheckmate::hasCheckmateMoveDir | ( | NumEffectState const & | state,
|  | Square | target,
|  | King8Info | canMoveMask,
|  | Direction | d,
|  | Move & | bestMove
| ) |  |

Definition at line 363 of file immediateCheckmate.tcc.

References osl::Board_Table, osl::BoardTable::getOffset(), osl::effect_util::AdditionalEffect::hasEffect(), and osl::Square::isOnBoard().

template<Player P, bool setBestMove>

static bool osl::checkmate::ImmediateCheckmate::hasCheckmateMoveDirPiece | ( | NumEffectState const & | state,
|  | Square | target,
|  | King8Info | mask,
|  | Direction | d,
|  | Square | pos,
|  | Piece | p,
|  | Move & | bestMove
| ) |  |
| static

template<osl::Player P, bool setBestMove>

bool osl::checkmate::ImmediateCheckmate::hasCheckmateMoveDirPiece | ( | NumEffectState const & | state,
|  | Square | target,
|  | King8Info | canMoveMask,
|  | Direction | d,
|  | Square | pos,
|  | Piece | p,
|  | Move & | bestMove
| ) |  |

Definition at line 330 of file immediateCheckmate.tcc.

References osl::BLACK, osl::Board_Table, osl::canPromote(), osl::Square::canPromote(), osl::DIRECTION_INVALID_VALUE, osl::EMPTY_NUM, osl::BoardTable::getShort8Unsafe(), osl::checkmate::Immediate_Checkmate_Table, osl::inverse(), osl::isMajorBasic(), osl::checkmate::ImmediateCheckmateTable::noEffectMask(), osl::Piece::number(), osl::PAWN, osl::promote(), osl::Piece::ptype(), osl::Piece::square(), and osl::checkmate::King8Info::uint64Value().

template<Player P, bool setBestMove>

static bool osl::checkmate::ImmediateCheckmate::slowHasCheckmateMoveDirPiece | ( | NumEffectState const & | state,
|  | Square | target,
|  | King8Info | mask,
|  | Direction | d,
|  | Square | pos,
|  | Piece | p,
|  | Ptype | ptype,
|  | Move & | bestMove
| ) |  |
| static

template<osl::Player P, bool setBestMove>

bool osl::checkmate::ImmediateCheckmate::slowHasCheckmateMoveDirPiece | ( | NumEffectState const & | state,
|  | Square | target,
|  | King8Info | canMoveMask,
|  | Direction | d,
|  | Square | pos,
|  | Piece | p,
|  | Ptype | ptype,
|  | Move & | bestMove
| ) |  |

Definition at line 216 of file immediateCheckmate.tcc.

References osl::Board_Table, count, osl::BoardTable::getOffset(), osl::checkmate::Immediate_Checkmate_Table, osl::BoardTable::isBetween(), osl::Piece::isEmpty(), osl::checkmate::ImmediateCheckmateTable::noEffectMask(), osl::Piece::number(), osl::PROOK, osl::Piece::ptype(), osl::Square::square, osl::Piece::square(), osl::checkmate::King8Info::uint64Value(), osl::Square::x(), and osl::Square::y().

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

- immediateCheckmate.h
- immediateCheckmate.tcc
- immediateCheckmate.cc