All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Private Member Functions | Private Attributes | List of all members
osl::effect::Liberty8< P > Class Template Reference

自分の駒があるマスの8近傍の敵の利きの状態を得る. More...

#include <liberty8.h>

Collaboration diagram for osl::effect::Liberty8< P >:
Collaboration graph
[legend]

Public Member Functions

 Liberty8 (NumEffectState const &state, Square target)
 
void andMask (NearMask m)
 
NearMask getMask () const
 
int count () const
 8 bit のテーブルを使って速く計算できるが More...
 

Private Member Functions

template<Ptype T>
void addMaskPtype (NumEffectState const &state, Square target, NearMask nearMask)
 
template<typename U >
void addMask (NumEffectState const &state, Square target, NearMask nearMask, U)
 
void addMask (NumEffectState const &, Square, NearMask, ptl::NullPtype)
 
template<Ptype T, typename Tail >
void addMask (NumEffectState const &state, Square target, NearMask nearMask, ptl::PtypeList< T, Tail >)
 

Private Attributes

NearMask mask
 

Detailed Description

template<Player P>
class osl::effect::Liberty8< P >

自分の駒があるマスの8近傍の敵の利きの状態を得る.

Definition at line 109 of file liberty8.h.

Constructor & Destructor Documentation

template<osl::Player P>
osl::effect::Liberty8< P >::Liberty8 ( NumEffectState const &  state,
Square  target 
)

targetには必ず P 側の駒があるべき

10近傍の駒の有無を記録 本当は8近傍で良いのだが

下位8ビットのみで良い TODO: これの型は NearMask とは別であるべき?

Definition at line 160 of file liberty8.h.

References target.

Member Function Documentation

template<Player P>
template<typename U >
void osl::effect::Liberty8< P >::addMask ( NumEffectState const &  state,
Square  target,
NearMask  nearMask,
U   
)
private
template<Player P>
void osl::effect::Liberty8< P >::addMask ( NumEffectState const &  ,
Square  ,
NearMask  ,
ptl::NullPtype   
)
inlineprivate

Definition at line 126 of file liberty8.h.

template<Player P>
template<Ptype T, typename Tail >
void osl::effect::Liberty8< P >::addMask ( NumEffectState const &  state,
Square  target,
NearMask  nearMask,
ptl::PtypeList< T, Tail >   
)
inlineprivate

Definition at line 129 of file liberty8.h.

References osl::effect::Liberty8< P >::addMask(), and target.

template<Player P>
template<Ptype T>
void osl::effect::Liberty8< P >::addMaskPtype ( NumEffectState const &  state,
Square  target,
NearMask  nearMask 
)
inlineprivate

Definition at line 116 of file liberty8.h.

template<Player P>
void osl::effect::Liberty8< P >::andMask ( NearMask  m)
inline

Definition at line 136 of file liberty8.h.

References osl::effect::Liberty8< P >::mask.

template<Player P>
int osl::effect::Liberty8< P >::count ( ) const
inline

8 bit のテーブルを使って速く計算できるが

Definition at line 145 of file liberty8.h.

References osl::effect::Liberty8< P >::mask.

template<Player P>
NearMask osl::effect::Liberty8< P >::getMask ( ) const
inline

Definition at line 139 of file liberty8.h.

References osl::effect::Liberty8< P >::mask.

Member Data Documentation

template<Player P>
NearMask osl::effect::Liberty8< P >::mask
private

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