EndgameUtils.hpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006 #ifndef ENDGAMEUTILS_HPP
00007 #define ENDGAMEUTILS_HPP
00008
00009 #include "Hex.hpp"
00010 #include "HexBoard.hpp"
00011 #include "HexEval.hpp"
00012
00013 _BEGIN_BENZENE_NAMESPACE_
00014
00015
00016
00017
00018 namespace EndgameUtils
00019 {
00020
00021
00022
00023 bool IsWonGame(const HexBoard& brd, HexColor color, bitset_t& proof);
00024
00025 bool IsWonGame(const HexBoard& brd, HexColor color);
00026
00027
00028
00029 bool IsLostGame(const HexBoard& brd, HexColor color, bitset_t& proof);
00030
00031 bool IsLostGame(const HexBoard& brd, HexColor color);
00032
00033
00034
00035
00036
00037 bool IsDeterminedState(const HexBoard& brd, HexColor color,
00038 HexEval& score, bitset_t& proof);
00039
00040 bool IsDeterminedState(const HexBoard& brd, HexColor color,
00041 HexEval& score);
00042
00043 bool IsDeterminedState(const HexBoard& brd, HexColor color);
00044
00045
00046
00047
00048
00049
00050
00051
00052 HexPoint PlayDeterminedState(const HexBoard& brd, HexColor color);
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064 bitset_t MovesToConsider(const HexBoard& brd, HexColor color);
00065 }
00066
00067
00068
00069 inline bool EndgameUtils::IsDeterminedState(const HexBoard& brd,
00070 HexColor color, HexEval& eval)
00071
00072 {
00073 bitset_t proof;
00074 return IsDeterminedState(brd, color, eval, proof);
00075 }
00076
00077 inline bool EndgameUtils::IsDeterminedState(const HexBoard& brd, HexColor color)
00078 {
00079 HexEval eval;
00080 bitset_t proof;
00081 return IsDeterminedState(brd, color, eval, proof);
00082 }
00083
00084 inline bool EndgameUtils::IsLostGame(const HexBoard& brd, HexColor color)
00085 {
00086 bitset_t proof;
00087 return IsLostGame(brd, color, proof);
00088 }
00089
00090 inline bool EndgameUtils::IsWonGame(const HexBoard& brd, HexColor color)
00091 {
00092 bitset_t proof;
00093 return IsWonGame(brd, color, proof);
00094 }
00095
00096
00097
00098 _END_BENZENE_NAMESPACE_
00099
00100 #endif // ENDGAMEUTILS_HPP