需求
“A Python Wordle round: enter a five-letter guess, reject an invalid length or word not in the dictionary, evaluate a valid guess against the target, end on a match, otherwise repeat while attempts remain and end in game over when none remain.”
接著試試Add a hint after each wrong guess.Change the word length to six letters.
這張圖裡有什麼
看懂背後的決策。
01
Check if the guess has exactly 5 letters.
02
Check if the guess exists in the game's dictionary of valid words.
This flowchart can be used as a reference for implementing the input validation component in any word-guessing game similar to Wordle.