@SuppressWarnings("deprecation")
	public Client(String playerName, String url, int port) throws RemoteException {
		UnicastRemoteObject.exportObject(this, 0);
		
		this.players = new ConcurrentHashMap<>();
		this.playerName = playerName;
		
		if (System.getSecurityManager() == null) {
			System.setSecurityManager(new RMISecurityManager());
		}

		EventQueue.invokeLater(new Runnable() {
			@Override
			public void run() {
				try {
					// It *should* be safe to initialize the display at an
					// unknow point in the future. As it is an eventQUEUE,
					// and I queue all interactions
					// with display, I see no Problem.
					Client.this.display = new Display();
					Client.this.display.setVisible(true);
					Client.this.display.client = Client.this;
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
		
		try {
			
			this.server = (IGameServer) Naming.lookup("rmi://" + url + ":" + port + "/" + "Server");
			
			this.server.login(playerName, this);
			Object[][] players = this.server.getPlayers();
			
			for (Object[] objects : players) {
				if (objects[0] instanceof String && objects[1] instanceof Integer) {
					this.players.put((String) objects[0], (Integer) objects[1]);
				} else {
					throw new IllegalArgumentException("Received invalid connected player, received entry was: Player=" + objects[0] + ", Score=" + objects[1]);
				}
			}
		} catch (Exception e) {
			System.out.println("Client failed, caught exception " + e.getMessage());
			e.printStackTrace();
		}
	}