card.m: using function instead of predicate for playing card offset calculation