00001
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 < 60*60)
00027 return 135;
00028 if (totalSeconds < 2*60*60)
00029 return 270;
00030 return 600;
00031 }
00032
00033
00034
00035
00036
00037