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

34 lines
857 B
Plaintext

PreGame:
int spielerzahl = 6; //Default setting
Fill train -> Randomize
/**
Creats an array of random numbers 1 - spielerzahl
**/
int[] fillTrain(int spielerzahl) //... arbitrary amount of users, gives Array I think^^
if spielerzahl < #users
throw some sort of exception
int[] userTrain = new int[spielerzahl];
for (int i = 0; i < spielerzahl; i++) //
Random nr. 1-6
if randomnr hasnt been used before
userTrain[i] = randomnr.
else ? //find a way either increase number or whatever to handle this case
return userTrain
Create Passengers -> use fillTrain array to position one after another
Start with clients till we run out, then create npc'
Gostyfy
Throw out
Vote
Ghost vote needs validation (only humans can be chosen)