package com.letscode.lcg;

import java.util.Random;

import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration;

public class Main {
	public static void main(String[] args) {
		LwjglApplicationConfiguration cfg = new LwjglApplicationConfiguration();
		String hostname = args.length > 0 ? args[0] : "localhost";
		int port = args.length > 1 ? Integer.parseInt(args[1]) : 80;
		String nickname = args.length > 2 ? args[2] : "Player " + (new Random().nextInt(12415124));
		
		cfg.title = "Lambda Cipher Genesis - " + nickname;
		cfg.useGL20 = false;
		
		{
			cfg.width = 1024;
			cfg.height = 600;
		}
		new LwjglApplication(new LcgApp(hostname, port, nickname), cfg);
	}
}

@@ -483,16 +483,23 @@
 gs%5B2%5D : 
+null;//
 %22Player 
@@ -545,13 +545,26 @@
 %09%0A%09%09
-cfg.t
+final String gameT
 itle
@@ -588,16 +588,68 @@
  Genesis
+%22;%0A%09%09%0A%09%09cfg.title = nickname != null ? gameTitle + %22
  - %22 + n
@@ -655,16 +655,28 @@
 nickname
+ : gameTitle
 ;%0A%09%09cfg.
@@ -698,16 +698,8 @@
 ;%0A%09%09
-%0A%09%09%7B%0A%09%09%09
 cfg.
@@ -712,17 +712,16 @@
 = 1024;%0A
-%09
 %09%09cfg.he
@@ -736,11 +736,8 @@
 00;%0A
-%09%09%7D
 %0A%09%09n

Fix desktop version for crash in situation when no parameters are given.