osl::eval::ml::KnightAdvance Class Reference

`#include <minorPiece.h>`

## Public Types

enum | { DIM = 9 }

## Static Public Member Functions

static void | setUp (const Weights &weights, int stage)
static MultiInt | eval (const NumEffectState &state)

## Static Private Member Functions

static int | index (Player P, Square pos)
template<Player P>
static bool | cantAdvance (const NumEffectState &state, const Piece knight)

## Static Private Attributes

static CArray< MultiInt, 9 > | table

## Detailed Description

Definition at line 696 of file minorPiece.h.

## Member Enumeration Documentation

## anonymous enum

anonymous enum

Enumerator
DIM |

Definition at line 699 of file minorPiece.h.

## Member Function Documentation

## cantAdvance()

template<osl::Player P>

bool osl::eval::ml::KnightAdvance::cantAdvance | ( | const NumEffectState & | state,
|  | const Piece | knight )

inline static private

Definition at line 456 of file minorPiece.cc.

References osl::Piece::canMoveOn(), osl::Piece::owner(), osl::SimpleState::pieceAt(), and osl::Piece::square().

Referenced by eval().

## eval()

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

static

Definition at line 483 of file minorPiece.cc.

References osl::BLACK, cantAdvance(), index(), osl::Piece::isOnBoard(), osl::Piece::isPromoted(), osl::Piece::owner(), osl::SimpleState::pieceOf(), osl::Piece::square(), table, and osl::WHITE.

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

## index()

int osl::eval::ml::KnightAdvance::index | ( | Player | P,
|  | Square | pos )

inline static private

Definition at line 702 of file minorPiece.h.

References osl::BLACK, and osl::Square::y().

Referenced by eval().

## setUp()

void osl::eval::ml::KnightAdvance::setUp | ( | const Weights & | weights,
|  | int | stage )

static

Definition at line 475 of file minorPiece.cc.

References osl::eval::ml::Weights::dimension(), table, and osl::eval::ml::Weights::value().

## Member Data Documentation

## table

osl::CArray< MultiInt, 9 > osl::eval::ml::KnightAdvance::table

static private

Definition at line 701 of file minorPiece.h.

Referenced by eval(), and setUp().

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

- minorPiece.h
- minorPiece.cc