All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions | Static Private Attributes | Friends
osl::search::ThreatmateState Class Reference

詰めろを考慮した詰将棋探索のための状態管理. More...

#include <threatmateState.h>

Inheritance diagram for osl::search::ThreatmateState:
Inheritance graph
[legend]
Collaboration diagram for osl::search::ThreatmateState:
Collaboration graph
[legend]

List of all members.

Public Types

enum  Status {
  UNKNOWN = 0, THREATMATE, MAYBE_THREATMATE, CHECK_AFTER_THREATMATE,
  MAY_HAVE_CHECKMATE
}

Public Member Functions

 ThreatmateState (Status s=UNKNOWN)
void setThreatmate (Status s)
bool isUnknown () const
bool isThreatmate () const
bool maybeThreatmate () const
bool mayHaveCheckmate () const
Status status () const
const ThreatmateState newStatus (bool is_check) const
void update (const ThreatmateState *parent, bool in_check)

Static Private Attributes

static const CArray< Status, 5 *2 > transition

Friends

class DualThreatmateState

Detailed Description

詰めろを考慮した詰将棋探索のための状態管理.

http://www31.ocn.ne.jp/~kfend/inside_kfend/ptc.html#c3

Definition at line 29 of file threatmateState.h.


Member Enumeration Documentation

Enumerator:
UNKNOWN 
THREATMATE 

threatmate found by checkmate search

MAYBE_THREATMATE 

threatmate, not sure

CHECK_AFTER_THREATMATE 

status after threatmate responded by check

MAY_HAVE_CHECKMATE 

status after threatmate responded by non-check move

Definition at line 33 of file threatmateState.h.


Constructor & Destructor Documentation


Member Function Documentation

bool osl::search::ThreatmateState::isUnknown ( ) const [inline]

Definition at line 54 of file threatmateState.h.

References osl::search::ThreatmateStateData::current_status, and UNKNOWN.

const ThreatmateState osl::search::ThreatmateState::newStatus ( bool  is_check) const [inline]

Definition at line 70 of file threatmateState.h.

References osl::search::ThreatmateStateData::current_status, and transition.

Referenced by update().

void osl::search::ThreatmateState::update ( const ThreatmateState parent,
bool  in_check 
) [inline]

Definition at line 75 of file threatmateState.h.

References maybeThreatmate(), and newStatus().

Referenced by osl::search::DualThreatmateState::updateInLock().


Friends And Related Function Documentation

friend class DualThreatmateState [friend]

Definition at line 31 of file threatmateState.h.


Member Data Documentation


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