So I'm trying out some arrays and I would really like to know how I would sort the following array
array(family's Y co-ordinate, family's variable, UID if necessary)
So far it's proving to be a killer, I've looked up some sorting algorithms but I'm not too savvy on a lot of the lingo they use to define them. The sorting algorithms that looked nice were, bubble, gnome and possibly insert, I'm not sure how they apply to multi-dimensional arrays though.
I want the array to look something like this when it's sorted (leaving UID out for now):
So primarily sorting by the Y co-ordinate ascending, but if any of the family have the same Y co-ordinate then sort by their private variable ascending
Is this possible at the moment? I'm assuming its to do with a bunch of nested loops, but it's 3:20am and my brain has imploded
Remember, I'm not that mathy, you'll have to translate into english for me