private void AddPlayer(string _inputBase) { JoinPanel openSlot = GetOpenSlot(); if (openSlot != null) { openSlot.Join(_inputBase); } }
private JoinPanel GetOpenSlot() { for (int i = 0; i < joinPanels.Length; i++) { JoinPanel jp = joinPanels[i]; if (!jp.IsJoined) { return(jp); } } // No slots open return(null); }