This commit is contained in:
@@ -8,15 +8,7 @@ public class EndGamePacket extends Packet {
|
||||
|
||||
static private final long serialVersionUID = Packets.EndGame.ordinal();
|
||||
|
||||
private final int winnerId;
|
||||
|
||||
public EndGamePacket(int winnerId) {
|
||||
this.winnerId = winnerId;
|
||||
}
|
||||
|
||||
public int getWinnerId() {
|
||||
return winnerId;
|
||||
}
|
||||
public EndGamePacket() { }
|
||||
|
||||
@Override
|
||||
public void accept(PacketVisitor packetVisitor) {
|
||||
|
||||
@@ -13,10 +13,12 @@ public class StartGamePacket extends Packet {
|
||||
private final String serializedSudoku;
|
||||
// used to resume game
|
||||
private final Instant instant;
|
||||
private final long gameDuration;
|
||||
|
||||
public StartGamePacket(String serializedSudoku, Instant instant) {
|
||||
public StartGamePacket(String serializedSudoku, Instant instant, long gameDuration) {
|
||||
this.serializedSudoku = serializedSudoku;
|
||||
this.instant = instant;
|
||||
this.gameDuration = gameDuration;
|
||||
}
|
||||
|
||||
public String getSerializedSudoku() {
|
||||
@@ -27,6 +29,10 @@ public class StartGamePacket extends Packet {
|
||||
return instant;
|
||||
}
|
||||
|
||||
public long getGameDuration() {
|
||||
return gameDuration;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void accept(PacketVisitor packetVisitor) {
|
||||
packetVisitor.visitPacket(this);
|
||||
|
||||
Reference in New Issue
Block a user