All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Static Public Member Functions | Static Protected Member Functions | Static Protected Attributes | Friends | List of all members
osl::eval::ml::BishopEffectBase Class Reference

#include <majorPiece.h>

Inheritance diagram for osl::eval::ml::BishopEffectBase:
Inheritance graph
[legend]
Collaboration diagram for osl::eval::ml::BishopEffectBase:
Collaboration graph
[legend]

Public Types

enum  { ONE_DIM = 612, DIM = ONE_DIM * 2 }
 

Public Member Functions

template<osl::Player P>
MultiInt evalOne (const NumEffectState &state, Square bishop, Square myKing, Square opKing, Square ulp, Square urp, Square dlp, Square drp, bool isP)
 

Static Public Member Functions

static MultiInt eval (const NumEffectState &state)
 

Static Protected Member Functions

template<Player P>
static MultiInt evalOne (const NumEffectState &state, Square bishop, Square myKing, Square opKing, Square ulp, Square urp, Square dlp, Square drp, bool isP)
 
static int index (int x_diff, int y_diff, bool ur, bool promoted)
 
static int index0 (int x_diff, int y_diff, PtypeO ptypeO, bool ur, bool promoted)
 
static int index1 (Square king, Square from, PtypeO ptypeO, bool isP)
 黒の角(馬)からの利きのある駒のindex {attack,defense}_{ul,ur,dl,dr} へのアクセスに使う from - 駒の位置 king - 玉の位置 ptypeO - 駒の種類,白からの利きの場合は反転. (BLACK,PTYPE_EDGE)もあり得る isP - 馬の場合 More...
 
static int index1 (int x_diff, int y_diff, PtypeO ptypeO, bool isP)
 黒の角(馬)からの利きのある駒のindex {attack,defense}_{ul,ur,dl,dr} へのアクセスに使う (x_diff, y_diff) - 玉を基準に見た駒の相対位置 ptypeO - 駒の種類,白からの利きの場合は反転. (BLACK,PTYPE_EDGE)もあり得る isP - 馬の場合 More...
 
static int index2 (Square king, Square from, bool isP)
 黒の角(馬)がある場所は空マスでないのでその分を補正するテーブル {attack,defense}_nospace へのアクセス king - 玉の位置 from - 角(馬)の位置 isP - 馬の場合 More...
 
static int index2 (int x_diff, int y_diff, bool isP)
 黒の角(馬)がある場所は空マスでないのでその分を補正するテーブル {attack,defense}_nospace へのアクセス (x_diff, y_diff) - 玉を基準にしてみた角(馬)の相対位置 isP - 馬の場合 More...
 

Static Protected Attributes

static CArray< MultiInt, 612 > attack_table
 
static CArray< MultiInt, 612 > defense_table
 
static CArray< MultiInt, 32 > piece_table
 
static CArray< MultiInt, 23104 > attack_ur
 
static CArray< MultiInt, 23104 > attack_ul
 
static CArray< MultiInt, 23104 > attack_dr
 
static CArray< MultiInt, 23104 > attack_dl
 
static CArray< MultiInt, 23104 > defense_ur
 
static CArray< MultiInt, 23104 > defense_ul
 
static CArray< MultiInt, 23104 > defense_dr
 
static CArray< MultiInt, 23104 > defense_dl
 
static CArray< MultiInt, 722 > attack_nospace
 
static CArray< MultiInt, 722 > defense_nospace
 

Friends

class BishopEffectPiece
 

Detailed Description

Definition at line 308 of file majorPiece.h.

Member Enumeration Documentation

anonymous enum
Enumerator
ONE_DIM 
DIM 

Definition at line 312 of file majorPiece.h.

Member Function Documentation

MultiInt osl::eval::ml::BishopEffectBase::eval ( const NumEffectState &  state)
static
template<Player P>
static MultiInt osl::eval::ml::BishopEffectBase::evalOne ( const NumEffectState &  state,
Square  bishop,
Square  myKing,
Square  opKing,
Square  ulp,
Square  urp,
Square  dlp,
Square  drp,
bool  isP 
)
staticprotected
template<osl::Player P>
MultiInt osl::eval::ml::BishopEffectBase::evalOne ( const NumEffectState &  state,
Square  bishop,
Square  myKing,
Square  opKing,
Square  ulp,
Square  urp,
Square  dlp,
Square  drp,
bool  isP 
)
inline
static int osl::eval::ml::BishopEffectBase::index ( int  x_diff,
int  y_diff,
bool  ur,
bool  promoted 
)
inlinestaticprotected

Definition at line 325 of file majorPiece.h.

Referenced by index1(), and index2().

static int osl::eval::ml::BishopEffectBase::index0 ( int  x_diff,
int  y_diff,
PtypeO  ptypeO,
bool  ur,
bool  promoted 
)
inlinestaticprotected

