timeControl.cc Source File

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
timeControl.cc
Go to the documentation of this file.
1 /* timeControl.cc
2 */
3 #include "osl/search/timeControl.h"
4
5 int osl::search::TimeControl::
6 secondsForThisMove(int totalSeconds)
7 {
8 if (totalSeconds < 90)
9 return 1;
10 if (totalSeconds < 2*60)
11 return 4;
12 if (totalSeconds < 3*60)
13 return 8;
14 if (totalSeconds < 4*60)
15 return 15;
16 if (totalSeconds < 6*60)
17 return 22;
18 if (totalSeconds < 8*60)
19 return 30;
20 if (totalSeconds < 10*60)
21 return 42;
22 if (totalSeconds < 12*60)
23 return 55;
24 if (totalSeconds < 25*60)
25 return 67;
26 if (totalSeconds < 40*60)
27 return 90;
28 if (totalSeconds < 60*60) // 1h
29 return 135;
30 if (totalSeconds < 90*60) // 1.5h
31 return 197;
32 if (totalSeconds < 2*60*60) // 2h
33 return 270;
34 return 600;
35 }
36
37 /* ------------------------------------------------------------------------- */
38 // ;;; Local Variables:
39 // ;;; mode:c++
40 // ;;; c-basic-offset:2
41 // ;;; End: