My Project
Public Member Functions | Static Public Member Functions | Static Public Attributes | Static Private Member Functions | Private Attributes | List of all members
osl::rating::Pattern Class Reference

#include <pattern.h>

Inheritance diagram for osl::rating::Pattern:
osl::rating::Feature osl::rating::CountEffect2

Public Member Functions

 Pattern (Direction d, Ptype s, Ptype t, bool ss, int attack, int defense)
 
 Pattern (Direction d, Direction d2, Ptype s, Ptype t, bool ss, int attack, int defense)
 
bool match (const NumEffectState &state, Move move, const RatingEnv &env) const
 
- Public Member Functions inherited from osl::rating::Feature
 Feature (const std::string &name)
 
virtual ~Feature ()
 
virtual bool effectiveInCheck () const
 
const std::string & name () const
 

Static Public Member Functions

static Square nextSquare (Player player, Square start, Direction direction, Direction direction2)
 
static Square nextSquare (Move move, Direction direction, Direction direction2)
 

Static Public Attributes

static const Direction INVALID = LONG_UL
 

Static Private Member Functions

static const std::string name (Direction d, Direction d2, Ptype self, Ptype target, bool same)
 
- Static Private Member Functions inherited from osl::rating::CountEffect2
static std::pair< int, int > count (const NumEffectState &state, Square position, const RatingEnv &env)
 
static std::string name (int attack, int defense)
 
static int index (const NumEffectState &state, Square position, const RatingEnv &env)
 

Private Attributes

Direction direction
 
Direction direction2
 
Ptype self
 
Ptype target
 
bool same
 
- Private Attributes inherited from osl::rating::CountEffect2
int attack
 
int defense
 

Additional Inherited Members

- Private Member Functions inherited from osl::rating::CountEffect2
 CountEffect2 (int a, int d)
 
bool match (const NumEffectState &state, Square position, const RatingEnv &env) const
 
- Static Private Attributes inherited from osl::rating::CountEffect2
static const int Max = 2
 

Detailed Description

Definition at line 13 of file pattern.h.

Constructor & Destructor Documentation

◆ Pattern() [1/2]

osl::rating::Pattern::Pattern ( Direction  d,
Ptype  s,
Ptype  t,
bool  ss,
int  attack,
int  defense 
)
inline

Definition at line 23 of file pattern.h.

◆ Pattern() [2/2]

osl::rating::Pattern::Pattern ( Direction  d,
Direction  d2,
Ptype  s,
Ptype  t,
bool  ss,
int  attack,
int  defense 
)
inline

Definition at line 28 of file pattern.h.

Member Function Documentation

◆ match()

bool osl::rating::Pattern::match ( const NumEffectState state,
Move  move,
const RatingEnv env 
) const
inlinevirtual

◆ name()

const std::string osl::rating::Pattern::name ( Direction  d,
Direction  d2,
Ptype  self,
Ptype  target,
bool  same 
)
staticprivate

◆ nextSquare() [1/2]

static Square osl::rating::Pattern::nextSquare ( Move  move,
Direction  direction,
Direction  direction2 
)
inlinestatic

Definition at line 40 of file pattern.h.

References direction, direction2, nextSquare(), osl::Move::player(), and osl::Move::to().

◆ nextSquare() [2/2]

static Square osl::rating::Pattern::nextSquare ( Player  player,
Square  start,
Direction  direction,
Direction  direction2 
)
inlinestatic

Member Data Documentation

◆ direction

Direction osl::rating::Pattern::direction
private

Definition at line 18 of file pattern.h.

Referenced by match(), nextSquare(), and nextSquare().

◆ direction2

Direction osl::rating::Pattern::direction2
private

Definition at line 18 of file pattern.h.

Referenced by match(), nextSquare(), and nextSquare().

◆ INVALID

const Direction osl::rating::Pattern::INVALID = LONG_UL
static

Definition at line 16 of file pattern.h.

Referenced by name(), osl::rating::PatternGroup::name(), and nextSquare().

◆ same

bool osl::rating::Pattern::same
private

Definition at line 20 of file pattern.h.

Referenced by match(), and name().

◆ self

Ptype osl::rating::Pattern::self
private

Definition at line 19 of file pattern.h.

Referenced by match(), and name().

◆ target

Ptype osl::rating::Pattern::target
private

Definition at line 19 of file pattern.h.

Referenced by match(), and name().


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