Commit a3058164 authored by Chris's avatar Chris
Browse files

fixed full house case where it was effectively scoring as a 2 of a kind and a...

fixed full house case where it was effectively scoring as a 2 of a kind and a 3 of a kind (not distinct values)
parent 3863b88f
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -302,11 +302,11 @@ int sum_dice(struct die_st *dice) {
unsigned int n_of_a_kind(struct die_st *dice, unsigned int num_dice, unsigned int n, unsigned int value_to_avoid) {

    // this should NOT score as a full house
    dice[0].value = 6;
    dice[1].value = 6;
    dice[2].value = 6;
    dice[3].value = 6;
    dice[4].value = 3;
//    dice[0].value = 6;
//    dice[1].value = 6;
//    dice[2].value = 6;
//    dice[3].value = 6;
//    dice[4].value = 3;

    if (n > num_dice) {
        printf("n_of_a_kind(): error: n is greater than num_dice");