This commit is contained in:
@@ -12,6 +12,8 @@ import network.protocol.packets.KeepAlivePacket;
|
||||
import network.protocol.packets.LoginPacket;
|
||||
import network.protocol.packets.PlayerJoinPacket;
|
||||
import network.protocol.packets.PlayerLeavePacket;
|
||||
import network.protocol.packets.StartGamePacket;
|
||||
import sudoku.io.SudokuSerializer;
|
||||
|
||||
public class ClientConnexion extends Connexion {
|
||||
|
||||
@@ -65,4 +67,10 @@ public class ClientConnexion extends Connexion {
|
||||
this.client.getGame().removePlayer(packet.getPlayer());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visitPacket(StartGamePacket packet) {
|
||||
this.client.getGame().startGame(SudokuSerializer.deserializeSudoku(packet.getSerializedSudoku()));
|
||||
this.client.onGameStarted.emit();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user