#include <pattern.h>
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 |
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) |
Private Attributes | |
Direction | direction |
Direction | direction2 |
Ptype | self |
Ptype | target |
bool | same |
osl::rating::Pattern::Pattern | ( | Direction | d, |
Ptype | s, | ||
Ptype | t, | ||
bool | ss, | ||
int | attack, | ||
int | defense | ||
) | [inline] |
osl::rating::Pattern::Pattern | ( | Direction | d, |
Direction | d2, | ||
Ptype | s, | ||
Ptype | t, | ||
bool | ss, | ||
int | attack, | ||
int | defense | ||
) | [inline] |
bool osl::rating::Pattern::match | ( | const NumEffectState & | state, |
Move | move, | ||
const RatingEnv & | env | ||
) | const [inline, virtual] |
Implements osl::rating::Feature.
Definition at line 44 of file pattern.h.
References direction, direction2, osl::Piece::EMPTY(), osl::Move::from(), osl::isPiece(), osl::rating::CountEffect2::match(), nextSquare(), osl::Piece::owner(), osl::Move::player(), osl::Piece::ptype(), osl::Move::ptype(), same, and target.
const std::string osl::rating::Pattern::name | ( | Direction | d, |
Direction | d2, | ||
Ptype | self, | ||
Ptype | target, | ||
bool | same | ||
) | [static, private] |
Definition at line 6 of file pattern.cc.
References osl::PtypeTable::getCsaName(), INVALID, and osl::Ptype_Table.
static Square osl::rating::Pattern::nextSquare | ( | Player | player, |
Square | start, | ||
Direction | direction, | ||
Direction | direction2 | ||
) | [inline, static] |
Definition at line 33 of file pattern.h.
References osl::Board_Table, INVALID, osl::Square::isOnBoard(), and osl::BoardTable::nextSquare().
Referenced by osl::rating::PatternGroup::findMatch(), match(), nextSquare(), and osl::rating::PatternGroup::PatternGroup().
static Square osl::rating::Pattern::nextSquare | ( | Move | move, |
Direction | direction, | ||
Direction | direction2 | ||
) | [inline, static] |
Definition at line 40 of file pattern.h.
References direction, direction2, nextSquare(), osl::Move::player(), and osl::Move::to().
Direction osl::rating::Pattern::direction [private] |
Definition at line 18 of file pattern.h.
Referenced by match(), and nextSquare().
Direction osl::rating::Pattern::direction2 [private] |
Definition at line 18 of file pattern.h.
Referenced by match(), and nextSquare().
const Direction osl::rating::Pattern::INVALID = LONG_UL [static] |
Definition at line 16 of file pattern.h.
Referenced by osl::rating::PatternGroup::name(), name(), and nextSquare().
bool osl::rating::Pattern::same [private] |
Ptype osl::rating::Pattern::self [private] |
Ptype osl::rating::Pattern::target [private] |