-/// Endgames member definitions
-
-template<> const Endgames::EFMap& Endgames::get<EF>() const { return maps.first; }
-template<> const Endgames::SFMap& Endgames::get<SF>() const { return maps.second; }
-
-Endgames::Endgames() {
-
- add<Endgame<Value, KNNK> >("KNNK");
- add<Endgame<Value, KPK> >("KPK");
- add<Endgame<Value, KBNK> >("KBNK");
- add<Endgame<Value, KRKP> >("KRKP");
- add<Endgame<Value, KRKB> >("KRKB");
- add<Endgame<Value, KRKN> >("KRKN");
- add<Endgame<Value, KQKR> >("KQKR");
- add<Endgame<Value, KBBKN> >("KBBKN");
-
- add<Endgame<ScaleFactor, KNPK> >("KNPK");
- add<Endgame<ScaleFactor, KRPKR> >("KRPKR");
- add<Endgame<ScaleFactor, KBPKB> >("KBPKB");
- add<Endgame<ScaleFactor, KBPPKB> >("KBPPKB");
- add<Endgame<ScaleFactor, KBPKN> >("KBPKN");
- add<Endgame<ScaleFactor, KRPPKRP> >("KRPPKRP");
-}
-
-Endgames::~Endgames() {
-
- for (EFMap::const_iterator it = get<EF>().begin(); it != get<EF>().end(); ++it)
- delete it->second;
-
- for (SFMap::const_iterator it = get<SF>().begin(); it != get<SF>().end(); ++it)
- delete it->second;
-}
-
-template<class T>
-void Endgames::add(const string& keyCode) {
-
- typedef typename T::Base F;
- typedef std::map<Key, F*> M;
-
- const_cast<M&>(get<F>()).insert(std::pair<Key, F*>(mat_key(keyCode), new T(WHITE)));
- const_cast<M&>(get<F>()).insert(std::pair<Key, F*>(mat_key(swap_colors(keyCode)), new T(BLACK)));
-}
-
-template<class T>
-T* Endgames::get(Key key) const {
-
- typename std::map<Key, T*>::const_iterator it = get<T>().find(key);
- return it != get<T>().end() ? it->second : NULL;
-}
-
-// Explicit template instantiations
-template EF* Endgames::get<EF>(Key key) const;
-template SF* Endgames::get<SF>(Key key) const;
-
-