original_docstring: 
          Register guess and update game state if necessary.
  
          Args:
              guess_word: Word guessed by user.
          Raises:
              IllegalGuessError in the event of an illegal word.
          
docstring: Register guess and update game state if necessary.
  Args:
  guess_word: Word guessed by user.
  Raises:
  IllegalGuessError in the event of an illegal word.
docstring_tokens: Register guess and update game state if necessary . Args : guess_word : Word guessed by user . Raises : IllegalGuessError in the event of an illegal word .
code: def _register_guess(self, guess_word: "GuessWord") -> bool:
          """
          Register guess and update game state if necessary.
  
          Args:
              guess_word: Word guessed by user.
          Raises:
              IllegalGuessError in the event of an illegal word.
          """
  
          if not guess_word.is_valid(self._word_len):
              raise IllegalGuessError(
                  f"{guess_word} is not valid word of len {self._word_len}"
              )
  
          if not guess_word.in_dictionary(self._dictionary):
              raise IllegalGuessError(f"{guess_word} is not in the dictionary")
  
          # black, yellow, green match outcome given guess
          comparison: List["MatchState"] = guess_word.compare_to(self._target_word)
          self._guesses.append(comparison)
  
          for ind, match in enumerate(comparison):
              self._handle_match(match, ind)
  
          # if all characters matched, that's the end of the game
          return self.success
code_tokens: def _register_guess ( self , guess_word : "GuessWord" ) -> bool : if not guess_word . is_valid ( self . _word_len ) : raise IllegalGuessError ( f"{guess_word} is not valid word of len {self._word_len}" ) if not guess_word . in_dictionary ( self . _dictionary ) : raise IllegalGuessError ( f"{guess_word} is not in the dictionary" ) comparison : List [ "MatchState" ] = guess_word . compare_to ( self . _target_word ) self . _guesses . append ( comparison ) for ind , match in enumerate ( comparison ) : self . _handle_match ( match , ind ) return self . success
short_docstring: Register guess and update game state if necessary.
short_docstring_tokens: Register guess and update game state if necessary .
comment: """
          Register guess and update game state if necessary.
  
          Args:
              guess_word: Word guessed by user.
          Raises:
              IllegalGuessError in the event of an illegal word.
          """$SEP$# black, yellow, green match outcome given guess$SEP$# if all characters matched, that's the end of the game