public NetworkConnectionError initGame(string ip, int pPort)
    {
        print ("in initGame");
        if (isServer) {

            Network.InitializeServer (32, port);
            print ("in isServer----");

            mapGen = gameObject.GetComponent<MapGenerator> ();

            for ( int i = 0; i<2; i++)
            {
                mapGen.initMap (i);
            }
            return NetworkConnectionError.NoError;
        } else {
            return Network.Connect (ip, pPort);
        }
    }