Commits maybe need to be added to merge with GUI_MilestoneIV is possible
This commit is contained in:
parent
81ee9a8841
commit
7109ed113f
1
OgGhostWinners.txt
Normal file
1
OgGhostWinners.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
B
|
||||||
@ -19,7 +19,7 @@ public class BudaLogConfig {
|
|||||||
LoggerContext ctx = (LoggerContext) LogManager.getContext(false);
|
LoggerContext ctx = (LoggerContext) LogManager.getContext(false);
|
||||||
Configuration config = ctx.getConfiguration();
|
Configuration config = ctx.getConfiguration();
|
||||||
LoggerConfig loggerConfig = config.getLoggerConfig(LogManager.ROOT_LOGGER_NAME);
|
LoggerConfig loggerConfig = config.getLoggerConfig(LogManager.ROOT_LOGGER_NAME);
|
||||||
loggerConfig.setLevel(Level.ERROR); // change level here
|
loggerConfig.setLevel(Level.INFO); // change level here
|
||||||
ctx.updateLoggers(); // This causes all Loggers to refetch information from their LoggerConfig.
|
ctx.updateLoggers(); // This causes all Loggers to refetch information from their LoggerConfig.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -8,6 +8,8 @@ import ch.unibas.dmi.dbis.cs108.gamelogic.klassenstruktur.HumanNPC;
|
|||||||
import ch.unibas.dmi.dbis.cs108.gamelogic.klassenstruktur.HumanPlayer;
|
import ch.unibas.dmi.dbis.cs108.gamelogic.klassenstruktur.HumanPlayer;
|
||||||
import ch.unibas.dmi.dbis.cs108.gamelogic.klassenstruktur.Passenger;
|
import ch.unibas.dmi.dbis.cs108.gamelogic.klassenstruktur.Passenger;
|
||||||
import ch.unibas.dmi.dbis.cs108.highscore.OgGhostHighScore;
|
import ch.unibas.dmi.dbis.cs108.highscore.OgGhostHighScore;
|
||||||
|
import ch.unibas.dmi.dbis.cs108.multiplayer.helpers.GuiParameters;
|
||||||
|
import ch.unibas.dmi.dbis.cs108.multiplayer.helpers.Protocol;
|
||||||
import ch.unibas.dmi.dbis.cs108.multiplayer.server.ClientHandler;
|
import ch.unibas.dmi.dbis.cs108.multiplayer.server.ClientHandler;
|
||||||
import ch.unibas.dmi.dbis.cs108.multiplayer.server.Lobby;
|
import ch.unibas.dmi.dbis.cs108.multiplayer.server.Lobby;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
@ -76,6 +78,29 @@ public class Game implements Runnable {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Game getGame() {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initializes new thread that constantly sends a gameState update to all clients in this game
|
||||||
|
*/
|
||||||
|
public void gameStateModelUpdater(){
|
||||||
|
new Thread(() -> {
|
||||||
|
while (getGame().isOngoing) {
|
||||||
|
for (Passenger passenger : getGameState().getPassengerTrain()) {
|
||||||
|
passenger.send(GuiParameters.updateGameState, getGame());
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
Thread.sleep(4000); //TODO: Is this a good intervall?
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).start();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Starts a new game, creates a passenger array and saves it in gameState, sets the OG
|
* Starts a new game, creates a passenger array and saves it in gameState, sets the OG
|
||||||
* currently at gameState.train[3] fills the passengerTrain moving from left to rigth in the
|
* currently at gameState.train[3] fills the passengerTrain moving from left to rigth in the
|
||||||
@ -119,23 +144,27 @@ public class Game implements Runnable {
|
|||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
LOGGER.info(gameState.toString());
|
LOGGER.info(gameState.toString());
|
||||||
|
gameStateModelUpdater(); //TODO: does that work?
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
while (isOngoing) {//game cycle
|
while (isOngoing) {//game cycle TODO: maybe check that more often inside game loop?!
|
||||||
if (!isDay) {
|
if (!isDay) {
|
||||||
LOGGER.info("NIGHT");
|
LOGGER.info("NIGHT");
|
||||||
gameOverCheck = voteHandler.ghostVote(gameState.getPassengerTrain(), this);
|
gameOverCheck = voteHandler.ghostVote(gameState.getPassengerTrain(), this);
|
||||||
setDay(true);
|
setDay(true);
|
||||||
|
lobby.getAdmin().sendMsgToClientsInLobby(Protocol.printToGUI + "$" + ClientGameInfoHandler.itsDayTime + "$");
|
||||||
} else {
|
} else {
|
||||||
LOGGER.info("DAY");
|
LOGGER.info("DAY");
|
||||||
gameOverCheck = voteHandler.humanVote(gameState.getPassengerTrain(), this);
|
gameOverCheck = voteHandler.humanVote(gameState.getPassengerTrain(), this);
|
||||||
setDay(false);
|
setDay(false);
|
||||||
|
lobby.getAdmin().sendMsgToClientsInLobby(Protocol.printToGUI + "$" + ClientGameInfoHandler.itsNightTime + "$");
|
||||||
}
|
}
|
||||||
if (gameOverCheck.equals(ClientGameInfoHandler.gameOverGhostsWin) || gameOverCheck.equals(
|
if (gameOverCheck.equals(ClientGameInfoHandler.gameOverGhostsWin) || gameOverCheck.equals(
|
||||||
ClientGameInfoHandler.gameOverHumansWin)) {
|
ClientGameInfoHandler.gameOverHumansWin)) {
|
||||||
if (gameOverCheck.equals(ClientGameInfoHandler.gameOverGhostsWin) && getOgGhost().getIsPlayer()) {
|
if (gameOverCheck.equals(ClientGameInfoHandler.gameOverGhostsWin) && getOgGhost().getIsPlayer()) {
|
||||||
OgGhostHighScore.addOgGhostWinner(getOgGhost().getName());
|
OgGhostHighScore.addOgGhostWinner(getOgGhost().getName());
|
||||||
}
|
}
|
||||||
|
lobby.getAdmin().sendMsgToClientsInLobby(Protocol.printToGUI + "$" + GuiParameters.viewChangeToLobby + "$");
|
||||||
lobby.getAdmin().broadcastAnnouncementToLobby(gameOverCheck);
|
lobby.getAdmin().broadcastAnnouncementToLobby(gameOverCheck);
|
||||||
lobby.removeGameFromRunningGames(this);
|
lobby.removeGameFromRunningGames(this);
|
||||||
lobby.addGameToFinishedGames(this);
|
lobby.addGameToFinishedGames(this);
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import ch.unibas.dmi.dbis.cs108.BudaLogConfig;
|
|||||||
import ch.unibas.dmi.dbis.cs108.gamelogic.klassenstruktur.GhostNPC;
|
import ch.unibas.dmi.dbis.cs108.gamelogic.klassenstruktur.GhostNPC;
|
||||||
import ch.unibas.dmi.dbis.cs108.gamelogic.klassenstruktur.HumanNPC;
|
import ch.unibas.dmi.dbis.cs108.gamelogic.klassenstruktur.HumanNPC;
|
||||||
import ch.unibas.dmi.dbis.cs108.gamelogic.klassenstruktur.Passenger;
|
import ch.unibas.dmi.dbis.cs108.gamelogic.klassenstruktur.Passenger;
|
||||||
|
import ch.unibas.dmi.dbis.cs108.multiplayer.helpers.GuiParameters;
|
||||||
import ch.unibas.dmi.dbis.cs108.multiplayer.helpers.Protocol;
|
import ch.unibas.dmi.dbis.cs108.multiplayer.helpers.Protocol;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
@ -48,11 +49,10 @@ public class ServerGameInfoHandler {
|
|||||||
* won't get bored Formartiert Nachrichten die für einen Spectator gedacht sind.
|
* won't get bored Formartiert Nachrichten die für einen Spectator gedacht sind.
|
||||||
*
|
*
|
||||||
* @param msg the message to be formatted
|
* @param msg the message to be formatted
|
||||||
* @param passenger the passenger getting the message
|
|
||||||
* @param game the game in wich the passenger lives
|
* @param game the game in wich the passenger lives
|
||||||
* @return a message in a protocol format
|
* @return a message in a protocol format
|
||||||
*/
|
*/
|
||||||
public static String spectatorFormat(String msg, Passenger passenger, Game game) {
|
public static String spectatorFormat(String msg, Game game) {
|
||||||
switch (msg) {
|
switch (msg) {
|
||||||
case ClientGameInfoHandler.ghostVoteRequest:
|
case ClientGameInfoHandler.ghostVoteRequest:
|
||||||
case ClientGameInfoHandler.itsNightTime:
|
case ClientGameInfoHandler.itsNightTime:
|
||||||
@ -62,6 +62,9 @@ public class ServerGameInfoHandler {
|
|||||||
case ClientGameInfoHandler.itsDayTime:
|
case ClientGameInfoHandler.itsDayTime:
|
||||||
msg = Protocol.printToClientConsole + "$Humans are voting:" + game.gameState.toString();
|
msg = Protocol.printToClientConsole + "$Humans are voting:" + game.gameState.toString();
|
||||||
break;
|
break;
|
||||||
|
case GuiParameters.updateGameState:
|
||||||
|
msg = Protocol.printToGUI + "$" + GuiParameters.updateGameState + game.getGameState().toString();
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
msg = Protocol.printToClientConsole + "$" + msg;
|
msg = Protocol.printToClientConsole + "$" + msg;
|
||||||
}
|
}
|
||||||
@ -110,7 +113,10 @@ public class ServerGameInfoHandler {
|
|||||||
case ClientGameInfoHandler.noiseNotification + 4 + " time(s)":
|
case ClientGameInfoHandler.noiseNotification + 4 + " time(s)":
|
||||||
case ClientGameInfoHandler.noiseNotification + 5 + " time(s)":
|
case ClientGameInfoHandler.noiseNotification + 5 + " time(s)":
|
||||||
String outMsg = npc.getName() + ": " + noiseRandomizer();
|
String outMsg = npc.getName() + ": " + noiseRandomizer();
|
||||||
|
//TODO: add likelyhood
|
||||||
game.getLobby().getAdmin().broadcastNpcChatMessageToLobby(outMsg);
|
game.getLobby().getAdmin().broadcastNpcChatMessageToLobby(outMsg);
|
||||||
|
game.getLobby().getAdmin().sendMsgToClientsInLobby(Protocol.printToGUI + GuiParameters.noiseHeardAtPosition
|
||||||
|
+ "$" + npc.getPosition() + "$");
|
||||||
break;
|
break;
|
||||||
case ClientGameInfoHandler.ghostVoteRequest:
|
case ClientGameInfoHandler.ghostVoteRequest:
|
||||||
npc.vote(game);
|
npc.vote(game);
|
||||||
@ -133,6 +139,8 @@ public class ServerGameInfoHandler {
|
|||||||
case ClientGameInfoHandler.noiseNotification + 5 + " time(s)":
|
case ClientGameInfoHandler.noiseNotification + 5 + " time(s)":
|
||||||
String outMsg = npc.getName() + ": " + noiseRandomizer();
|
String outMsg = npc.getName() + ": " + noiseRandomizer();
|
||||||
game.getLobby().getAdmin().broadcastNpcChatMessageToLobby(outMsg);
|
game.getLobby().getAdmin().broadcastNpcChatMessageToLobby(outMsg);
|
||||||
|
game.getLobby().getAdmin().sendMsgToClientsInLobby(Protocol.printToGUI + GuiParameters.noiseHeardAtPosition
|
||||||
|
+ "$" + npc.getPosition() + "$");
|
||||||
break;
|
break;
|
||||||
case ClientGameInfoHandler.humanVoteRequest:
|
case ClientGameInfoHandler.humanVoteRequest:
|
||||||
npc.vote(game);
|
npc.vote(game);
|
||||||
|
|||||||
@ -4,6 +4,8 @@ import ch.unibas.dmi.dbis.cs108.BudaLogConfig;
|
|||||||
import ch.unibas.dmi.dbis.cs108.gamelogic.ClientVoteData;
|
import ch.unibas.dmi.dbis.cs108.gamelogic.ClientVoteData;
|
||||||
import ch.unibas.dmi.dbis.cs108.gamelogic.Game;
|
import ch.unibas.dmi.dbis.cs108.gamelogic.Game;
|
||||||
import ch.unibas.dmi.dbis.cs108.gamelogic.ServerGameInfoHandler;
|
import ch.unibas.dmi.dbis.cs108.gamelogic.ServerGameInfoHandler;
|
||||||
|
import ch.unibas.dmi.dbis.cs108.multiplayer.helpers.GuiParameters;
|
||||||
|
import ch.unibas.dmi.dbis.cs108.multiplayer.helpers.Protocol;
|
||||||
import ch.unibas.dmi.dbis.cs108.multiplayer.server.ClientHandler;
|
import ch.unibas.dmi.dbis.cs108.multiplayer.server.ClientHandler;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
@ -41,7 +43,12 @@ public class GhostPlayer extends Ghost {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void send(String msg, Game game) {
|
public void send(String msg, Game game) {
|
||||||
String formattedMsg = ServerGameInfoHandler.format(msg, this, game);
|
String formattedMsg;
|
||||||
|
if (msg.equals(GuiParameters.updateGameState)) {
|
||||||
|
formattedMsg = Protocol.printToGUI + "$" + GuiParameters.updateGameState + game.getGameState().toString();
|
||||||
|
} else {
|
||||||
|
formattedMsg = ServerGameInfoHandler.format(msg, this, game);
|
||||||
|
}
|
||||||
clientHandler.sendMsgToClient(formattedMsg);
|
clientHandler.sendMsgToClient(formattedMsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -4,6 +4,8 @@ import ch.unibas.dmi.dbis.cs108.BudaLogConfig;
|
|||||||
import ch.unibas.dmi.dbis.cs108.gamelogic.ClientVoteData;
|
import ch.unibas.dmi.dbis.cs108.gamelogic.ClientVoteData;
|
||||||
import ch.unibas.dmi.dbis.cs108.gamelogic.Game;
|
import ch.unibas.dmi.dbis.cs108.gamelogic.Game;
|
||||||
import ch.unibas.dmi.dbis.cs108.gamelogic.ServerGameInfoHandler;
|
import ch.unibas.dmi.dbis.cs108.gamelogic.ServerGameInfoHandler;
|
||||||
|
import ch.unibas.dmi.dbis.cs108.multiplayer.helpers.GuiParameters;
|
||||||
|
import ch.unibas.dmi.dbis.cs108.multiplayer.helpers.Protocol;
|
||||||
import ch.unibas.dmi.dbis.cs108.multiplayer.server.ClientHandler;
|
import ch.unibas.dmi.dbis.cs108.multiplayer.server.ClientHandler;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
@ -42,7 +44,12 @@ public class HumanPlayer extends Human {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void send(String msg, Game game) {
|
public void send(String msg, Game game) {
|
||||||
String formattedMsg = ServerGameInfoHandler.format(msg,this, game);
|
String formattedMsg;
|
||||||
|
if (msg.equals(GuiParameters.updateGameState)) {
|
||||||
|
formattedMsg = Protocol.printToGUI + "$" + GuiParameters.updateGameState + game.getGameState().humanToString();
|
||||||
|
} else {
|
||||||
|
formattedMsg = ServerGameInfoHandler.format(msg, this, game);
|
||||||
|
}
|
||||||
clientHandler.sendMsgToClient(formattedMsg);
|
clientHandler.sendMsgToClient(formattedMsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -29,6 +29,6 @@ public class Spectator extends Passenger{
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void send(String msg, Game game) {
|
public void send(String msg, Game game) {
|
||||||
clientHandler.sendMsgToClient(ServerGameInfoHandler.spectatorFormat(msg, this, game));
|
clientHandler.sendMsgToClient(ServerGameInfoHandler.spectatorFormat(msg, game));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,6 +11,7 @@ import ch.unibas.dmi.dbis.cs108.multiplayer.client.gui.game.GameController;
|
|||||||
import ch.unibas.dmi.dbis.cs108.multiplayer.helpers.ClientPinger;
|
import ch.unibas.dmi.dbis.cs108.multiplayer.helpers.ClientPinger;
|
||||||
|
|
||||||
|
|
||||||
|
import ch.unibas.dmi.dbis.cs108.multiplayer.helpers.GuiParameters;
|
||||||
import ch.unibas.dmi.dbis.cs108.multiplayer.helpers.Protocol;
|
import ch.unibas.dmi.dbis.cs108.multiplayer.helpers.Protocol;
|
||||||
|
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
@ -309,35 +310,92 @@ public class Client {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* funnels a message to the gui, where depending on the message different functions/controls/methods
|
* funnels a message to the gui, where depending on the parameter different functions/controls/methods
|
||||||
* of the gui are targeted. The message contains information on what to do, which are extracted
|
* of the gui are targeted. The data contains more information the gui needs
|
||||||
* @param msg a message of the form {@code parameter$msg}
|
* @param parameter a string according to {@link GuiParameters} and {@link ClientGameInfoHandler} can be empty
|
||||||
*
|
* @param data some information in a string, separators can be $ or :
|
||||||
|
*TODO(Seraina&Sebi): evtl. auslagern?
|
||||||
*/
|
*/
|
||||||
public void sendToGUI(String msg) {
|
public void sendToGUI(String parameter, String data) {
|
||||||
int indexFirstDollar = msg.indexOf('$');
|
|
||||||
String header = "";
|
|
||||||
try {
|
try {
|
||||||
header = msg.substring(0,indexFirstDollar);
|
switch (parameter) {
|
||||||
} catch (IndexOutOfBoundsException e) {
|
case ClientGameInfoHandler.itsNightTime: //ClientGameInfoHandler
|
||||||
LOGGER.info(e.getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (header) {
|
|
||||||
case ClientGameInfoHandler.itsNightTime:
|
|
||||||
gameStateModel.setDayClone(false);
|
gameStateModel.setDayClone(false);
|
||||||
break;
|
break;
|
||||||
case ClientGameInfoHandler.itsDayTime:
|
case ClientGameInfoHandler.itsDayTime: //ClientGameInfoHandler
|
||||||
gameStateModel.setDayClone(true);
|
gameStateModel.setDayClone(true);
|
||||||
break;
|
break;
|
||||||
|
case GuiParameters.updateGameState:
|
||||||
|
gameStateModel.setGSFromString(data);
|
||||||
|
gameController.updateRoomLabels();
|
||||||
|
break;
|
||||||
|
case GuiParameters.noiseHeardAtPosition:
|
||||||
|
try {
|
||||||
|
int position = Integer.parseInt(data);
|
||||||
|
determineNoiseDisplay(position);
|
||||||
|
} catch (Exception e) {
|
||||||
|
LOGGER.warn("Not a position given for noise");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case GuiParameters.listOfLobbies:
|
||||||
|
//TODO
|
||||||
|
break;
|
||||||
|
case GuiParameters.listOfPLayers:
|
||||||
|
//TODO
|
||||||
|
break;
|
||||||
|
case GuiParameters.viewChangeToGame:
|
||||||
|
//TODO
|
||||||
|
break;
|
||||||
|
case GuiParameters.viewChangeToStart:
|
||||||
|
//TODO
|
||||||
|
break;
|
||||||
|
case GuiParameters.viewChangeToLobby:
|
||||||
|
//TODO
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
gameController.addMessageToNotificationText(msg); //TODO(Sebi,Seraina): should the gameController be in the Application just like the ChatController?
|
notificationTextDisplay(data);
|
||||||
|
//TODO(Sebi,Seraina): should the gameController be in the Application just like the ChatController?
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
LOGGER.warn("Communication with GUI currently not possible: " + e.getMessage());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Starts a new thread, thad adds a message to notificationText in the gameController,
|
||||||
|
* waits 3 seconds and deletes it again.
|
||||||
|
* @param data the message to be added
|
||||||
|
*/
|
||||||
|
public void notificationTextDisplay(String data) {
|
||||||
|
new Thread(() -> {
|
||||||
|
try {
|
||||||
|
gameController.addMessageToNotificationText(data);
|
||||||
|
Thread.sleep(3000);
|
||||||
|
gameController.clearNotificationText();
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
LOGGER.warn(e.getMessage());
|
||||||
|
}
|
||||||
|
}).start();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void determineNoiseDisplay(int position) {
|
||||||
|
switch (position) {
|
||||||
|
case 0:
|
||||||
|
gameController.noiseDisplay0();
|
||||||
|
case 1:
|
||||||
|
gameController.noiseDisplay1();
|
||||||
|
case 2:
|
||||||
|
gameController.noiseDisplay2();
|
||||||
|
case 3:
|
||||||
|
gameController.noiseDisplay3();
|
||||||
|
case 4:
|
||||||
|
gameController.noiseDisplay4();
|
||||||
|
case 5:
|
||||||
|
gameController.noiseDisplay5();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -49,7 +49,6 @@ public class JClientProtocolParser {
|
|||||||
break;
|
break;
|
||||||
case Protocol.serverRequestsGhostVote:
|
case Protocol.serverRequestsGhostVote:
|
||||||
LOGGER.debug("Ghost received Vote request");
|
LOGGER.debug("Ghost received Vote request");
|
||||||
//c.sendToGUI(ClientGameInfoHandler.ghostVoteRequest);
|
|
||||||
c.positionSetter(msg.substring(6));
|
c.positionSetter(msg.substring(6));
|
||||||
break;
|
break;
|
||||||
case Protocol.serverRequestsHumanVote:
|
case Protocol.serverRequestsHumanVote:
|
||||||
@ -61,7 +60,17 @@ public class JClientProtocolParser {
|
|||||||
c.changeUsername(msg.substring(6));
|
c.changeUsername(msg.substring(6));
|
||||||
break;
|
break;
|
||||||
case Protocol.printToGUI:
|
case Protocol.printToGUI:
|
||||||
c.sendToGUI(msg.substring(6));
|
String substring = msg.substring(6);
|
||||||
|
int index = msg.indexOf("$");
|
||||||
|
String parameter = "";
|
||||||
|
String data = substring;
|
||||||
|
try {
|
||||||
|
parameter = msg.substring(0,index);
|
||||||
|
data = msg.substring(index+1);
|
||||||
|
} catch (Exception e) {
|
||||||
|
LOGGER.warn("No parameter in PTGUI");
|
||||||
|
}
|
||||||
|
c.sendToGUI(parameter,data);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
System.out.println("Received unknown command");
|
System.out.println("Received unknown command");
|
||||||
|
|||||||
@ -1,5 +1,8 @@
|
|||||||
package ch.unibas.dmi.dbis.cs108.multiplayer.client.gui.game;
|
package ch.unibas.dmi.dbis.cs108.multiplayer.client.gui.game;
|
||||||
|
|
||||||
|
import ch.unibas.dmi.dbis.cs108.multiplayer.client.Client;
|
||||||
|
import ch.unibas.dmi.dbis.cs108.multiplayer.client.gui.GameStateModel;
|
||||||
|
import ch.unibas.dmi.dbis.cs108.multiplayer.helpers.GuiParameters;
|
||||||
import ch.unibas.dmi.dbis.cs108.multiplayer.client.gui.GameStateModel;
|
import ch.unibas.dmi.dbis.cs108.multiplayer.client.gui.GameStateModel;
|
||||||
import javafx.event.EventHandler;
|
import javafx.event.EventHandler;
|
||||||
import ch.unibas.dmi.dbis.cs108.BudaLogConfig;
|
import ch.unibas.dmi.dbis.cs108.BudaLogConfig;
|
||||||
@ -23,6 +26,8 @@ import javafx.scene.control.Label;
|
|||||||
import javafx.scene.control.SplitPane;
|
import javafx.scene.control.SplitPane;
|
||||||
import javafx.scene.control.TextArea;
|
import javafx.scene.control.TextArea;
|
||||||
import javafx.scene.control.TextField;
|
import javafx.scene.control.TextField;
|
||||||
|
import javafx.scene.image.Image;
|
||||||
|
import javafx.scene.image.ImageView;
|
||||||
import javafx.scene.layout.AnchorPane;
|
import javafx.scene.layout.AnchorPane;
|
||||||
import javafx.scene.layout.Background;
|
import javafx.scene.layout.Background;
|
||||||
import javafx.scene.layout.HBox;
|
import javafx.scene.layout.HBox;
|
||||||
@ -31,13 +36,19 @@ import javafx.scene.layout.VBox;
|
|||||||
import javafx.scene.paint.Color;
|
import javafx.scene.paint.Color;
|
||||||
import javafx.scene.text.Text;
|
import javafx.scene.text.Text;
|
||||||
import javafx.scene.text.TextFlow;
|
import javafx.scene.text.TextFlow;
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
public class GameController {
|
public class GameController {
|
||||||
|
public static final Logger LOGGER = LogManager.getLogger(GameController.class);
|
||||||
|
public static final BudaLogConfig l = new BudaLogConfig(LOGGER);
|
||||||
|
|
||||||
private static ClientModel client;
|
private static ClientModel client;
|
||||||
|
|
||||||
private static GameStateModel gameStateModel;
|
private static GameStateModel gameStateModel;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//TODO(Seraina, Sebi): Same issue as ChatController? do with setters?
|
//TODO(Seraina, Sebi): Same issue as ChatController? do with setters?
|
||||||
public GameController(ClientModel c, GameStateModel g) {
|
public GameController(ClientModel c, GameStateModel g) {
|
||||||
client = c;
|
client = c;
|
||||||
@ -76,6 +87,20 @@ public class GameController {
|
|||||||
@FXML
|
@FXML
|
||||||
private TextFlow lableRoom5;
|
private TextFlow lableRoom5;
|
||||||
@FXML
|
@FXML
|
||||||
|
private HBox notificationHBox;
|
||||||
|
@FXML
|
||||||
|
private ImageView noiseImage0;
|
||||||
|
@FXML
|
||||||
|
private ImageView noiseImage1;
|
||||||
|
@FXML
|
||||||
|
private ImageView noiseImage2;
|
||||||
|
@FXML
|
||||||
|
private ImageView noiseImage3;
|
||||||
|
@FXML
|
||||||
|
private ImageView noiseImage4;
|
||||||
|
@FXML
|
||||||
|
private ImageView noiseImage5;
|
||||||
|
@FXML
|
||||||
private Button noiseButton;
|
private Button noiseButton;
|
||||||
@FXML
|
@FXML
|
||||||
private TextFlow notificationText;
|
private TextFlow notificationText;
|
||||||
@ -132,22 +157,29 @@ public class GameController {
|
|||||||
* Sends a noise message, to the server, should be a gui message?
|
* Sends a noise message, to the server, should be a gui message?
|
||||||
*/
|
*/
|
||||||
public void noise() {
|
public void noise() {
|
||||||
client.getClient().sendMsgToServer("noise"); //TODO: Add message
|
client.getClient().sendMsgToServer(
|
||||||
|
Protocol.sendMessageToAllClients + "$" + Protocol.printToGUI + GuiParameters.noiseHeardAtPosition + "$"
|
||||||
|
+ client.getClient().getPosition()); //TODO: Test!!
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Takes a given message and displays it in the notificationText Flow in the game Scene
|
* Takes a given message and displays it in the notificationText Flow in the game Scene
|
||||||
* @param msg the message to be displayed
|
* @param msg the message to be displayed
|
||||||
*/
|
*/
|
||||||
public void addMessageToNotificationText(String msg) {
|
public void addMessageToNotificationText(String msg){
|
||||||
Text notification = new Text(msg);
|
Text notification = new Text(msg);
|
||||||
|
try {
|
||||||
notificationText.getChildren().clear();
|
notificationText.getChildren().clear();
|
||||||
notificationText.getChildren().add(notification);
|
notificationText.getChildren().add(notification);
|
||||||
|
} catch (Exception e) {
|
||||||
|
LOGGER.trace("Not yet initialized");
|
||||||
|
}
|
||||||
//TODO: Wait for a certain time, then clear all again
|
//TODO: Wait for a certain time, then clear all again
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates the labels of the rooms accordingly to the datastructures in GameStateModel
|
* Adds a msg to the room Lable at the specified position
|
||||||
|
* @param names a String array containing all the names
|
||||||
*/
|
*/
|
||||||
public void updateRoomLabels() {
|
public void updateRoomLabels() {
|
||||||
String[] names = gameStateModel.getPassengerTrainClone()[0];
|
String[] names = gameStateModel.getPassengerTrainClone()[0];
|
||||||
@ -165,6 +197,7 @@ public class GameController {
|
|||||||
Text role4 = new Text(roles[4]);
|
Text role4 = new Text(roles[4]);
|
||||||
Text role5 = new Text(roles[5]);
|
Text role5 = new Text(roles[5]);
|
||||||
|
|
||||||
|
try {
|
||||||
lableRoom0.getChildren().clear();
|
lableRoom0.getChildren().clear();
|
||||||
lableRoom0.getChildren().add(name0);
|
lableRoom0.getChildren().add(name0);
|
||||||
lableRoom0.getChildren().add(role0);
|
lableRoom0.getChildren().add(role0);
|
||||||
@ -183,7 +216,83 @@ public class GameController {
|
|||||||
lableRoom5.getChildren().clear();
|
lableRoom5.getChildren().clear();
|
||||||
lableRoom5.getChildren().add(name5);
|
lableRoom5.getChildren().add(name5);
|
||||||
lableRoom5.getChildren().add(role5);
|
lableRoom5.getChildren().add(role5);
|
||||||
|
} catch (Exception e) {
|
||||||
|
LOGGER.trace("Not yet initialized");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds an image of a bell on top of button0
|
||||||
|
*/
|
||||||
|
public void noiseDisplay0(){
|
||||||
|
Image bell = new Image("ch.unibas.dmi.dbis.cs108.multiplayer.client.gui.game.DayOpen.bell.png");
|
||||||
|
try {
|
||||||
|
noiseImage0.setImage(bell);
|
||||||
|
} catch (Exception e) {
|
||||||
|
LOGGER.trace("Not yet initialized");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds an image of a bell on top of button1
|
||||||
|
*/
|
||||||
|
public void noiseDisplay1(){
|
||||||
|
Image bell = new Image("ch.unibas.dmi.dbis.cs108.multiplayer.client.gui.game.DayOpen.bell.png");
|
||||||
|
try {
|
||||||
|
noiseImage0.setImage(bell);
|
||||||
|
} catch (Exception e) {
|
||||||
|
LOGGER.trace("Not yet initialized");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds an image of a bell on top of button2
|
||||||
|
*/
|
||||||
|
public void noiseDisplay2(){
|
||||||
|
Image bell = new Image("ch.unibas.dmi.dbis.cs108.multiplayer.client.gui.game.DayOpen.bell.png");
|
||||||
|
try {
|
||||||
|
noiseImage0.setImage(bell);
|
||||||
|
} catch (Exception e) {
|
||||||
|
LOGGER.trace("Not yet initialized");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds an image of a bell on top of button3
|
||||||
|
*/
|
||||||
|
public void noiseDisplay3(){
|
||||||
|
Image bell = new Image("ch.unibas.dmi.dbis.cs108.multiplayer.client.gui.game.DayOpen.bell.png");
|
||||||
|
try {
|
||||||
|
noiseImage0.setImage(bell);
|
||||||
|
} catch (Exception e) {
|
||||||
|
LOGGER.trace("Not yet initialized");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds an image of a bell on top of button4
|
||||||
|
*/
|
||||||
|
public void noiseDisplay4(){
|
||||||
|
Image bell = new Image("ch.unibas.dmi.dbis.cs108.multiplayer.client.gui.game.DayOpen.bell.png");
|
||||||
|
try {
|
||||||
|
noiseImage0.setImage(bell);
|
||||||
|
} catch (Exception e) {
|
||||||
|
LOGGER.trace("Not yet initialized");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds an image of a bell on top of button5
|
||||||
|
*/
|
||||||
|
public void noiseDisplay5(){
|
||||||
|
Image bell = new Image("ch.unibas.dmi.dbis.cs108.multiplayer.client.gui.game.DayOpen.bell.png");
|
||||||
|
try {
|
||||||
|
noiseImage0.setImage(bell);
|
||||||
|
} catch (Exception e) {
|
||||||
|
LOGGER.trace("Not yet initialized");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void setGameStateModel(
|
public void setGameStateModel(
|
||||||
|
|||||||
@ -0,0 +1,45 @@
|
|||||||
|
package ch.unibas.dmi.dbis.cs108.multiplayer.helpers;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class contains parameters for the PTGUI protocol message
|
||||||
|
*/
|
||||||
|
public class GuiParameters {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tells GUI to update the gameStateModel, in the form {@code UPDATE$name:role:kickedOff$name:role:kickedOff} ... usw.
|
||||||
|
*/
|
||||||
|
public static final String updateGameState = "UPDATE";
|
||||||
|
/**
|
||||||
|
* Tells Gui, that the following statement after $, is a String containing the listOfLobbies
|
||||||
|
*/
|
||||||
|
public static final String listOfLobbies = "LOBBIES";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tells Gui, that what follows is a list of players per Lobby
|
||||||
|
*/
|
||||||
|
public static final String listOfPLayers = "PLAYERS";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tells Gui, that the passenger at position {@code position} has heard some noise
|
||||||
|
* Form: {@code NOISE$position$}
|
||||||
|
*/
|
||||||
|
public static final String noiseHeardAtPosition = "NOISE";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tells Gui, that the start view should be displayed
|
||||||
|
*/
|
||||||
|
public static final String viewChangeToStart = "VCSTART";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tells Gui, that the lobby view should be displayed
|
||||||
|
*/
|
||||||
|
public static final String viewChangeToLobby = "VCLOBBY";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tells Gui, that the game view should be displayed
|
||||||
|
*/
|
||||||
|
public static final String viewChangeToGame = "VCGAME";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -143,6 +143,12 @@ public class Protocol {
|
|||||||
*/
|
*/
|
||||||
public static final String highScoreList = "HSCOR";
|
public static final String highScoreList = "HSCOR";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The client requests that a message in {@code STACL$msg} is sent to all clients but only the message
|
||||||
|
* without a specific Server message to be added.
|
||||||
|
*/
|
||||||
|
public static final String sendMessageToAllClients = "STACL";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -195,10 +201,9 @@ public class Protocol {
|
|||||||
public static final String changedUserName = "CHNAM";
|
public static final String changedUserName = "CHNAM";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sends a message to a client containing information for the gui. The command is structured {@code PTGUI$parameter$msg}
|
* Handles all information that the gui of the client needs. The Form is {@code PTGUI$parameters$msg}
|
||||||
* where the parameter specifies what exactly to do in de gui (i.e. change scene) and the optional
|
* where the parameter tells the gui to do different things according to {@link GuiParameters} and the message
|
||||||
* message contains information the gui needs from the server to execute the command specified in the parameter
|
* contains a certain information i.e. who is where in the train
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public static final String printToGUI = "PTGUI";
|
public static final String printToGUI = "PTGUI";
|
||||||
|
|
||||||
|
|||||||
@ -238,7 +238,7 @@ public class ClientHandler implements Runnable {
|
|||||||
* @param msg the Message to be broadcast. Does not have to be protocol-formatted, this method
|
* @param msg the Message to be broadcast. Does not have to be protocol-formatted, this method
|
||||||
* will take care of that.
|
* will take care of that.
|
||||||
*/
|
*/
|
||||||
public static void broadcastAnnouncementToAll(String msg) {
|
public static void broadcastAnnouncementToAll(String msg) { //TODO: Adjust to GUI command?
|
||||||
System.out.println(msg);
|
System.out.println(msg);
|
||||||
for (ClientHandler client : connectedClients) {
|
for (ClientHandler client : connectedClients) {
|
||||||
client.sendMsgToClient(Protocol.printToClientConsole + "$" + msg);
|
client.sendMsgToClient(Protocol.printToClientConsole + "$" + msg);
|
||||||
@ -254,7 +254,7 @@ public class ClientHandler implements Runnable {
|
|||||||
* @param msg the Message to be broadcast. Does not have to be protocol-formatted, this method
|
* @param msg the Message to be broadcast. Does not have to be protocol-formatted, this method
|
||||||
* will take care of that.
|
* will take care of that.
|
||||||
*/
|
*/
|
||||||
public void broadcastAnnouncementToLobby(String msg) {
|
public void broadcastAnnouncementToLobby(String msg) { //TODO: Adjust to GUI command?
|
||||||
Lobby l = getLobby();
|
Lobby l = getLobby();
|
||||||
if (l != null) {
|
if (l != null) {
|
||||||
//System.out.println(msg); we can-comment this if you want lobby-announcements to print on the server console as well.
|
//System.out.println(msg); we can-comment this if you want lobby-announcements to print on the server console as well.
|
||||||
@ -305,6 +305,35 @@ public class ClientHandler implements Runnable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sends a given message to all connected client. The message has to already be protocol-formatted.
|
||||||
|
*
|
||||||
|
* @param msg the given message. Should already be protocol-formatted.
|
||||||
|
*/
|
||||||
|
public void sendMsgToAllClients(String msg) {
|
||||||
|
for (ClientHandler client : connectedClients) {
|
||||||
|
client.sendMsgToClient(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sends a Message to all clients in the same lobby. The message has to already be protocol-formatted.
|
||||||
|
* @param msg the given message. Should already be protocol-formatted.
|
||||||
|
*/
|
||||||
|
public void sendMsgToClientsInLobby(String msg) {
|
||||||
|
Lobby l = getLobby();
|
||||||
|
if (l != null) {
|
||||||
|
//System.out.println(msg); we can-comment this if you want lobby-announcements to print on the server console as well.
|
||||||
|
for (ClientHandler client : l.getLobbyClients()) {
|
||||||
|
client.sendMsgToClient(msg);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
LOGGER.debug("Could not send announcements; probably client isn't in a lobby."
|
||||||
|
+ "Will send across all lobbies now.");
|
||||||
|
sendMsgToAllClients(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decode a whisper message
|
* Decode a whisper message
|
||||||
*
|
*
|
||||||
|
|||||||
@ -2,6 +2,7 @@ package ch.unibas.dmi.dbis.cs108.multiplayer.server;
|
|||||||
|
|
||||||
|
|
||||||
import ch.unibas.dmi.dbis.cs108.BudaLogConfig;
|
import ch.unibas.dmi.dbis.cs108.BudaLogConfig;
|
||||||
|
import ch.unibas.dmi.dbis.cs108.multiplayer.helpers.GuiParameters;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
import ch.unibas.dmi.dbis.cs108.multiplayer.helpers.Protocol;
|
import ch.unibas.dmi.dbis.cs108.multiplayer.helpers.Protocol;
|
||||||
@ -81,6 +82,7 @@ public class JServerProtocolParser {
|
|||||||
try {
|
try {
|
||||||
int i = Integer.parseInt(msg.substring(6, 7));
|
int i = Integer.parseInt(msg.substring(6, 7));
|
||||||
h.joinLobby(i);
|
h.joinLobby(i);
|
||||||
|
h.sendMsgToClient(Protocol.printToGUI + "$" + GuiParameters.viewChangeToLobby + "$");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
h.sendMsgToClient(Protocol.printToClientConsole
|
h.sendMsgToClient(Protocol.printToClientConsole
|
||||||
+ "$Invalid input. Please use JOINL$1 to join Lobby 1, for example.");
|
+ "$Invalid input. Please use JOINL$1 to join Lobby 1, for example.");
|
||||||
@ -88,6 +90,7 @@ public class JServerProtocolParser {
|
|||||||
break;
|
break;
|
||||||
case Protocol.createNewLobby:
|
case Protocol.createNewLobby:
|
||||||
h.createNewLobby();
|
h.createNewLobby();
|
||||||
|
h.sendMsgToClient(Protocol.printToGUI + "$" + GuiParameters.viewChangeToLobby+ "$");
|
||||||
break;
|
break;
|
||||||
case Protocol.listLobbies:
|
case Protocol.listLobbies:
|
||||||
h.listLobbies();
|
h.listLobbies();
|
||||||
@ -97,6 +100,7 @@ public class JServerProtocolParser {
|
|||||||
break;
|
break;
|
||||||
case Protocol.leaveLobby:
|
case Protocol.leaveLobby:
|
||||||
h.leaveLobby();
|
h.leaveLobby();
|
||||||
|
h.sendMsgToClient(Protocol.printToGUI + "$" + GuiParameters.viewChangeToStart + "$");
|
||||||
break;
|
break;
|
||||||
case Protocol.votedFor:
|
case Protocol.votedFor:
|
||||||
LOGGER.debug("Made it here");
|
LOGGER.debug("Made it here");
|
||||||
@ -105,6 +109,7 @@ public class JServerProtocolParser {
|
|||||||
break;
|
break;
|
||||||
case Protocol.startANewGame:
|
case Protocol.startANewGame:
|
||||||
h.startNewGame();
|
h.startNewGame();
|
||||||
|
h.sendMsgToClientsInLobby(Protocol.printToGUI + "$" + GuiParameters.viewChangeToGame + "$");
|
||||||
break;
|
break;
|
||||||
case Protocol.listGames:
|
case Protocol.listGames:
|
||||||
h.listGames();
|
h.listGames();
|
||||||
@ -112,6 +117,9 @@ public class JServerProtocolParser {
|
|||||||
case Protocol.highScoreList:
|
case Protocol.highScoreList:
|
||||||
h.sendHighScoreList();
|
h.sendHighScoreList();
|
||||||
break;
|
break;
|
||||||
|
case Protocol.sendMessageToAllClients:
|
||||||
|
msg = msg.substring(6);
|
||||||
|
h.sendMsgToClient(msg);
|
||||||
default:
|
default:
|
||||||
System.out.println("Received unknown command");
|
System.out.println("Received unknown command");
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
@ -13,6 +13,16 @@
|
|||||||
<children>
|
<children>
|
||||||
<Group fx:id="roomButtonGroupDay" layoutX="230.5" layoutY="220.0">
|
<Group fx:id="roomButtonGroupDay" layoutX="230.5" layoutY="220.0">
|
||||||
<children>
|
<children>
|
||||||
|
<HBox fx:id="notificationHBox" layoutX="50.0" layoutY="-74.0" rotate="12.4">
|
||||||
|
<children>
|
||||||
|
<ImageView fx:id="noiseImage0" fitHeight="150.0" fitWidth="125.0" pickOnBounds="true" preserveRatio="true" />
|
||||||
|
<ImageView fx:id="noiseImage1" fitHeight="150.0" fitWidth="125.0" pickOnBounds="true" preserveRatio="true" />
|
||||||
|
<ImageView fx:id="noiseImage2" fitHeight="150.0" fitWidth="125.0" pickOnBounds="true" preserveRatio="true" />
|
||||||
|
<ImageView fx:id="noiseImage3" fitHeight="150.0" fitWidth="125.0" pickOnBounds="true" preserveRatio="true" />
|
||||||
|
<ImageView fx:id="noiseImage4" fitHeight="150.0" fitWidth="125.0" pickOnBounds="true" preserveRatio="true" />
|
||||||
|
<ImageView fx:id="noiseImage5" fitHeight="150.0" fitWidth="125.0" pickOnBounds="true" preserveRatio="true" />
|
||||||
|
</children>
|
||||||
|
</HBox>
|
||||||
<Button id="room1" fx:id="buttonRoom0" accessibleRole="RADIO_BUTTON" alignment="TOP_CENTER" contentDisplay="GRAPHIC_ONLY" layoutX="21.5" minWidth="-Infinity" mnemonicParsing="false" onAction="#sendVote0" prefHeight="110.0" prefWidth="90.0" text="room0">
|
<Button id="room1" fx:id="buttonRoom0" accessibleRole="RADIO_BUTTON" alignment="TOP_CENTER" contentDisplay="GRAPHIC_ONLY" layoutX="21.5" minWidth="-Infinity" mnemonicParsing="false" onAction="#sendVote0" prefHeight="110.0" prefWidth="90.0" text="room0">
|
||||||
<font>
|
<font>
|
||||||
<Font size="25.0" />
|
<Font size="25.0" />
|
||||||
|
|||||||
Reference in New Issue
Block a user