osl::eval::ml::PawnDropBoth Class Reference

`#include <minorPiece.h>`

## Static Public Member Functions

static MultiInt | value (int attack_index, int defense_index, int attack_index_y, int defense_index_y, int attack_index_x, int defense_index_x)
static MultiInt | standValue (int attack_index, int defense_index, int attack_index_y, int defense_index_y, int attack_index_x, int defense_index_x)
static MultiInt | eval (const NumEffectState &state)
template<Player P>
static MultiInt | evalWithUpdate (const NumEffectState &state, Move moved, MultiInt &last_value)

## Private Types

enum | { BOTH_ON_BOARD , SELF_ON_BOARD , OPP_ON_BOARD , BOTH_ON_STAND }

## Static Private Member Functions

template<Player Owner>
static int | indexY (const Piece king, int x)
static int | index (const Square king, int x)
template<bool Attack>
static int | indexX (const Piece king, int x)

## Static Private Attributes

static CArray< MultiInt, 9 > | attack_table
static CArray< MultiInt, 9 > | defense_table
static CArray< MultiInt, 81 > | attack_y_table
static CArray< MultiInt, 81 > | defense_y_table
static CArray< MultiInt, 90 > | x_table
static CArray< MultiInt, 18 > | stand_table
static CArray< MultiInt, 90 > | x_stand_table
static CArray< MultiInt, 162 > | y_stand_table
static CArray< MultiInt, 10 > | drop_non_drop_table
static CArray< MultiInt, 36 > | state_king_relative_table

## Friends

class | PawnDrop
class | PawnDropY
class | PawnDropX
class | PawnDropPawnStand
class | PawnDropPawnStandX
class | PawnDropPawnStandY
class | PawnDropNonDrop
class | PawnStateKingRelative

## Detailed Description

Definition at line 32 of file minorPiece.h.

## Member Enumeration Documentation

## anonymous enum

anonymous enum

private

Enumerator
BOTH_ON_BOARD |
SELF_ON_BOARD |
OPP_ON_BOARD |
BOTH_ON_STAND |

Definition at line 43 of file minorPiece.h.

## Member Function Documentation

## eval()

osl::MultiInt osl::eval::ml::PawnDropBoth::eval | ( | const NumEffectState & | state | ) |

static

Definition at line 100 of file minorPiece.cc.

References osl::BLACK, BOTH_ON_BOARD, BOTH_ON_STAND, drop_non_drop_table, osl::SimpleState::hasPieceOnStand(), index(), indexX(), indexY(), osl::SimpleState::isPawnMaskSet(), osl::SimpleState::kingPiece(), osl::SimpleState::kingSquare(), OPP_ON_BOARD, osl::PAWN, SELF_ON_BOARD, standValue(), state_king_relative_table, value(), and osl::WHITE.

Referenced by evalWithUpdate(), and osl::eval::ml::OpenMidEndingEval::OpenMidEndingEval().

## evalWithUpdate()

template<Player P>

MultiInt osl::eval::ml::PawnDropBoth::evalWithUpdate | ( | const NumEffectState & | state,
|  | Move | moved,
|  | MultiInt & | last_value )

inline static

Definition at line 100 of file minorPiece.h.

References osl::alt(), osl::BLACK, BOTH_ON_BOARD, BOTH_ON_STAND, osl::captured(), osl::Move::capturePtype(), osl::SimpleState::countPiecesOnStand(), drop_non_drop_table, eval(), osl::SimpleState::hasPieceOnStand(), index(), indexX(), indexY(), osl::Move::isDrop(), osl::SimpleState::isPawnMaskSet(), osl::Move::isPromotion(), osl::KING, osl::SimpleState::kingPiece(), osl::SimpleState::kingSquare(), osl::Move::oldPtype(), OPP_ON_BOARD, osl::PAWN, osl::Move::player(), osl::playerToIndex(), osl::PPAWN, osl::Move::ptype(), osl::PTYPE_EMPTY, SELF_ON_BOARD, standValue(), state_king_relative_table, osl::Move::to(), osl::unpromote(), value(), osl::WHITE, and osl::Square::x().

Referenced by osl::eval::ml::OpenMidEndingEval::updateSub().

## index()

int osl::eval::ml::PawnDropBoth::index | ( | const Square | king,
|  | int | x )

inline static private

Definition at line 60 of file minorPiece.h.

References osl::Square::x().

Referenced by eval(), and evalWithUpdate().

## indexX()

template<bool Attack>

int osl::eval::ml::PawnDropBoth::indexX | ( | const Piece | king,
|  | int | x )

inline static private

Definition at line 65 of file minorPiece.h.

References osl::Piece::owner(), osl::Piece::square(), osl::WHITE, and osl::Square::x().

Referenced by eval(), and evalWithUpdate().

## indexY()

template<Player Owner>

int osl::eval::ml::PawnDropBoth::indexY | ( | const Piece | king,
|  | int | x )

inline static private

Definition at line 53 of file minorPiece.h.

References osl::BLACK, osl::Piece::owner(), osl::Piece::square(), osl::Square::x(), and osl::Square::y().

Referenced by eval(), and evalWithUpdate().

## standValue()

