diff --git a/Server/src/main/java/uulm/teamname/marvelous/server/lobby/RoundTimer.java b/Server/src/main/java/uulm/teamname/marvelous/server/lobby/RoundTimer.java new file mode 100644 index 0000000..1eb9d83 --- /dev/null +++ b/Server/src/main/java/uulm/teamname/marvelous/server/lobby/RoundTimer.java @@ -0,0 +1,30 @@ +package uulm.teamname.marvelous.server.lobby; + +import uulm.teamname.marvelous.server.ParticipantType; +import uulm.teamname.marvelous.server.lobbymanager.Participant; + +import java.util.Timer; +import java.util.TimerTask; + +public class RoundTimer { + private final Timer timer; + private final Lobby parent; + private final int time; + + public RoundTimer(int maxRoundTime, Lobby parent) { + this.timer = new Timer(); + time = maxRoundTime; + this.parent = parent; + } + + public void startRoundTimer(Participant p) { + if (p.type == ParticipantType.Spectator) throw new IllegalStateException("Spectators don't have TurnTime"); + timer.cancel(); +// timer.schedule(new TimerTask() { +// @Override +// public void run() { +// // TODO: skip current round +// } +// }); + } +}