Used auto-reformate code.
This commit is contained in:
		@@ -1,9 +1,9 @@
 | 
			
		||||
package pp.mdga.client;
 | 
			
		||||
 | 
			
		||||
import com.jme3.app.SimpleApplication;
 | 
			
		||||
import com.jme3.system.AppSettings;
 | 
			
		||||
import com.simsilica.lemur.GuiGlobals;
 | 
			
		||||
import pp.mdga.client.acoustic.AcousticHandler;
 | 
			
		||||
import com.jme3.system.AppSettings;
 | 
			
		||||
import pp.mdga.client.dialog.JoinDialog;
 | 
			
		||||
import pp.mdga.client.view.*;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -49,7 +49,7 @@ public void exit() {
 | 
			
		||||
     * This method will be used to initialize the game and all necessary objects.
 | 
			
		||||
     */
 | 
			
		||||
    public void initializeGame() {
 | 
			
		||||
        for (Map.Entry<Integer, Player> entry: this.logic.getGame().getPlayers().entrySet()) {
 | 
			
		||||
        for (Map.Entry<Integer, Player> entry : this.logic.getGame().getPlayers().entrySet()) {
 | 
			
		||||
            this.logic.getGame().getBoard().addPlayerData(entry.getValue().getColor(), new PlayerData(entry.getValue().getColor()));
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
@@ -86,7 +86,7 @@ public void received(SelectTSKMessage msg, int from) {
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if(this.logic.getGame().getPlayerById(from).getColor() != Color.NONE) {
 | 
			
		||||
        if (this.logic.getGame().getPlayerById(from).getColor() != Color.NONE) {
 | 
			
		||||
            this.logic.getServerSender().broadcast(new UpdateTSKMessage(from, this.logic.getGame().getPlayerById(from).getColor(), false));
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
@@ -117,7 +117,7 @@ public void received(DeselectTSKMessage msg, int from) {
 | 
			
		||||
    @Override
 | 
			
		||||
    public void received(LobbyReadyMessage msg, int from) {
 | 
			
		||||
        //assign a free color
 | 
			
		||||
        if(this.logic.getGame().getPlayerById(from).getColor() == Color.NONE) {
 | 
			
		||||
        if (this.logic.getGame().getPlayerById(from).getColor() == Color.NONE) {
 | 
			
		||||
            ArrayList<Color> colors = new ArrayList<>();
 | 
			
		||||
            colors.add(Color.ARMY);
 | 
			
		||||
            colors.add(Color.AIRFORCE);
 | 
			
		||||
@@ -125,12 +125,12 @@ public void received(LobbyReadyMessage msg, int from) {
 | 
			
		||||
            colors.add(Color.CYBER);
 | 
			
		||||
 | 
			
		||||
            for (Map.Entry<Integer, Player> entry : this.logic.getGame().getPlayers().entrySet()) {
 | 
			
		||||
                if(colors.contains(entry.getValue().getColor())) {
 | 
			
		||||
                if (colors.contains(entry.getValue().getColor())) {
 | 
			
		||||
                    colors.remove(entry.getValue().getColor());
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            if(colors.size() < 1) {
 | 
			
		||||
            if (colors.size() < 1) {
 | 
			
		||||
                throw new RuntimeException("can not assign a color");
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user