Documented everything I could and tried unifying format

This commit is contained in:
Seraina
2022-03-27 22:43:35 +02:00
parent 6cf98643d1
commit c87d894e10
12 changed files with 80 additions and 145 deletions

View File

@@ -0,0 +1,31 @@
Client commands:
Implemented:
* CHATA$message Send chat message to all
* QUITS quit server/ leave server
* CPING Ping from client to server.
* PINGB Pingback from client to server.
* NAMEC$name Change name to whatever is specified
Future / planned:
* CRTGM Create a new game
* CHATW whisper chat
* CHATG ghost chat
* LEAVG leave a game
* JOING join a game
* VOTEG ghost voting who to infect
* VOTEH humans voting who is the ghost
* LISTP list players/clients in session with the Server
Server Commands:
Implemented:
* SPING Ping from server to client
* PINGB Pingback from client to server.
Future / planned:
* MSGRS "Message received": Paramaters: a string detailing to the client that and what the server received as command.
* SEROR Server had an error. (used for debugging)
* NOCMD No command found.

View File

@@ -1,52 +0,0 @@
PRE GAME:
----------------------------------------------------
int spielerzahl = 6; //Default setting
Fill train -> Randomize
/**
Creates 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?