Derek-R-S/Light-Reflective-Mirror

View on GitHub
ServerProject-DONT-IMPORT-INTO-UNITY/LRM/RelayHandler/RelayHandlerRoomMethods.cs

Summary

Maintainability
B
6 hrs
Test Coverage

Method JoinRoom has 52 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        private void JoinRoom(int clientId, string serverId, bool canDirectConnect, string localIP)
        {
            LeaveRoom(clientId);

            if (_cachedRooms.ContainsKey(serverId))

    Method LeaveRoom has 44 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            private void LeaveRoom(int clientId, int requiredHostId = -1)
            {
                for (int i = 0; i < rooms.Count; i++)
                {
                    // if host left

      Method CreateRoom has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              private void CreateRoom(int clientId, int maxPlayers, string serverName, bool isPublic, string serverData, bool useDirectConnect, string hostLocalIP, bool useNatPunch, int port)
              {
                  LeaveRoom(clientId);
                  Program.instance.NATConnections.TryGetValue(clientId, out IPEndPoint hostIP);
      
      

        Method CreateRoom has 9 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                private void CreateRoom(int clientId, int maxPlayers, string serverName, bool isPublic, string serverData, bool useDirectConnect, string hostLocalIP, bool useNatPunch, int port)

          There are no issues that match your filters.

          Category
          Status