public void initRMI(String address){
        // Set sercurity manager
        System.setSecurityManager(new InsecureSecurityManager());

        //Set my server
        try {
            this.localPlayer = new TTTServerImpl(this);
        } catch (RemoteException e) {
            e.printStackTrace();
        }

        //Set remote player's server
        String url = "rmi://"+ address + "/TTTServer";
        try {
            this.remotePlayer = (TTTServer) Naming.lookup(url);
        } catch (NotBoundException e) {
            e.printStackTrace();
        } catch (MalformedURLException e) {
            e.printStackTrace();
        } catch (RemoteException e) {
            e.printStackTrace();
        }

        //Remote player not found, I am server
        if(remotePlayer == null){
            myTurn = true;
            try {
                //Let players wih my url find me.
                Naming.rebind(url, localPlayer);
            } catch (RemoteException e) {
                e.printStackTrace();
            } catch (MalformedURLException e) {
                e.printStackTrace();
            }
        }
        //Remote player found
        else{
            try {
                //Make remote player connect to me.
                remotePlayer.connect(url,'X',localPlayer);
                myTurn = false; //He starts.
                this.setStatusMessage("Opponent connected. His turn");
            } catch (RemoteException e) {
                e.printStackTrace();
            }

        }

    }