开源CLI代码审查工作流:本地LLM+Git深度集成
2026/10/19 3:25:09
在猜单词游戏中,程序会隐藏一个单词,玩家需要逐次猜测字母。每次猜测后,程序会提示该字母是否在单词中,并显示当前已猜出的部分单词。例如:
guessed: eioum, steps from gallows: 5, word so far: -e--e--iou--- Guess a letter: n * Great! The letter "n" appears in the word! guessed: eioumn, steps from gallows: 5, word so far: -en-en-iou---当玩家猜出所有字母或猜错次数达到上限时,游戏结束。如果玩家输入quit,则退出游戏。
sed|sort实现。