File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -61,18 +61,18 @@ def extract_feedback_counts(feedback: str) -> Tuple[int, int]:
6161 if not feedback :
6262 return (0 , 0 )
6363
64- segments = [
65- segment .strip () for segment in feedback .split ("\n " ) if segment .strip ()
66- ]
67- if len (segments ) < 2 :
64+ lines = [line .strip () for line in feedback .split ("\n " ) if line .strip ()]
65+ if len (lines ) < 2 :
6866 return (0 , 0 )
6967
70- marker_line = segments [1 ]
68+ for line in lines :
69+ normalized = line .replace (" " , "" )
70+ if normalized and all (c in "GYX" for c in normalized ):
71+ green = normalized .count ("G" )
72+ yellow = normalized .count ("Y" )
73+ return (green , yellow )
7174
72- green_count = marker_line .count ("G" )
73- yellow_count = marker_line .count ("Y" )
74-
75- return (green_count , yellow_count )
75+ return (0 , 0 )
7676
7777
7878class _WordleRewardProvider :
You can’t perform that action at this time.
0 commit comments