package network.protocol.packets;

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

public class ChangeCellPacket extends Packet {

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

	private final int sudokuIndex;
	private final int cellIndex;
	private final int newValue;

	public ChangeCellPacket(int sudokuIndex, int cellIndex, int newValue) {
		this.sudokuIndex = sudokuIndex;
		this.cellIndex = cellIndex;
		this.newValue = newValue;
	}

	public int getSudokuIndex() {
		return sudokuIndex;
	}

	public int getCellIndex() {
		return cellIndex;
	}

	public int getNewValue() {
		return newValue;
	}

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

}
