added utility functions best_card and same_color