/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
Copyright (C) 2004-2008 Tord Romstad (Glaurung author)
- Copyright (C) 2008-2010 Marco Costalba, Joona Kiiski, Tord Romstad
+ Copyright (C) 2008-2012 Marco Costalba, Joona Kiiski, Tord Romstad
Stockfish is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
template<EndgameType E, typename T = typename eg_family<E>::type>
struct Endgame : public EndgameBase<T> {
- explicit Endgame(Color c) : strongerSide(c), weakerSide(flip(c)) {}
+ explicit Endgame(Color c) : strongerSide(c), weakerSide(~c) {}
Color color() const { return strongerSide; }
T operator()(const Position&) const;
Endgames();
~Endgames();
- template<typename T> EndgameBase<T>* get(Key key) {
+ template<typename T> EndgameBase<T>* probe(Key key) {
return map((T*)0).count(key) ? map((T*)0)[key] : NULL;
}
};