PlayerID{{ public int compareTo(PlayerID pid) { return ((Integer)id).compareTo(pid.id); } }} Var{{ public int compareTo(Var v) { return id.compareTo(v.id); } }} Solution{{ }} Challenge{{ }} OfferedChallenge{{ }} AcceptedChallenge{{ }} ProvidedChallenge{{ }} SolvedChallenge{{ }} Problem{{ /** Implicit Variable List */ public Problem(List cs) { this(setOfVars(cs).toList(), cs); } /** Collect all the (distinct) Variables in a List of Clauses */ private static Set setOfVars(List cs){ return cs.fold(new List.Fold>(){ public Set fold(Clause c, Set r) { return r.union(Set.create(c.getVars())); } }, Set.create()); } }} Clause{{ public List getVars(){ return vars; } }} ProblemType{{ }} Objective{{ double value(Problem inst, Solution sol); }} Predicate{{ boolean valid(Problem inst, ProblemType pred); }}