00001 00002 #ifndef VULPRECHECK_HPP 00003 #define VULPRECHECK_HPP 00004 00005 #include "BenzenePlayer.hpp" 00006 00007 _BEGIN_BENZENE_NAMESPACE_ 00008 00009 //---------------------------------------------------------------------------- 00010 00011 /** Checks book before search. */ 00012 class VulPreCheck 00013 { 00014 public: 00015 00016 /** Adds pre-check for vulnerable cells to the given player. */ 00017 VulPreCheck(); 00018 00019 /** Destructor. */ 00020 ~VulPreCheck(); 00021 00022 /** Checks to see if the last move played by the opponent is 00023 vulnerable. If so, returns the killing move; otherwise, 00024 returns INVALID_POINT. 00025 */ 00026 HexPoint KillLastMove(HexBoard& brd, const Game& game_state, 00027 HexColor color); 00028 00029 private: 00030 00031 /** Member variable to track which oppt stones we've killed before. 00032 Helps to identify more vulnerable patterns. */ 00033 bitset_t m_killedOpptStones; 00034 }; 00035 00036 //---------------------------------------------------------------------------- 00037 00038 _END_BENZENE_NAMESPACE_ 00039 00040 #endif // VULPRECHECK_HPP