PDF Detail

description.pdf

下方展示该 PDF 的摘要和完整提取文本。

摘要预览

EIE111 Object-Oriented Programming Course Project: The Wordle Game Perhaps you have heard about the Wordle game: https://www.nytimes.com/games/wordle/index.html The goal is to guess a 5-letter word within at most 6 trials. In this game, the program randomly picks a word as the answer, and the user can input their guess. After submission, the program should check this input and return the result as color text. Each letter is shown in one of the three colors: ➢ Green: The letter appears in the answer and is in the correct place. ➢ Yellow: The letter appears in the answer, but it is in the wrong place. ➢ Gray: The letter does not appear in the answer. The game will finish if the guess is correct or all the 6 trials have been used. In the supplementary files, you will find a list of possible answers and a list of possible guesses. For each run of the program, an answer word is randomly chosen from the first list. Then the user can start the guess. If the user’s input falls in one of these two lists, the program should check its correctness; otherwise, you need to inform the user that this is not a valid word. I provide you with a sample executable file that con tains the basic features of Wordle (note: run it on a windows system): This game could be extended to other languages. Here is a Chinese version: https://xiaoce.fun/xunhualing The file “poem.txt” is a sample dataset of Chinese poems. You may consider choosing a larger dataset: https://github.com/open-chinese/poetry-collection You need to create a console application including these functions and features: 1. Guessing a 5-letter English word. 2. Guessing a sentence of 10 Chinese characters. 3. Guessing a sentence of 14 Chinese characters. 4. Showing characters in different colors according to the…

全文内容

description.pdf

EIE111 Object-Oriented Programming 
 
Course Project: The Wordle Game 
 
Perhaps you have heard about the Wordle game:  
https://www.nytimes.com/games/wordle/index.html 
 The goal is to guess a 5-letter word within at most 6 trials.  
 
 In this game, the program randomly picks a word as the answer, and the user can 
input their guess. After submission, the program should check this input and return the 
result as color text. Each letter is shown in one of the three colors: 
➢ Green: The letter appears in the answer and is in the correct place. 
➢ Yellow: The letter appears in the answer, but it is in the wrong place. 
➢ Gray: The letter does not appear in the answer. 
The game will finish if the guess is correct or all the 6 trials have been used. 
 In the supplementary files, you will find a list of possible answers and a list of possible 
guesses. For each run of the program, an answer word is randomly chosen from the first 
list. Then the user can start the guess. If the user’s input falls in one of these two lists, the 
program should check its correctness; otherwise, you need to inform the user that this is 
not a valid word.  I provide you with a sample executable file  that con tains the basic 
features of Wordle (note: run it on a windows system):

This game could be extended to other languages. Here is a Chinese version: 
https://xiaoce.fun/xunhualing 
 
 The file “poem.txt” is a sample dataset of Chinese poems. You may consider 
choosing a larger dataset: 
https://github.com/open-chinese/poetry-collection 
 You need to create a console application including these functions and features: 
1. Guessing a 5-letter English word. 
2. Guessing a sentence of 10 Chinese characters. 
3. Guessing a sentence of 14 Chinese characters. 
4. Showing characters in different colors according to the matching results. 
5. An algorithm to solve the puzzle automatically. 
 
Hints: 
1. You can try arbitrary tools, including LLMs, to complete this project.  
2. Learn how to change text color. The methods are different for Windows and 
MacOS. You may choose any one for your convenience.  
3. Learn how to process Chinese characters. 
4. Try to adopt C++ features and OOP strategies to make the program simpler. 
 
Submission: 
1. All the source code and data. 
2. A “report.pdf” describing your project structure, user’s guide, implemented 
features and algorithms. Please also indicate the contribution of each group 
member. 
3. A group only needs to submit one copy of your files.