Author: Gerd Isenberg
Date: 14:10:52 07/26/04
Go up one level in this thread
Oups, sorry for confusing TimeOutException in a wrong way as value as well as
catched type.
Gerd
search (...)
{
FullNodeCount++;
if ((FullNodeCount & 0x1fff) == 0 ) // each 8*1024
{
if (NoTimeLeft(...))
// throw timeOutException; // an enum or int
throw CTimeOutException("time out"); // or class incarnation
// unwind the stack until catched
}
...
}
try
{
rootSearch (...); // calls search as well
...
}
//catch (int e)
//{
// if ( e == timeOutException )
// ...
//}
catch (CTimeOutException e)
{
// use best of pv so far...
// if empty (should not occur, but during development)
// use some valid generated move with static best score
printf ("%s", e.text);
}
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.