BattleShip.FileManager.JoinGame C# (CSharp) Метод

JoinGame() приватный Метод

Join a curent game
private JoinGame ( string path, string filename, string pseudo ) : bool
path string path where is the file
filename string filename with extension
pseudo string pseudo of joining player
Результат bool
        private bool JoinGame(string path, string filename, string pseudo)
        {
            this.path = path;
            this.fullFileName = filename;
            bool returnVal;
            returnVal = true;
            if (fileIsLocked())
            {
                returnVal = false;
            }
            else
            {
                ChangeFileStatus(true);
                string[] players = ReadPlayers();
                if (players[1] != "")
                {
                    writePseudo("P2", pseudo);
                    XmlDocument xmlDoc = new XmlDocument();
                    xmlDoc.Load(this.fullFileName);
                }
                else
                {
                    returnVal = false;
                }
                ChangeFileStatus(false);
            }


            return returnVal;
        }
        #endregion