Well the assignments are completely random, in fact, if you want to know how it works, here's an example. (Note, there are WAY better ways to do this, but this was a quick and dirty way):
Player Three is randomly chosen from the seven, Player Three can be {A, E, F, G, I, R} (He's been Turkey in game one). So now he's randomly assigned as F.
Is there a player that's been France before? Yes, Player Seven. Ok, he's next. Player Seven can be {A, E, G, I, R, T}. Let's say he's assigned G.
Is there a player that's been Germany before? No. Ok, well randomly get another player: Player Two. Player Two can be {A,E,F,G,I,R} (He was also Turkey in his game one. But her can't be F or G now, so {A,E,I,R}. Let's say he's assigned E.
Then it will ask if a player has been England before, and so on and so on.
If the computer ever get's to the last player and last country assignment, but they match (meaning that person would have to be the same country again) It just re-runs it.
Making it HIGHLY inefficient and I'd probably fail if it was code for class/work, but its so simple and fast (and for personal use) that I don't care.