private static Propagator createProp(IntVar[] vars, int[] values, IntVar[] cards) {
assert values.length == cards.length;
TIntIntHashMap map = new TIntIntHashMap();
int idx = 0;
for (int v : values) {
if (!map.containsKey(v)) {
map.put(v, idx);
idx++;
} else {
throw new UnsupportedOperationException("ERROR: multiple occurrences of value: " + v);
}