Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
osl::eval::endgame::AttackDefense Class Reference

max(AttackKing, DefenseKing). More...

#include <attackDefense.h>

Collaboration diagram for osl::eval::endgame::AttackDefense:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 AttackDefense (const SimpleState &)
void changeTurn ()
int value () const
int value (Player p) const
void update (const SimpleState &new_state, Move last_move)
int expect (const SimpleState &state, Move move) const

Static Public Member Functions

static bool initialized ()
static int infty ()
static int valueOf (Piece black_king, Piece white_king, Piece target)
static int valueOf (Piece black_king, Piece white_king, PtypeO ptypeo, Square position)
static void setValues (const SimpleState &, container::PieceValues &)
static void resetWeights (const int *w)

Private Member Functions

void reset ()
void addValue (Player owner, int value)
void addValue (Piece king_black, Piece king_white, Piece target)
void updateKingMove (const SimpleState &, Square from, Square to)
void updateKingMove (const SimpleState &, Square from, Square to, Piece target)

Private Attributes

CArray< int, 2 > values

Detailed Description

max(AttackKing, DefenseKing).

うまく動くようなら統合した表を作る

Definition at line 27 of file attackDefense.h.


Constructor & Destructor Documentation

osl::eval::endgame::AttackDefense::AttackDefense ( const SimpleState &  state) [explicit]

Definition at line 21 of file attackDefense.cc.

References addValue(), osl::BLACK, target, and osl::WHITE.


Member Function Documentation

void osl::eval::endgame::AttackDefense::addValue ( Player  owner,
int  value 
) [inline, private]

Definition at line 31 of file attackDefense.h.

References osl::playerToIndex(), value(), and values.

Referenced by addValue().

void osl::eval::endgame::AttackDefense::addValue ( Piece  king_black,
Piece  king_white,
Piece  target 
) [inline, private]
void osl::eval::endgame::AttackDefense::changeTurn ( ) [inline]

Definition at line 45 of file attackDefense.h.

int osl::eval::endgame::AttackDefense::expect ( const SimpleState &  state,
Move  move 
) const
static int osl::eval::endgame::AttackDefense::infty ( ) [inline, static]
static bool osl::eval::endgame::AttackDefense::initialized ( ) [inline, static]

Definition at line 46 of file attackDefense.h.

void osl::eval::endgame::AttackDefense::reset ( ) [inline, private]

Definition at line 30 of file attackDefense.h.

References values.

void osl::eval::endgame::AttackDefense::resetWeights ( const int *  w) [static]

Definition at line 170 of file attackDefense.cc.

static void osl::eval::endgame::AttackDefense::setValues ( const SimpleState &  ,
container::PieceValues  
) [static]
void osl::eval::endgame::AttackDefense::update ( const SimpleState &  new_state,
Move  last_move 
)
void osl::eval::endgame::AttackDefense::updateKingMove ( const SimpleState &  state,
Square  from,
Square  to,
Piece  target 
) [private]
void osl::eval::endgame::AttackDefense::updateKingMove ( const SimpleState &  state,
Square  from,
Square  to 
) [private]

Definition at line 81 of file attackDefense.cc.

References addValue(), osl::BLACK, osl::KING, osl::Piece::owner(), osl::Piece::ptype(), target, and osl::WHITE.

Referenced by expect().

int osl::eval::endgame::AttackDefense::value ( ) const [inline]
int osl::eval::endgame::AttackDefense::value ( Player  p) const [inline]

Definition at line 49 of file attackDefense.h.

References osl::playerToIndex(), and values.

static int osl::eval::endgame::AttackDefense::valueOf ( Piece  black_king,
Piece  white_king,
PtypeO  ptypeo,
Square  position 
) [inline, static]
static int osl::eval::endgame::AttackDefense::valueOf ( Piece  black_king,
Piece  white_king,
Piece  target 
) [inline, static]

Definition at line 64 of file attackDefense.h.

References osl::Piece::ptypeO(), and osl::Piece::square().

Referenced by addValue(), and valueOf().


Member Data Documentation

Definition at line 29 of file attackDefense.h.

Referenced by addValue(), reset(), and value().


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