00001 //---------------------------------------------------------------------------- 00002 /** @file SpRandomPlayer.cpp 00003 See SpRandomPlayer.h */ 00004 //---------------------------------------------------------------------------- 00005 00006 #include "SgSystem.h" 00007 #include "SpRandomPlayer.h" 00008 00009 #include "GoEyeUtil.h" 00010 00011 //---------------------------------------------------------------------------- 00012 00013 int SpRandomMoveGenerator::Score(SgPoint p) 00014 { 00015 if ( m_board.IsEmpty(p) 00016 && m_board.IsLegal(p) 00017 && ! GoEyeUtil::IsSinglePointEye(m_board, p, m_board.ToPlay()) 00018 ) 00019 return 1; 00020 else 00021 return INT_MIN; 00022 } 00023 00024 //---------------------------------------------------------------------------- 00025