- public void uninhibit(int p, Sequence s) {
- if (s.hated!=null)
- for(Sequence s2 : s.hated)
- inhibited.remove(p, s2);
- }
-
- public void inhibit(Position r, int p) {
- if (r.owner().hated == null) return;
- // remember that dead states are still allowed to shift -- just not allowed to reduce
- boolean reset = false;
- for(Sequence seq : r.owner().hated) {
- if (performed.contains(p,seq)) {
- uninhibit(p, seq);
- //System.out.println("\nresetting due to " + r.owner() + " killing " + seq);
- //inhibited.clear();
- inhibited.add(p, seq);
- //inhibited = new HashMapBag<Integer,Sequence>();
- reset = true;
- resets++;
- throw new Reset();
- }
- inhibited.add(p, seq);
- expectedInhibit.remove(p, seq);
- }
- }
-