- public int compareTo(Position p, Walk.Cache cache) {
- Position position = this;
- Position rposition = p;
- int ret = 0;
- if (Reduction.canKill(cache, position, rposition) &&
- Reduction.canKill(cache, rposition, position)) throw new Error();
- if (Reduction.canKill(cache, position, rposition)) ret = 1;
- else if (Reduction.canKill(cache, rposition, position)) ret = -1;
- if (Reduction.canNeed(cache, position, rposition)) ret = 1;
- else if (Reduction.canNeed(cache, rposition, position)) ret = -1;
- return ret;
- }