Poker 3 vs poker 2

broken image
broken image
broken image

(How to do this is of course language-dependent in C# or C++, for example, you'd use a library 'sort' function along with a predicate that causes the elements to be sorted according to the 'value' field.) I would recommend instead using a single array that stores a user-defined type with fields for both value and suit. Note that if you use two arrays (one for value and one for suit), you'll need to keep them in sync somehow when you sort, which could be tricky. I use C# myself (not Unity js), so I can't tell you exactly how to do this, but that's what you'll want to do first: start digging through the Unity js docs, and figure out how to sort an array. Click to expand.As suggested earlier, the first thing you're going to want to do is sort the array by card value.

broken image