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