Commit Graph

304 Commits

Author SHA1 Message Date
Seraina fcd93c4d58 Outsourced all messages sent by votehandler and noisehandler to ClientGameInfoHandler 2022-04-09 19:03:47 +02:00
Seraina ac80a88b98 Did some cleanup with the loggers, only set vital information at info level 2022-04-09 18:35:13 +02:00
Seraina d3a0c00dea Found the annoying issue, had to change run() to start() now it kinda works 2022-04-09 17:55:27 +02:00
Seraina 1de2e739de Moved all the fields in added in client handler into a separate class ClientVoteData cuz it didn't make sense there 2022-04-09 16:56:42 +02:00
Seraina 45597eee3c Had to change ClientHandler fields vote and hasVoted to arrays and had to make sure, the position of the Passenger is always sent along in protocol ($position$msg) 2022-04-09 16:11:30 +02:00
Seraina 46f75d3292 Made the whole thing a bit more orderly, added several loggers 2022-04-09 11:53:43 +02:00
Seraina d45d64a9c7 Removed interruption from pinger 2022-04-09 11:52:20 +02:00
Seraina 67cd93403a Tried adding smt to avoid being kicked off the Server 2022-04-09 09:11:51 +02:00
Seraina 96b0fa70ef Added getVoteFromClient method to superclass Passenger so when NPC vote, nothing happens when this method is called 2022-04-09 08:45:57 +02:00
Seraina 09024dbfad Parser sets the clientHandler fields vote and hasVoted after a vote from a client has come in 2022-04-09 08:38:59 +02:00
Seraina 370e1e97fe Added vote and hasVoted fields to ClientHandler for later transmission to corresponding Passenger 2022-04-09 08:22:28 +02:00
Seraina d373242486 Started communication between voteHandler and user
- implemented a new method in client, that collects votes
- started ading parser entries
- added timer to votehandler(20 s)
2022-04-09 00:13:34 +02:00
Seraina 316619d067 added a forgotten parameter 2022-04-08 23:24:24 +02:00
Seraina ce3fa4dde1 A very basic command now starts a game in the JServerProtocolParser (needs to bee relocated and but does the job for now)
The game runs, now the Clients need to be able to give inputs (so it ends at some point)
2022-04-08 23:23:31 +02:00
Seraina 3b0bc40ad0 Tried implementing a simple command for server that starts up a game, didn't work so I had to readjust some things 2022-04-08 22:23:00 +02:00
Seraina 5b4a06dd75 Implemented a run method in game, that goes through a game until it ends 2022-04-08 21:00:57 +02:00
Seraina f878bee40d added return for humanvote to know when the game ends 2022-04-08 20:52:36 +02:00
Seraina b297c9edda Implemented the GhostNPC vote and noise functions
had to add Game game as a parameter in a couple of constructors, so everybody can always access the current game and its gamestate
2022-04-08 20:00:00 +02:00
Jonas 9583cd56e1 added all necessary documentation to Protocol.java 2022-04-08 18:02:23 +02:00
Sebastian Lenzlinger 4557b4801b Client chatListener now throws an IO exception of the chatMSg from the server is null. 2022-04-08 16:15:04 +02:00
Sebastian Lenzlinger 968cb94f21 Now the client disconnects if:
1. no pingback recieved
2. isConnected has already been set to false
In this case it looks to be a case where the client isn't responding correctly and the server may close the connection. Added a debog log statement at the respective place.
2022-04-08 16:12:19 +02:00
Sebastian Lenzlinger f57889431d minor change to addPlayer() method 2022-04-08 15:45:35 +02:00
Sebastian Lenzlinger 9e112b493a Test commit zum schauen ob meine Commits wieder richtig zugeordnet werden. 2022-04-08 15:37:08 +02:00
sebaschi e86a09e9a8 Completed "else{}" part in addPlayer() method. If the lobby is full a msg is sent to client stating to join a different lobby a creat a new game. Added todo about the servers response. 2022-04-08 15:14:15 +02:00
sebaschi 15730ef39c Diary update von Sebastian. 2022-04-08 15:03:48 +02:00
sebaschi 15d6474765 ""/l" command added to MessageFormatter.java to represent LISTL protocol command. 2022-04-08 14:57:56 +02:00
sebaschi 13ac486624 Added TODO in Protocol.java: Add the servers reaction to LISTL 2022-04-08 14:53:52 +02:00
sebaschi be2c8d6698 Added LISTL command to Protocol.java and in JServerProtocolParser.java. currently it is only logged THAt it was reached and parsed, but no functionality is attached. 2022-04-08 14:51:31 +02:00
sebaschi ae61da0607 LISTL command added to Protocol.txt. LISTL shall list all lobbies. 2022-04-08 14:43:45 +02:00
sebaschi 79ddbaf416 Added link referenc in documentation from JServerProtocolParserto Clienthandler. Added LoginClient class for possible implementation of a login sequence. 2022-04-08 14:37:30 +02:00
sebaschi dd2beb559a Added CRTGM debug logger to JServerProtocolParser to see if command is reached. added "/g" as terminal command for client to issue CRTGM command. remobed respective todos from Protocol.java. 2022-04-08 14:16:40 +02:00
sebaschi e2a400d0ca added CRTGM command to Protocol.java. and respective todos. 2022-04-08 14:03:40 +02:00
sebaschi 0e8750c985 Updated diary.txt for Sebastian 8.4.22. Started to handle case in Lobby if lobby is full. 2022-04-08 13:34:30 +02:00
sebaschi 22d356e361 Merge branch 'master' of ssh://git.scicore.unibas.ch:2222/cs108-fs22/Gruppe-8 2022-04-08 13:05:44 +02:00
Jonas c3096d7088 Merge remote-tracking branch 'origin/master' 2022-04-08 13:03:41 +02:00
Jonas e348840169 protocol is now fully in the protocol.java class 2022-04-08 13:03:32 +02:00
Seraina ea0c0d1b3b Merge remote-tracking branch 'origin/master' 2022-04-08 13:01:10 +02:00
Seraina dffd1731e2 Added Doc for print Method 2022-04-08 13:00:47 +02:00
Seraina Schöb f858c734f7 Update Diary.txt 2022-04-08 10:58:17 +00:00
sebaschi 8f453fb9e8 started adding Debug Logger messages to the Lobby methods. 2022-04-08 12:57:36 +02:00
sebaschi d0ceb6b6f9 Merge remote-tracking branch 'origin/master' 2022-04-08 12:47:26 +02:00
sebaschi ac022e1f7c Changed the list in ServerLobby to static, since they are global per running server. 2022-04-08 12:47:19 +02:00
Seraina f729a62289 Merge remote-tracking branch 'origin/master' 2022-04-08 12:46:18 +02:00
Seraina c134de8bba Removed static from Methods 2022-04-08 12:45:57 +02:00
sebaschi 9cc7a37eb9 ServerLobby now has a list of open lobbies and a list of all clients on the server. 2022-04-08 12:43:36 +02:00
Seraina 33d8f779a2 Merge remote-tracking branch 'origin/master' 2022-04-08 12:42:25 +02:00
Seraina 4337583de6 Fixed some bugs now the VoteHanlder does what it is supposed to 2022-04-08 12:42:02 +02:00
sebaschi 16e6364cc9 Lobby now have static field to count how many lobbies there are in total which is used to assign a particular lobby and ID, so players can ask to join the lobby. 2022-04-08 12:40:11 +02:00
Jonas 1d9ee624fe Merge remote-tracking branch 'origin/master' 2022-04-08 12:36:41 +02:00
Jonas b6d2a04e76 Working on putting all protocol messages through Protocol.java.
Some small adjustments & bugfixes to how naming is handled.
Added loggedIn boolean for ClientHandler, not meaningfully implemented yet though.
Other minor changes.
2022-04-08 12:36:30 +02:00