Well, i don‘t know what you mean by track 5 obstacle collissions (since i think you‘re already checking for collission, right?), but i might be able to help you with how to read the cards value, since i made a small texas holdem Game (a year ago or so).
You‘ll have to check for each combination of cards for that. Start out by checking for a straight flush, then 4 pair, Full house and so on, until you only check for the additive value if nothing else is there.
Also, you‘d want to stop the method if you found a result with return, to save iterating even though all results could only be less than the one you already found.
As for how to get points for the cards, you‘ll have to take a look online, or think a while.
Lets say a 4 pair of 8 with a 3 Kicker gives 10405 points (just a random number, the actual value should be a lot higher), then you‘d want a 4 pair of 8 with a 4 kicker be 10406.
But if you have a pair of 2 3’s with 4,5,6 as kicker, you‘d want to have 258, while a pair of 2 4’ with the same kickers would be 283.
Also, 2,4,5,7,8 would be 83, and 2,4,5,7,9 is
101, but 3,4,5,7,8 would be 100. So the lowest number counts one point, the second lowest counts ~13 and then it‘s 13^n from lowest. But that only goes for kickers. A pair of 2 is ~ 2000 less than a pair of 3… it’s not that hard, just a bit annoying to deal with…
I think you get the point…
At least that‘s how i made it… there might be an easier way to solve this…