osl::rating::BigramAttack 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 | Private Attributes | List of all members
osl::rating::BigramAttack Class Reference

`#include <bigramAttack.h>`

Inheritance diagram for osl::rating::BigramAttack:
[legend]
Collaboration diagram for osl::rating::BigramAttack:
[legend]

## Public Member Functions
| BigramAttack (int x1, int y1, int x2, int y2, int king_index, bool s, bool f)
bool | match (const NumEffectState &state, Move move, const RatingEnv &env) const
Public Member Functions inherited from osl::rating::Feature
| Feature (const std::string &name)
virtual | ~Feature ()
virtual bool | effectiveInCheck () const
const std::string & | name () const

## Static Public Member Functions
static const std::string | name (int x1, int y1, int x2, int y2, int king_index, bool s, bool f)
static int | indexKing (Player attack, Square king, bool focus_x)
static int | indexOfMove (Square king, Move move)
static int | index (const NumEffectState &state, Move move, const RatingEnv &env, bool same, bool focus_x)

## Private Attributes
int | property
bool | same
bool | focus_x

## Detailed Description

Definition at line 12 of file bigramAttack.h.

## Constructor & Destructor Documentation

osl::rating::BigramAttack::BigramAttack | ( | int | x1,
|  | int | y1,
|  | int | x2,
|  | int | y2,
|  | int | king_index,
|  | bool | s,
|  | bool | f
| ) |  |
| inline

Definition at line 18 of file bigramAttack.h.

## Member Function Documentation

static int osl::rating::BigramAttack::index | ( | const NumEffectState & | state,
|  | Move | move,
|  | const RatingEnv & | env,
|  | bool | same,
|  | bool | focus_x
| ) |  |
| inlinestatic

Definition at line 50 of file bigramAttack.h.

References osl::alt(), focus_x, osl::rating::RatingEnv::history, indexKing(), indexOfMove(), osl::Move::isNormal(), and osl::Move::player().

Referenced by osl::rating::BigramAttackGroup::findMatch(), and match().

static int osl::rating::BigramAttack::indexKing | ( | Player | attack,
|  | Square | king,
|  | bool | focus_x
| ) |  |
| inlinestatic

Definition at line 23 of file bigramAttack.h.

References osl::WHITE, osl::Square::x(), and osl::Square::y().

Referenced by index().

static int osl::rating::BigramAttack::indexOfMove | ( | Square | king,
|  | Move | move
| ) |  |
| inlinestatic

Definition at line 34 of file bigramAttack.h.

References osl::Move::player(), osl::Move::to(), osl::WHITE, osl::Square::x(), and osl::Square::y().

Referenced by index().

bool osl::rating::BigramAttack::match | ( | const NumEffectState & | state,
|  | Move | move,
|  | const RatingEnv & | env
| ) |  | const
| inlinevirtual

Implements osl::rating::Feature.

Definition at line 66 of file bigramAttack.h.

References focus_x, index(), property, and same.

const std::string osl::rating::BigramAttack::name | ( | int | x1,
|  | int | y1,
|  | int | x2,
|  | int | y2,
|  | int | king_index,
|  | bool | s,
|  | bool | f
| ) |  |
| static

Definition at line 7 of file bigramAttack.cc.

## Member Data Documentation

bool osl::rating::BigramAttack::focus_x
| private

Definition at line 15 of file bigramAttack.h.

Referenced by index(), and match().

int osl::rating::BigramAttack::property
| private

Definition at line 14 of file bigramAttack.h.

Referenced by match().

bool osl::rating::BigramAttack::same
| private

Definition at line 15 of file bigramAttack.h.

Referenced by match().

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

- bigramAttack.h
- bigramAttack.cc