To get some much needed practice in C# scripting in Unity (mostly because I'm a PHP developer), I decided to write a simple Unity program that draws two Poker hands from a shuffled deck. It then sorts the cards drawn in order from lowest rank to highest rank (with the lowest card being a 2 and highest being the Ace).
In this blog post, I revealed just how simple it actually was to get this sorting done. I used a sorting algorithm called the Selection Sort, and for something like sorting a few cards in order, it was perfect and extremely simple.
Check out the post here: Simple Sorting Algorithm for a Poker Hand and it'd be great if you use it and let me know!