compareunits
if (compareunits(have, want)) {
static int compareunits(struct unittype * first, struct unittype * second);