Sorting methods
I seen you mentioned about your sorting algorithm. Definitely stick with C for speed and im not sure how you coded the game(data structure wise). Plus you can use multiple sorting methods based on size. I.e. quicksort to radix. Thats just an example but its helped me in the past with quickness and scalability. I know you didnt ask for my two cents but I hope that helps.
logicaldementia about
Zed's Alchemy, v2.2.1