package network.protocol.packets;

import java.time.Instant;

import network.protocol.Packet;
import network.protocol.PacketVisitor;
import network.protocol.Packets;

public class StartGamePacket extends Packet {

	static private final long serialVersionUID = Packets.StartGame.ordinal();

	private final String serializedSudoku;
	// used to resume game
	private final Instant instant;
	private final long gameDuration;

	public StartGamePacket(String serializedSudoku, Instant instant, long gameDuration) {
		this.serializedSudoku = serializedSudoku;
		this.instant = instant;
		this.gameDuration = gameDuration;
	}

	public String getSerializedSudoku() {
		return serializedSudoku;
	}

	public Instant getInstant() {
		return instant;
	}

	public long getGameDuration() {
		return gameDuration;
	}

	@Override
	public void accept(PacketVisitor packetVisitor) {
		packetVisitor.visitPacket(this);
	}

}
