Updated 'LobbyState' class.
Updated the 'LobbyState' class by sending the 'ServerStartGameMessage' with a 'Board' object.
This commit is contained in:
		@@ -125,7 +125,7 @@ public void received(LobbyReadyMessage msg, int from) {
 | 
			
		||||
        this.logic.getServerSender().broadcast(new UpdateReadyMessage(from, true));
 | 
			
		||||
        if (this.logic.getGame().areAllReady()) {
 | 
			
		||||
            this.initializeGame();
 | 
			
		||||
            this.logic.getServerSender().broadcast(new ServerStartGameMessage());
 | 
			
		||||
            this.logic.getServerSender().broadcast(new ServerStartGameMessage(this.logic.getGame().getBoard()));
 | 
			
		||||
            this.logic.setCurrentState(this.logic.getGameState());
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
@@ -171,7 +171,7 @@ public void received(LeaveGameMessage msg, int from) {
 | 
			
		||||
    public void received(StartGameMessage msg, int from) {
 | 
			
		||||
        if (msg.isForceStartGame() || this.logic.getGame().areAllReady()) {
 | 
			
		||||
            this.initializeGame();
 | 
			
		||||
            this.logic.getServerSender().broadcast(new ServerStartGameMessage());
 | 
			
		||||
            this.logic.getServerSender().broadcast(new ServerStartGameMessage(this.logic.getGame().getBoard()));
 | 
			
		||||
            this.logic.setCurrentState(this.logic.getGameState());
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user