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