- M1& map(M1::value_type::second_type) { return m1; }
- M2& map(M2::value_type::second_type) { return m2; }
+ template<EndgameCode E, typename T = eg_type<E>, typename P = Ptr<T>>
+ void add(const std::string& code) {
+
+ StateInfo st;
+ map<T>()[Position().set(code, WHITE, &st).material_key()] = P(new Endgame<E>(WHITE));
+ map<T>()[Position().set(code, BLACK, &st).material_key()] = P(new Endgame<E>(BLACK));
+ }