@@ -111,6 +111,37 @@ def activate!
111111 update! ( is_active : true )
112112 end
113113
114+ # Check if we have priority picks for all roles
115+ def blind_pick_ready?
116+ Constants ::Player ::ROLES . all? { |role | priority_picks &.key? ( role ) }
117+ end
118+
119+ # Calculate what percentage of possible scenarios are covered
120+ def scenario_coverage
121+ return 0 if total_scenarios . zero?
122+
123+ # Simplified coverage calculation
124+ # In a real scenario, this would analyze ban combinations
125+ [ ( ( total_scenarios / 10.0 ) * 100 ) . round ( 2 ) , 100 ] . min
126+ end
127+
128+ # Check how many opponent comfort picks are banned
129+ def comfort_picks_coverage
130+ comfort = opponent_comfort_picks
131+ return 100 if comfort . empty?
132+
133+ banned = ( our_bans & comfort ) . size
134+ ( ( banned . to_f / comfort . size ) * 100 ) . round ( 2 )
135+ end
136+
137+ # Suggest additional bans based on opponent comfort picks
138+ def suggest_bans
139+ comfort = opponent_comfort_picks
140+ already_banned = our_bans || [ ]
141+
142+ ( comfort - already_banned ) . first ( 5 )
143+ end
144+
114145 private
115146
116147 def validate_bans_structure
@@ -165,37 +196,6 @@ def normalize_champion_names
165196 self . priority_picks = priority_picks . transform_values ( &:strip )
166197 end
167198
168- # Calculate what percentage of possible scenarios are covered
169- def scenario_coverage
170- return 0 if total_scenarios . zero?
171-
172- # Simplified coverage calculation
173- # In a real scenario, this would analyze ban combinations
174- [ ( ( total_scenarios / 10.0 ) * 100 ) . round ( 2 ) , 100 ] . min
175- end
176-
177- # Check how many opponent comfort picks are banned
178- def comfort_picks_coverage
179- comfort = opponent_comfort_picks
180- return 100 if comfort . empty?
181-
182- banned = ( our_bans & comfort ) . size
183- ( ( banned . to_f / comfort . size ) * 100 ) . round ( 2 )
184- end
185-
186- # Suggest additional bans based on opponent comfort picks
187- def suggest_bans
188- comfort = opponent_comfort_picks
189- already_banned = our_bans || [ ]
190-
191- ( comfort - already_banned ) . first ( 5 )
192- end
193-
194- # Check if we have priority picks for all roles
195- def blind_pick_ready?
196- Constants ::Player ::ROLES . all? { |role | priority_picks &.key? ( role ) }
197- end
198-
199199 def log_audit_trail
200200 AuditLog . create! (
201201 organization : organization ,
0 commit comments