proofDisproof.cc
Go to the documentation of this file.
#include "osl/checkmate/proofDisproof.h"
#include <iostream>
void osl::checkmate::
ProofDisproof::testConsistency()
{
static_assert((ProofDisproof::BigProofNumber > ProofDisproof::PAWN_CHECK_MATE_PROOF),"");
static_assert((ProofDisproof::NO_CHECK_MATE_PROOF > ProofDisproof::PAWN_CHECK_MATE_PROOF),"");
}
std::ostream& osl::checkmate::
operator<<(std::ostream& os, const ProofDisproof& pdp)
{
if (pdp == ProofDisproof::Checkmate())
os << "Checkmate";
else if (pdp == ProofDisproof::NoEscape())
os << "NoEscape";
else if (pdp == ProofDisproof::NoCheckmate())
os << "NoCheckmate";
else if (pdp == ProofDisproof::PawnCheckmate())
os << "PawnCheckmate";
else if (pdp == ProofDisproof::LoopDetection())
os << "LoopDetection";
else if (pdp == ProofDisproof::AttackBack())
os << "AttackBack";
else
os << "pdp-" << pdp.proof() << "," << pdp.disproof();
return os;
}
/* ------------------------------------------------------------------------- */
// ;;; Local Variables:
// ;;; mode:c++
// ;;; c-basic-offset:2
// ;;; End:
osl::checkmate::ProofDisproof
証明数(proof number)と反証数(disproof number).
Definition proofDisproof.h:17
osl::checkmate::ProofDisproof::PawnCheckmate
static const ProofDisproof PawnCheckmate()
Definition proofDisproof.h:77
osl::checkmate::ProofDisproof::AttackBack
static const ProofDisproof AttackBack()
Definition proofDisproof.h:79
osl::checkmate::ProofDisproof::LoopDetection
static const ProofDisproof LoopDetection()
Definition proofDisproof.h:78
osl::checkmate::ProofDisproof::NoEscape
static const ProofDisproof NoEscape()
Definition proofDisproof.h:74
osl::checkmate::ProofDisproof::NoCheckmate
static const ProofDisproof NoCheckmate()
Definition proofDisproof.h:76
osl::checkmate::ProofDisproof::BigProofNumber
static const unsigned int BigProofNumber
Definition proofDisproof.h:101
osl::checkmate::ProofDisproof::disproof
unsigned int disproof() const
Definition proofDisproof.h:85
osl::checkmate::ProofDisproof::testConsistency
static void testConsistency()
Definition proofDisproof.cc:5
osl::checkmate::ProofDisproof::proof
unsigned int proof() const
Definition proofDisproof.h:84
osl::checkmate::ProofDisproof::PAWN_CHECK_MATE_PROOF
@ PAWN_CHECK_MATE_PROOF
Definition proofDisproof.h:30
osl::checkmate::ProofDisproof::NO_CHECK_MATE_PROOF
@ NO_CHECK_MATE_PROOF
証明数の定数: 反証された時には，不詰の種類の区別に利用
Definition proofDisproof.h:29
osl::checkmate::ProofDisproof::Checkmate
static const ProofDisproof Checkmate()
Definition proofDisproof.h:75
osl::checkmate::operator<<
std::ostream & operator<<(std::ostream &, King8Info)
Definition king8Info.cc:10
proofDisproof.h