My Project
Public Types | 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:
osl::eval::ml::BishopEffect osl::eval::ml::BishopEffectPieceKingRelative

Public Types

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

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 - 馬の場合
 
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 - 馬の場合
 
static int index2 (Square king, Square from, bool isP)
 黒の角(馬)がある場所は空マスでないのでその分を補正するテーブル {attack,defense}_nospace へのアクセス king - 玉の位置 from - 角(馬)の位置 isP - 馬の場合
 
static int index2 (int x_diff, int y_diff, bool isP)
 黒の角(馬)がある場所は空マスでないのでその分を補正するテーブル {attack,defense}_nospace へのアクセス (x_diff, y_diff) - 玉を基準にしてみた角(馬)の相対位置 isP - 馬の場合
 

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 306 of file majorPiece.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
ONE_DIM 
DIM 

Definition at line 310 of file majorPiece.h.

Member Function Documentation

◆ eval()

MultiInt osl::eval::ml::BishopEffectBase::eval ( const NumEffectState state)
static

◆ evalOne()

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 
)
inlinestaticprotected

◆ index()

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

Definition at line 323 of file majorPiece.h.

Referenced by index1(), and index2().

◆ index0()

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

Definition at line 329 of file majorPiece.h.

References osl::PTYPEO_MIN.

◆ index1() [1/2]

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 359 of file majorPiece.h.

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

◆ index1() [2/2]

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 345 of file majorPiece.h.

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

Referenced by index1().

◆ index2() [1/2]

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 386 of file majorPiece.h.

References index().

◆ index2() [2/2]

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

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

Definition at line 374 of file majorPiece.h.

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

Referenced by index2().

Friends And Related Symbol Documentation

◆ BishopEffectPiece

friend class BishopEffectPiece
friend

Definition at line 308 of file majorPiece.h.

Member Data Documentation

◆ attack_dl

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

Definition at line 399 of file majorPiece.h.

◆ attack_dr

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

Definition at line 398 of file majorPiece.h.

◆ attack_nospace

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

Definition at line 404 of file majorPiece.h.

◆ attack_table

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

Definition at line 393 of file majorPiece.h.

◆ attack_ul

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

Definition at line 397 of file majorPiece.h.

◆ attack_ur

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

Definition at line 396 of file majorPiece.h.

◆ defense_dl

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

Definition at line 403 of file majorPiece.h.

◆ defense_dr

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

Definition at line 402 of file majorPiece.h.

◆ defense_nospace

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

Definition at line 405 of file majorPiece.h.

◆ defense_table

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

Definition at line 394 of file majorPiece.h.

◆ defense_ul

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

Definition at line 401 of file majorPiece.h.

◆ defense_ur

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

Definition at line 400 of file majorPiece.h.

◆ piece_table

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

Definition at line 395 of file majorPiece.h.

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


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