+ ((HashMap)(doomed ? doomed_states : normal_states)).put(hs, this);
+ ((HashSet)all_states).add(this);
+
+ for(Position p : hs) {
+ if (!p.isFirst()) continue;
+ for(Sequence s : p.owner().needs()) {
+ if (hs.contains(s.firstp())) continue;
+ HashSet<Position> h2 = new HashSet<Position>();
+ reachable(s.firstp(), h2);
+ also.add(mkstate(h2, true));
+ }
+ for(Sequence s : p.owner().hates()) {
+ if (hs.contains(s.firstp())) continue;
+ HashSet<Position> h2 = new HashSet<Position>();
+ reachable(s, h2);
+ also.add(mkstate(h2, true));
+ }
+ }