Definition at line 331 of file majorPiece.h.

References osl::PTYPEO_MIN.

static int osl::eval::ml::BishopEffectBase::index1 ( Square  king,
Square  from,
PtypeO  ptypeO,
bool  isP 
)
inlinestaticprotected

黒の角(馬)からの利きのある駒のindex {attack,defense}_{ul,ur,dl,dr} へのアクセスに使う from - 駒の位置 king - 玉の位置 ptypeO - 駒の種類,白からの利きの場合は反転. (BLACK,PTYPE_EDGE)もあり得る isP - 馬の場合

Definition at line 347 of file majorPiece.h.

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

static int osl::eval::ml::BishopEffectBase::index1 ( int  x_diff,
int  y_diff,
PtypeO  ptypeO,
bool  isP 
)
inlinestaticprotected

黒の角(馬)からの利きのある駒のindex {attack,defense}_{ul,ur,dl,dr} へのアクセスに使う (x_diff, y_diff) - 玉を基準に見た駒の相対位置 ptypeO - 駒の種類,白からの利きの場合は反転. (BLACK,PTYPE_EDGE)もあり得る isP - 馬の場合

Definition at line 361 of file majorPiece.h.

References osl::getPtype(), index(), osl::PTYPE_EMPTY, and osl::PTYPEO_MIN.

static int osl::eval::ml::BishopEffectBase::index2 ( Square  king,
Square  from,
bool  isP 
)
inlinestaticprotected

黒の角(馬)がある場所は空マスでないのでその分を補正するテーブル {attack,defense}_nospace へのアクセス king - 玉の位置 from - 角(馬)の位置 isP - 馬の場合

Definition at line 376 of file majorPiece.h.

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

static int osl::eval::ml::BishopEffectBase::index2 ( int  x_diff,
int  y_diff,
bool  isP 
)
inlinestaticprotected

黒の角(馬)がある場所は空マスでないのでその分を補正するテーブル {attack,defense}_nospace へのアクセス (x_diff, y_diff) - 玉を基準にしてみた角(馬)の相対位置 isP - 馬の場合

Definition at line 388 of file majorPiece.h.

References index().

Friends And Related Function Documentation

friend class BishopEffectPiece
friend

Definition at line 310 of file majorPiece.h.

Member Data Documentation

osl::misc::CArray< MultiInt, 23104 > osl::eval::ml::BishopEffectBase::attack_dl
staticprotected

Definition at line 401 of file majorPiece.h.

osl::misc::CArray< MultiInt, 23104 > osl::eval::ml::BishopEffectBase::attack_dr
staticprotected

Definition at line 400 of file majorPiece.h.

osl::misc::CArray< MultiInt, 722 > osl::eval::ml::BishopEffectBase::attack_nospace
staticprotected

Definition at line 406 of file majorPiece.h.

osl::misc::CArray< MultiInt, 612 > osl::eval::ml::BishopEffectBase::attack_table
staticprotected

Definition at line 395 of file majorPiece.h.

osl::misc::CArray< MultiInt, 23104 > osl::eval::ml::BishopEffectBase::attack_ul
staticprotected

Definition at line 399 of file majorPiece.h.

osl::misc::CArray< MultiInt, 23104 > osl::eval::ml::BishopEffectBase::attack_ur
staticprotected

Definition at line 398 of file majorPiece.h.

osl::misc::CArray< MultiInt, 23104 > osl::eval::ml::BishopEffectBase::defense_dl
staticprotected

Definition at line 405 of file majorPiece.h.

osl::misc::CArray< MultiInt, 23104 > osl::eval::ml::BishopEffectBase::defense_dr
staticprotected

Definition at line 404 of file majorPiece.h.

osl::misc::CArray< MultiInt, 722 > osl::eval::ml::BishopEffectBase::defense_nospace
staticprotected

Definition at line 407 of file majorPiece.h.

osl::misc::CArray< MultiInt, 612 > osl::eval::ml::BishopEffectBase::defense_table
staticprotected

Definition at line 396 of file majorPiece.h.

osl::misc::CArray< MultiInt, 23104 > osl::eval::ml::BishopEffectBase::defense_ul
staticprotected

Definition at line 403 of file majorPiece.h.

osl::misc::CArray< MultiInt, 23104 > osl::eval::ml::BishopEffectBase::defense_ur
staticprotected

Definition at line 402 of file majorPiece.h.

osl::misc::CArray< MultiInt, 32 > osl::eval::ml::BishopEffectBase::piece_table
staticprotected

Definition at line 397 of file majorPiece.h.

Referenced by osl::eval::ml::BishopEffectPiece::setUp().


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