This repository has been archived on 2025-01-04. You can view files and clone it, but cannot push or open issues or pull requests.
NightTrainToBudapest/Meilenstein II/Spiellogik Pseudocode
2022-03-18 11:01:06 +01:00

33 lines
685 B
Plaintext

PreGame:
int spielerzahl = 6; //Default setting
Fill train -> Randomize
String[] fillTrain(int spielerzahl, String... usernames) //... arbitrary amount of usernames, gives Array I think^^
if spielerzahl < #usernames
throw some sort of exception
String[] userTrain = new Strin[spielerzahl];
for (int i = 0; i < spielerzahl; i++)
Randomliy choose one username
->Maybe: Random nr. 0-spielerzahl
if randomnr hasnt been used before
userTrain[i] = usernames[randomnr]
return userTrain
Gostyfy
Throw out
Vote
Ghost vote needs validation (only humans can be chosen)