All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Private Member Functions | Private Attributes | List of all members
osl::move_generator::AddEffectTable Class Reference

利きをつける手を生成するためのテーブル. More...

#include <addEffectTable.h>

Collaboration diagram for osl::move_generator::AddEffectTable:
Collaboration graph
[legend]

Public Member Functions

 AddEffectTable ()
 
template<Player P>
NearMask getNearMask (Ptype ptype, Square from, Square to) const
 
template<Player P>
NearMask getNearMaskWithPromote (Ptype ptype, Square from, Square to) const
 
template<Player P>
NearMask getNearMaskLong (Ptype ptype, Square from, Square to) const
 
template<Player P>
Offset getOffsetLong (Ptype ptype, Square from, Square to, int n) const
 
template<Player P>
NearMask getNearMaskPBISHOP (Square from, Square to) const
 
template<Player P>
Offset getOffsetPBISHOP (Square from, Square to, int n) const
 
template<Player P>
NearMask getNearMaskPROOK (Square from, Square to) const
 
template<Player P>
Offset getOffsetPROOK (Square from, Square to, int n) const
 

Private Member Functions

void setNearMaskLong (Ptype ptype, int dx, int dy)
 

Private Attributes

CArray2d< NearMask, PTYPE_SIZE,
Offset32::SIZE
nearMask
 
CArray2d< NearMask, PTYPE_SIZE,
Offset32::SIZE
nearMaskWithPromote
 
CArray2d< NearMask, PTYPE_SIZE,
Offset32::SIZE
nearMaskLong
 
CArray3d< Offset, PTYPE_SIZE,
Offset32::SIZE, 8 > 
offsetLong
 実は 4 bit * 8 のテーブルにするのが自然だった More...
 
CArray< NearMask, Offset32::SIZEnearMaskPBISHOP
 
CArray2d< Offset,
Offset32::SIZE, 8 > 
offsetPBISHOP
 
CArray< NearMask, Offset32::SIZEnearMaskPROOK
 
CArray2d< Offset,
Offset32::SIZE, 8 > 
offsetPROOK
 

Detailed Description

利きをつける手を生成するためのテーブル.

Definition at line 19 of file addEffectTable.h.

Constructor & Destructor Documentation

osl::move_generator::AddEffectTable::AddEffectTable ( )

Member Function Documentation

template<Player P>
NearMask osl::move_generator::AddEffectTable::getNearMask ( Ptype  ptype,
Square  from,
Square  to 
) const
inline
Parameters
P(template)- 手番のプレイヤー
ptype- 動かそうとする駒の種類
from- 動かそうとする駒の位置
to- 利きをつけたいマス

Definition at line 40 of file addEffectTable.h.

References osl::Square::isOnBoard(), osl::isValid(), and nearMask.

Referenced by osl::move_generator::without_effect::generateLongMoveDirectCanPromote(), osl::move_generator::without_effect::generateLongMoveDirectNoPromote(), and osl::move_generator::without_effect::generateMove().

template<Player P>
NearMask osl::move_generator::AddEffectTable::getNearMaskLong ( Ptype  ptype,
Square  from,
Square  to 
) const
inline
template<Player P>
NearMask osl::move_generator::AddEffectTable::getNearMaskPBISHOP ( Square  from,
Square  to 
) const
inline
template<Player P>
NearMask osl::move_generator::AddEffectTable::getNearMaskPROOK ( Square  from,
Square  to 
) const
inline
template<Player P>
NearMask osl::move_generator::AddEffectTable::getNearMaskWithPromote ( Ptype  ptype,
Square  from,
Square  to 
) const
inline
template<Player P>
Offset osl::move_generator::AddEffectTable::getOffsetLong ( Ptype  ptype,
Square  from,
Square  to,
int  n 
) const
inline
template<Player P>
Offset osl::move_generator::AddEffectTable::getOffsetPBISHOP ( Square  from,
Square  to,
int  n 
) const
inline
template<Player P>
Offset osl::move_generator::AddEffectTable::getOffsetPROOK ( Square  from,
Square  to,
int  n 
) const
inline
void osl::move_generator::AddEffectTable::setNearMaskLong ( Ptype  ptype,
int  dx,
int  dy 
)
private

Member Data Documentation

CArray2d<NearMask, PTYPE_SIZE, Offset32::SIZE> osl::move_generator::AddEffectTable::nearMask
private

Definition at line 21 of file addEffectTable.h.

Referenced by getNearMask().

CArray2d<NearMask, PTYPE_SIZE, Offset32::SIZE> osl::move_generator::AddEffectTable::nearMaskLong
private

Definition at line 23 of file addEffectTable.h.

Referenced by getNearMaskLong().

CArray<NearMask,Offset32::SIZE> osl::move_generator::AddEffectTable::nearMaskPBISHOP
private

Definition at line 26 of file addEffectTable.h.

Referenced by getNearMaskPBISHOP().

CArray<NearMask,Offset32::SIZE> osl::move_generator::AddEffectTable::nearMaskPROOK
private

Definition at line 28 of file addEffectTable.h.

Referenced by getNearMaskPROOK().

CArray2d<NearMask, PTYPE_SIZE, Offset32::SIZE> osl::move_generator::AddEffectTable::nearMaskWithPromote
private

Definition at line 22 of file addEffectTable.h.

Referenced by getNearMaskWithPromote().

CArray3d<Offset,PTYPE_SIZE,Offset32::SIZE,8> osl::move_generator::AddEffectTable::offsetLong
private

実は 4 bit * 8 のテーブルにするのが自然だった

Definition at line 25 of file addEffectTable.h.

Referenced by getOffsetLong().

CArray2d<Offset,Offset32::SIZE,8> osl::move_generator::AddEffectTable::offsetPBISHOP
private

Definition at line 27 of file addEffectTable.h.

Referenced by getOffsetPBISHOP().

CArray2d<Offset,Offset32::SIZE,8> osl::move_generator::AddEffectTable::offsetPROOK
private

Definition at line 29 of file addEffectTable.h.

Referenced by getOffsetPROOK().


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