{
const tile_t *tile_one = one;
const tile_t *tile_two = two;
- return tile_one->number - tile_two->number;
+ return tile_one->number - tile_two->number; //Sort lowest to highest
}
-static int tile_compare_1(tile_t *tile_one, tile_t *tile_two)
+static int int_compare(const void *vx, const void *vy)
{
- return tile_one->number - tile_two->number; //Sort lowest to highest
-}
-
-static int int_compare(int *x, int *y)
-{
- return y - x; //Sort highest to lowest
+ const int *x = vx, *y = vy;
+ return *y - *x; //Sort highest to lowest
}
/*
game->board.num_groups++;
}
board_print(game);
- printf("\nBut is the board valid?\t\t%s\n", board_valid(&game->board));
+ printf("\nBut is the board valid?\t\t%s\n", board_valid(&game->board) ? "yes" : "no");
}
game->select_mode = 1;