+ if(card_group->cards[i].number != card_group->cards[i + 1].number -1)
+ {
+ return 0;
+ }
+ return 1;
+}
+
+
+static int card_group_is_run_two(card_group_t *card_group)
+{
+ int i;
+ int lowest = 14, highest = 0;
+ color_t run_color;
+
+ /* By definition, a run must have at least 3 cards. Also, it's
+ * impossible for any group of cards with more than 13 cards to be
+ * a run, (there are only 13 unique numbers so a group with more
+ * than 13 cards must have some duplicates).
+ */
+ if (card_group->num_cards < 3 || card_group->num_cards > 13)
+ {
+ return 0;
+ }
+
+ /* Loop through all cards in the group, ensuring that they are all
+ * the same color and finding the highest and lowest number in the
+ * group. */
+ run_color = card_group->cards[0].color;
+
+ for (i = 0; i < card_group->num_cards; i++)
+ {
+ if (card_group->cards[i].color != run_color)
+ return 0;