File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -61,19 +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 \n " ) if segment .strip ()
66- ]
67- if not segments :
64+ lines = [line .strip () for line in feedback .split ("\n " ) if line .strip ()]
65+ if len (lines ) < 2 :
6866 return (0 , 0 )
6967
70- latest_segment = segments [- 1 ]
71- lines = [line .strip () for line in latest_segment .splitlines () if line .strip ()]
72- latest_line = lines [- 1 ] if lines else latest_segment
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 )
7374
74- green_count = latest_line .count ("G" )
75- yellow_count = latest_line .count ("Y" )
76- return (green_count , yellow_count )
75+ return (0 , 0 )
7776
7877
7978class _WordleRewardProvider :
You can’t perform that action at this time.
0 commit comments