- public void inhibit(int p, Sequence s) {
- //if (inhibited.contains(p, s)) return;
- if (performed.contains(p, s)) throw new Reset();
- /*
- if (s.hated!=null)
- for(Sequence s2 : s.hated)
- uninhibit(p, s2);
- */
- if (s.needed!=null)
- for(Sequence s2 : s.needed)
- if (performed.contains(p, s2))
- throw new Reset();
- if (performed.contains(p, s)) throw new Reset();
- }
-
- public void uninhibit(Position r, int p) { uninhibit(p, r.owner()); }
- public void uninhibit(int p, Sequence s) {
- if (performed.contains(p, s)) return;
- performed.add(p, s);
- if (s.hated != null)
- for(Sequence seq : s.hated)
- inhibit(p, seq);
- }
-