MultiInt osl::eval::ml::PawnDropBoth::standValue | ( | int | attack_index,
|  | int | defense_index,
|  | int | attack_index_y,
|  | int | defense_index_y,
|  | int | attack_index_x,
|  | int | defense_index_x )

inline static

Definition at line 86 of file minorPiece.h.

References stand_table, x_stand_table, and y_stand_table.

Referenced by eval(), and evalWithUpdate().

## value()

MultiInt osl::eval::ml::PawnDropBoth::value | ( | int | attack_index,
|  | int | defense_index,
|  | int | attack_index_y,
|  | int | defense_index_y,
|  | int | attack_index_x,
|  | int | defense_index_x )

inline static

Definition at line 74 of file minorPiece.h.

References attack_table, attack_y_table, defense_table, defense_y_table, and x_table.

Referenced by eval(), and evalWithUpdate().

## Friends And Related Symbol Documentation

## PawnDrop

friend class PawnDrop

friend

Definition at line 34 of file minorPiece.h.

References PawnDrop.

Referenced by PawnDrop.

## PawnDropNonDrop

friend class PawnDropNonDrop

friend

Definition at line 40 of file minorPiece.h.

References PawnDropNonDrop.

Referenced by PawnDropNonDrop.

## PawnDropPawnStand

friend class PawnDropPawnStand

friend

Definition at line 37 of file minorPiece.h.

References PawnDropPawnStand.

Referenced by PawnDropPawnStand.

## PawnDropPawnStandX

friend class PawnDropPawnStandX

friend

Definition at line 38 of file minorPiece.h.

References PawnDropPawnStandX.

Referenced by PawnDropPawnStandX.

## PawnDropPawnStandY

friend class PawnDropPawnStandY

friend

Definition at line 39 of file minorPiece.h.

References PawnDropPawnStandY.

Referenced by PawnDropPawnStandY.

## PawnDropX

friend class PawnDropX

friend

Definition at line 36 of file minorPiece.h.

References PawnDropX.

Referenced by PawnDropX.

## PawnDropY

friend class PawnDropY

friend

Definition at line 35 of file minorPiece.h.

References PawnDropY.

Referenced by PawnDropY.

## PawnStateKingRelative

friend class PawnStateKingRelative

friend

Definition at line 41 of file minorPiece.h.

References PawnStateKingRelative.

Referenced by PawnStateKingRelative.

## Member Data Documentation

## attack_table

osl::CArray< osl::MultiInt, 9 > osl::eval::ml::PawnDropBoth::attack_table

static private

Definition at line 44 of file minorPiece.h.

Referenced by osl::eval::ml::PawnDrop::setUp(), and value().

## attack_y_table

osl::CArray< osl::MultiInt, 81 > osl::eval::ml::PawnDropBoth::attack_y_table

static private

Definition at line 45 of file minorPiece.h.

Referenced by osl::eval::ml::PawnDropY::setUp(), and value().

## defense_table

osl::CArray< osl::MultiInt, 9 > osl::eval::ml::PawnDropBoth::defense_table

static private

Definition at line 44 of file minorPiece.h.

Referenced by osl::eval::ml::PawnDrop::setUp(), and value().

## defense_y_table

osl::CArray< osl::MultiInt, 81 > osl::eval::ml::PawnDropBoth::defense_y_table

static private

Definition at line 45 of file minorPiece.h.

Referenced by osl::eval::ml::PawnDropY::setUp(), and value().

## drop_non_drop_table

osl::CArray< osl::MultiInt, 10 > osl::eval::ml::PawnDropBoth::drop_non_drop_table

static private

Definition at line 50 of file minorPiece.h.

Referenced by eval(), evalWithUpdate(), and osl::eval::ml::PawnDropNonDrop::setUp().

## stand_table

osl::CArray< osl::MultiInt, 18 > osl::eval::ml::PawnDropBoth::stand_table

static private

Definition at line 47 of file minorPiece.h.

Referenced by osl::eval::ml::PawnDropPawnStand::setUp(), and standValue().

## state_king_relative_table

osl::CArray< osl::MultiInt, 36 > osl::eval::ml::PawnDropBoth::state_king_relative_table

static private

Definition at line 51 of file minorPiece.h.

Referenced by eval(), evalWithUpdate(), and osl::eval::ml::PawnStateKingRelative::setUp().

## x_stand_table

osl::CArray< osl::MultiInt, 90 > osl::eval::ml::PawnDropBoth::x_stand_table

static private

Definition at line 48 of file minorPiece.h.

Referenced by osl::eval::ml::PawnDropPawnStandX::setUp(), and standValue().

## x_table

osl::CArray< osl::MultiInt, 90 > osl::eval::ml::PawnDropBoth::x_table

static private

Definition at line 46 of file minorPiece.h.

Referenced by osl::eval::ml::PawnDropX::setUp(), and value().

## y_stand_table

osl::CArray< osl::MultiInt, 162 > osl::eval::ml::PawnDropBoth::y_stand_table

static private

Definition at line 49 of file minorPiece.h.

Referenced by osl::eval::ml::PawnDropPawnStandY::setUp(), and standValue().

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

- minorPiece.h
- minorPiece.cc