several minor adjustments

This commit is contained in:
Jonas 2022-05-16 23:38:46 +02:00
parent d2ada1d1ae
commit 0b00e236e7
2 changed files with 9 additions and 2 deletions

View File

@ -26,7 +26,7 @@ public class Timer {
/** /**
* The maximum length of the human vote in the day, in seconds * The maximum length of the human vote in the day, in seconds
*/ */
public static final int humanVoteTime = 60; public static final int humanVoteTime = 63;
/** /**
* The length of time in seconds after the human vote, as the 'winner' of the vote is announced, * The length of time in seconds after the human vote, as the 'winner' of the vote is announced,

View File

@ -1,8 +1,10 @@
package ch.unibas.dmi.dbis.cs108.gamelogic.klassenstruktur; package ch.unibas.dmi.dbis.cs108.gamelogic.klassenstruktur;
import ch.unibas.dmi.dbis.cs108.BudaLogConfig; import ch.unibas.dmi.dbis.cs108.BudaLogConfig;
import ch.unibas.dmi.dbis.cs108.gamelogic.ClientGameInfoHandler;
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.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;
@ -29,6 +31,11 @@ public class Spectator extends Passenger{
*/ */
@Override @Override
public void send(String msg, Game game) { public void send(String msg, Game game) {
if (msg.equals(ClientGameInfoHandler.noiseNotification)) {
clientHandler.sendMsgToClient(Protocol.noiseNotificationProtocol);
} else {
clientHandler.sendMsgToClient(ServerGameInfoHandler.spectatorFormat(msg, game)); clientHandler.sendMsgToClient(ServerGameInfoHandler.spectatorFormat(msg, game));
} }
}
} }