@@ -19,7 +19,7 @@ var mapWords map[string]bool
1919func checkWord (word string ) (bool , error ) {
2020 for {
2121 if (wordCount % 1000 ) == 0 {
22- fmt .Printf ("processed %d words . Currently processing %s\r " , wordCount , word )
22+ fmt .Printf ("processed %d words . Currently processing %s . %c is the %d letter \r " , wordCount , word , word [ 0 ], ( word [ 0 ] - 'A' ) + 1 )
2323 }
2424 wordCount ++
2525
@@ -76,7 +76,7 @@ func check(str string, present []chrPresent) {
7676 }
7777 }
7878 if ok , err := checkWord (str ); ok && err == nil {
79- fmt .Printf ("\n \n %sis a valid Wordle word\n \n " , str )
79+ fmt .Printf ("\n %s is a valid Wordle word\n " , str )
8080 }
8181}
8282
@@ -85,17 +85,14 @@ type chrPresent map[int8]bool
8585func main () {
8686 mapWords = make (map [string ]bool )
8787 chrMapPos := make (map [int ]byte )
88- chrMapPos [0 ] = 'A '
89-
90- chrsNotPresent := []byte ("EUIDM " )
88+ chrMapPos [1 ] = 'I '
89+ chrMapPos [ 3 ] = 'A'
90+ chrsNotPresent := []byte ("EUPDLCVNM " )
9191
9292 notValid := make ([]chrPresent , WORD_LENGTH )
93- oMap := make (chrPresent )
94- oMap ['O' ] = true
95- notValid [2 ] = oMap
96- rMap := make (chrPresent )
97- rMap ['R' ] = true
98- notValid [1 ] = rMap
93+ mMap := make (chrPresent )
94+ mMap ['S' ] = true
95+ notValid [3 ] = mMap
9996 slate := []byte {}
10097 var gen func (int , []byte )
10198 gen = func (pos int , slate []byte ) {
0 commit comments