All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Member Functions | Private Attributes
osl::move_generator::AddEffectTable Class Reference

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

#include <addEffectTable.h>

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

List of all members.

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 のテーブルにするのが自然だった
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


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

Definition at line 21 of file addEffectTable.h.

Referenced by getNearMask().

Definition at line 23 of file addEffectTable.h.

Referenced by getNearMaskLong().

Definition at line 26 of file addEffectTable.h.

Referenced by getNearMaskPBISHOP().

Definition at line 28 of file addEffectTable.h.

Referenced by getNearMaskPROOK().

Definition at line 22 of file addEffectTable.h.

Referenced by getNearMaskWithPromote().

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

Definition at line 25 of file addEffectTable.h.

Referenced by getOffsetLong().

Definition at line 27 of file addEffectTable.h.

Referenced by getOffsetPBISHOP().

Definition at line 29 of file addEffectTable.h.

Referenced by getOffsetPROOK().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines