Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

SpSafePlayer.cpp

Go to the documentation of this file.
00001 //----------------------------------------------------------------------------
00002 /** @file SpSafePlayer.cpp
00003     See SpSafePlayer.h */
00004 //----------------------------------------------------------------------------
00005 
00006 #include "SgSystem.h"
00007 #include "SpSafePlayer.h"
00008 
00009 #include "GoModBoard.h"
00010 #include "GoSafetySolver.h"
00011 
00012 //----------------------------------------------------------------------------
00013 
00014 int SpSafeMoveGenerator::Evaluate()
00015 {   
00016     GoModBoard modBoard(m_board);
00017     GoBoard& bd = modBoard.Board();
00018     GoSafetySolver s(bd);
00019     SgBWSet safe;
00020     s.FindSafePoints(&safe);
00021     
00022     // We are Opponent since this is after executing our move
00023     SgBlackWhite player = m_board.Opponent();
00024     return safe[player].Size() - safe[SgOppBW(player)].Size();
00025 }
00026 
00027 


Sun Mar 13 2011 Doxygen 1.7.1