53 lines
1.4 KiB
Plaintext
53 lines
1.4 KiB
Plaintext
PRE GAME:
|
|
----------------------------------------------------
|
|
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'
|
|
Save Passengers in an array (Positions corresponding to index+1)
|
|
|
|
|
|
Gostyfy first time, create first ghost
|
|
|
|
IN GAME
|
|
----------------------------------------
|
|
Night:
|
|
Vote Ghosts (can only vote for non-Ghosts os needs to be verified)
|
|
-> Timer!
|
|
-> last Human? -> End of the Game (break out of a loop?) "Ghosts win"
|
|
Ghostyfycation
|
|
Send Messages ("You have been ghostyfied", "You heard something suspicious")
|
|
|
|
Day:
|
|
Vote Humans (Ghost votes don't count)
|
|
->Timer!
|
|
-> OG Ghost? -> End of the Game "Humans Win"
|
|
Evtl. kickoff (non OG-Ghosts)
|
|
Send Messages ("X Has been kicked off", "Not a Ghost")
|
|
|
|
repeat
|
|
|
|
|
|
How do we handle the End of the Game?
|
|
|
|
|
|
|