Updated diary.txt for Sebastian 8.4.22. Started to handle case in Lobby if lobby is full.

This commit is contained in:
sebaschi 2022-04-08 13:34:30 +02:00
parent 22d356e361
commit 0e8750c985
3 changed files with 20 additions and 2 deletions

View File

@ -243,9 +243,16 @@ Stand:
Lobby: ? Lobby: ?
Spiellogik: VoteHandler wurde getestet und tut weitestgehenst was er soll Spiellogik: VoteHandler wurde getestet und tut weitestgehenst was er soll
08.04.2022 - Sebastian
Stand Mittag:
Lobby: Es gibt eine Lobby Class. Sie verwaltet: LobbyID basierend darauf wieviele Lobbys/Spiele laufen;
Wieviele Spieler in der Lobby sind; Wer in der Lobby ist.
ToDo: ToDo:
Spiellogik: - Send() methode von Passenger mit Client-Server verknüpfen(Seraina) Spiellogik: - Send() methode von Passenger mit Client-Server verknüpfen(Seraina)
- NoiseHandler (Alex) - NoiseHandler (Alex)
- Game Zyklus implementieren (Seraina) - Game Zyklus implementieren (Seraina)

View File

@ -7,6 +7,10 @@ import org.apache.logging.log4j.core.LoggerContext;
import org.apache.logging.log4j.core.config.Configuration; import org.apache.logging.log4j.core.config.Configuration;
import org.apache.logging.log4j.core.config.LoggerConfig; import org.apache.logging.log4j.core.config.LoggerConfig;
/**
* CAN CURRENTLY BE IGNORED: NOT SURE IF NEEDED YET.
* TODO: Decide weather we need this.
*/
public class BudaLogConfig { public class BudaLogConfig {
public Logger LOGGER; public Logger LOGGER;

View File

@ -8,7 +8,10 @@ import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
/** /**
* The Lobby one is in after a client sends the CRTGM command. THe Server * Use: If a client sends a CRTGM command the server should create a lobby with the client as admin.
* In this state, up to 5 other clients (so 6 in total) are able to join this lobby. Once the admin
* feels like it, he can start a game.
* TODO: is all data in here or should GameSessionData be used to collect all relevant data?
*/ */
public class Lobby { public class Lobby {
@ -16,7 +19,10 @@ public class Lobby {
public static final BudaLogConfig l = new BudaLogConfig(LOGGER); public static final BudaLogConfig l = new BudaLogConfig(LOGGER);
private static final int MAX_NO_OF_CLIENTS = 6; private static final int MAX_NO_OF_CLIENTS = 6;
private static int lobbies; public static int lobbies;
//TODO
CentralServerData serverData;
/** /**
* The Person who created the game and can configure it and decide to start once enough players * The Person who created the game and can configure it and decide to start once enough players
@ -31,6 +37,7 @@ public class Lobby {
private int numberOfPlayersInLobby; private int numberOfPlayersInLobby;
//TODO maybe it makes sense to have LobbyID Class?
private final int lobbyID = lobbies++; private final int lobbyID = lobbies++;