James McCool commited on
Commit
8912250
·
1 Parent(s): 67bd128

Refactor player count logic in app.py to enhance clarity

Browse files

Updated the condition for checking available player slots by replacing the hardcoded value with the variable 'max_players'. This change improves code readability and ensures consistency in player limit handling.

Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -1150,7 +1150,7 @@ with tab4:
1150
  col1, col3 = st.columns([2, 3])
1151
 
1152
  with col1:
1153
- if (10 - len(filled_lineup)) > 0:
1154
  st.markdown(f"""
1155
  <div style='text-align: left; vertical-align: top; margin-top: 0; padding-top: 0;''>
1156
  <b>💰 Per Player:</b> ${round((max_salary - total_salary) / (max_players - len(filled_lineup)), 0)} &nbsp;
 
1150
  col1, col3 = st.columns([2, 3])
1151
 
1152
  with col1:
1153
+ if (max_players - len(filled_lineup)) > 0:
1154
  st.markdown(f"""
1155
  <div style='text-align: left; vertical-align: top; margin-top: 0; padding-top: 0;''>
1156
  <b>💰 Per Player:</b> ${round((max_salary - total_salary) / (max_players - len(filled_lineup)), 0)} &nbsp;