All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Static Public Member Functions | List of all members
osl::eval::TakeBackValue Struct Reference

Static Public Member Functions

template<Player P>
static void findEffectPieces (const NumEffectState &state, Square effect_to, PtypeOSquareVector &my_pieces, PtypeOSquareVector &op_pieces)
 effectTo に利きのある駒を全て集める More...
 
template<Player P>
static void findEffectPiecesAfterMove (const NumEffectState &state, Move move, PtypeOSquareVector &my_pieces, PtypeOSquareVector &op_pieces)
 move 後に move.to() に利きのある駒を全て集める More...
 
template<Player P>
static int computeValue (Square target, PtypeO ptypeO, const PtypeOSquareVector &my_pieces, const PtypeOSquareVector &op_pieces)
 PtypeOSquareVector をもとに取り返し値を計算する More...
 

Detailed Description

Definition at line 61 of file pieceEval.tcc.

Member Function Documentation

template<Player P>
static int osl::eval::TakeBackValue::computeValue ( Square  target,
PtypeO  ptypeO,
const PtypeOSquareVector &  my_pieces,
const PtypeOSquareVector &  op_pieces 
)
inlinestatic

PtypeOSquareVector をもとに取り返し値を計算する

FIXME: 利きを延ばすコードを入れる前に PtypeOSquareVector を PtypeO,Square のベクタに変更する必要がある. computeDiffAfterMoveMulti などで駒を動かさずに, move 後の取り合いを考えている時に,piece.square() が必ずしも 取り合いのためのposition ではないため.

Parameters
Palt(P) からの取り返し
targetここに関する取り返し
ptypeotarget にあると想定される駒

Definition at line 146 of file pieceEval.tcc.

References osl::canPromote(), osl::Square::canPromote(), osl::eval::PtypeEvalTable::captureValue(), osl::eval::max(), osl::promote(), osl::eval::PtypeEvalTable::promoteValue(), and osl::eval::Ptype_Eval_Table.

template<Player P>
static void osl::eval::TakeBackValue::findEffectPieces ( const NumEffectState &  state,
Square  effect_to,
PtypeOSquareVector &  my_pieces,
PtypeOSquareVector &  op_pieces 
)
inlinestatic

effectTo に利きのある駒を全て集める

Definition at line 65 of file pieceEval.tcc.

template<Player P>
static void osl::eval::TakeBackValue::findEffectPiecesAfterMove ( const NumEffectState &  state,
Move  move,
PtypeOSquareVector &  my_pieces,
PtypeOSquareVector &  op_pieces 
)
inlinestatic

move 後に move.to() に利きのある駒を全て集める

この部分は effectの種類によっては高速に求まるかもしれない

offsetからshortを求める

knight moveは0にしたいが,Board_Tableには対応するものはない

Definition at line 81 of file pieceEval.tcc.

References osl::Board_Table, osl::dirToMask(), osl::Move::from(), osl::BoardTable::getLongDirection(), osl::PtypeTable::getMoveMask(), osl::BoardTable::getShortOffsetNotKnight(), osl::Piece::isOnBoardByOwner(), osl::Piece::ptype(), osl::Ptype_Table, osl::Move::to(), and osl::Offset::zero().


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