Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
b255582aea
@ -1,10 +1,29 @@
|
||||
package ch.unibas.dmi.dbis.cs108.sebaschi;
|
||||
|
||||
import ch.unibas.dmi.dbis.cs108.BudaLogConfig;
|
||||
import ch.unibas.dmi.dbis.cs108.gamelogic.Game;
|
||||
import ch.unibas.dmi.dbis.cs108.multiplayer.client.Client;
|
||||
import java.net.Socket;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
/**
|
||||
* This Class Represents an Object containing different Maps, Lists and Sets wherein a server object
|
||||
* can find all needed data. An instance of this object can also be passed to other class-objects uf
|
||||
* they need the same data.
|
||||
* they need the same data. This Class is used to query for information in collections.
|
||||
*/
|
||||
public class CentralServerData {
|
||||
|
||||
public static final Logger LOGGER = LogManager.getLogger();
|
||||
public static final BudaLogConfig l = new BudaLogConfig(LOGGER);
|
||||
|
||||
private Set<Client> clientsOnServer;
|
||||
private Set<Game> activeGames;
|
||||
private Set<Game> gamesOpenToJoin;
|
||||
|
||||
private Map<Client, Socket> clientSocketMap;
|
||||
private Map<Socket, Client> socketClientMap;
|
||||
private Map<Game, Client> gameClientMap;
|
||||
}
|
||||
|
||||
@ -1,5 +1,25 @@
|
||||
package ch.unibas.dmi.dbis.cs108.sebaschi;
|
||||
|
||||
import ch.unibas.dmi.dbis.cs108.BudaLogConfig;
|
||||
import ch.unibas.dmi.dbis.cs108.gamelogic.klassenstruktur.Ghost;
|
||||
import ch.unibas.dmi.dbis.cs108.gamelogic.klassenstruktur.Passenger;
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.util.Set;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
/**
|
||||
* Class that shall contain all non-game logik information relevant to a game session needed for
|
||||
* client-server and client-client communication.
|
||||
*/
|
||||
public class GameSessionData {
|
||||
|
||||
public static final Logger LOGGER = LogManager.getLogger();
|
||||
public static final BudaLogConfig l = new BudaLogConfig(LOGGER);
|
||||
|
||||
CentralServerData globalData;
|
||||
|
||||
Set<Passenger> passengers;
|
||||
Set<BufferedOutputStream> clientOutputStreams;
|
||||
Set<Ghost> ghosts;
|
||||
}
|
||||
|
||||
@ -0,0 +1,10 @@
|
||||
package ch.unibas.dmi.dbis.cs108.sebaschi;
|
||||
|
||||
/**
|
||||
* This class is just everyone on the server, which games are open to join, who is in session. I.E.
|
||||
* the context of the game just after joining the server, before starting a game and entering into a
|
||||
* lobby.
|
||||
*/
|
||||
public class ServerLobby {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user