//Returns the same server instance every time
 public static ServerCommunicationManager getUniqueInstance()
 {
     if (uniqueInstance == null)
     {
         uniqueInstance = new ServerCommunicationManager();
     }
     return(uniqueInstance);
 }
        // \define Initial the agent functionalities -------------------- MessageParser not implemented ...
        static bool init()
        {
            logMessage = new StreamWriter("message.txt");
            //logMessage.Close();

            // Initialize the agent's connection
            Console.WriteLine("'" + teamName + "' connecting to " + hostName + ":" + port + "...");
            serverCommunicationManager = ServerCommunicationManager.getUniqueInstance();

            if (!serverCommunicationManager.connect(hostName, port))
            {
                return(false);
            }

            Console.WriteLine("Done.\n");

            // Initialize the command's creator
            commandCreater = CommandCreater.getUniqueInstance();

            // Initialize the world model
            worldModel = WorldModel.getUniqueInstance();

            GameConfiguration.getUniqueInstance().init();

            sendMessage(GameConfiguration.getRSGPath());
            worldModel.setSelfNumber(unum);
            worldModel.setTeamName(teamName);

            // Receive the first messages from the simulator and extract the the primary information
            // to update the world model
            string strMessage = "";
            string firstChar  = strMessage;

            strMessage = readMessage();
            MessageParser parser = new MessageParser();

            parser.parseMessage(strMessage);
            //GameConfiguration.getUniqueInstance().init();

            // Send the first messages to the simulator to spawn the agent in simulator
            commandCreater.init(unum, teamName);
            sendMessage(commandCreater.getPreparedCommand());
            commandCreater.reset();
            strMessage = firstChar;
            strMessage = readMessage();
            parser.parseMessage(strMessage);
            commandCreater.beam(-8, 0, 0);
            sendMessage(commandCreater.getPreparedCommand());

            return(true);
        }