2 Glaurung, a UCI chess playing engine.
3 Copyright (C) 2004-2008 Tord Romstad
5 Glaurung is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
10 Glaurung is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
20 #if !defined(DEPTH_H_INCLUDED)
21 #define DEPTH_H_INCLUDED
29 DEPTH_MAX = 200 // 100 * OnePly;
37 /// Note: If OnePly is changed, the constant HistoryMax in history.h should
38 /// probably also be changed.
40 const Depth OnePly = Depth(2);
47 inline Depth operator+ (Depth d, int i) { return Depth(int(d) + i); }
48 inline Depth operator+ (Depth d1, Depth d2) { return Depth(int(d1) + int(d2)); }
49 inline void operator+= (Depth &d, int i) { d = Depth(int(d) + i); }
50 inline void operator+= (Depth &d1, Depth d2) { d1 += int(d2); }
51 inline Depth operator- (Depth d, int i) { return Depth(int(d) - i); }
52 inline Depth operator- (Depth d1, Depth d2) { return Depth(int(d1) - int(d2)); }
53 inline void operator-= (Depth & d, int i) { d = Depth(int(d) - i); }
54 inline Depth operator* (Depth d, int i) { return Depth(int(d) * i); }
55 inline Depth operator* (int i, Depth d) { return Depth(int(d) * i); }
56 inline void operator*= (Depth &d, int i) { d = Depth(int(d) * i); }
57 inline Depth operator/ (Depth d, int i) { return Depth(int(d) / i); }
58 inline void operator/= (Depth &d, int i) { d = Depth(int(d) / i); }
61 #endif // !defined(DEPTH_H_INCLUDED)