timeControl.cc
Go to the documentation of this file.
00001 /* timeControl.cc
00002  */
00003 #include "osl/search/timeControl.h"
00004 
00005 int osl::search::TimeControl::
00006 secondsForThisMove(int totalSeconds)
00007 {
00008   if (totalSeconds < 90)
00009     return 1;
00010   if (totalSeconds < 2*60)
00011     return 4;
00012   if (totalSeconds < 3*60)
00013     return 8;
00014   if (totalSeconds < 4*60)
00015     return 15;
00016   if (totalSeconds < 6*60)
00017     return 22;
00018   if (totalSeconds < 8*60)
00019     return 30;
00020   if (totalSeconds < 10*60)
00021     return 42;
00022   if (totalSeconds < 12*60)
00023     return 55;
00024   if (totalSeconds < 25*60)
00025     return 67;
00026   if (totalSeconds < 40*60)
00027     return 90;
00028   if (totalSeconds < 60*60)     // 1h
00029     return 135;
00030   if (totalSeconds < 90*60)     // 1.5h
00031     return 197;
00032   if (totalSeconds < 2*60*60)   // 2h
00033     return 270;
00034   return 600;
00035 }
00036 
00037 /* ------------------------------------------------------------------------- */
00038 // ;;; Local Variables:
00039 // ;;; mode:c++
00040 // ;;; c-basic-offset:2
00041 // ;;; End:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines