- Jim Tze Lau (UID: 3036404989)
- Lam Ian Tong (UID: 3036445385)
- Wan Shiu Kei (UID: 3036393726)
- Tam Hoi Wing (UID: 3036344426)
- Lam Ngai Wang (UID: 3036404070)
- Lo Ching Ching (UID: 3036401858)
It's Wordle, guess a 5-letter English word within 6 attempts, each attempt gives you feedback on each letter, whether it is correct, used but incorrect placement, or not used.
Play the official Wordle at https://www.nytimes.com/games/wordle/index.html
- Standard Mode (The classic Wordle gameplay, 5 letters, 6 guesses)
- 4-letter Mode (Wordle but you guess 4 letter words, more challenging due to the fewer information you have)
- Hard Mode (The official Wordle hard mode, you must reuse any correctly guessed letters in subsequent guesses)
- Infinite Mode (Infinite rounds of the standard Wordle, 6 attempts for each word, but you can't use words you've used in previous rounds)
- Multiplayer Mode (Compete with a friend!)
- Quordle Mode (Play 4 standard wordle games at once, solve within 9 guesses)
- Leaderboard system, you can save your name and compare your score with other players
- For hard mode, you can quit the game by typing commands such as "exit" or "quit"
- The secret word that the player needs to guess is random every time.
structwas used to store guess resultsstruct GuessResult { string guess; vector<int> states; };
vectorwere used in:vector<string>*stores pointer to wordlist retrieved fromwords4.txtandwords5.txtvector<GuessResult>stores the results of each guessvector<int>stores the state (gray/white/yellow/green represented as -1/0/1/2) of 26 letters
- The wordlists
words4.txtandwords5.txtare stored asvector<string>that are dynamically allocated
words4.txtandwords5.txtwere read with FileIO to obtain the word listleaderboard_four_mode.txt,leaderboard_hard_mode.txt,leaderboard_multiplayer.txt,leaderboard_quordle, andleaderboard_standard.txtwere used to store leaderboard data, read when accessing leaderboard and modified when a new entry is added to the leaderboards.
- The program is split into multiple files, including:
main.cppholds main program, controls main menuwordle.handwordle.cppcontains essential functions for wordle gamesstandard_mode.handstandard_mode.cppcontains the standard wordle gamemode loophard_mode.handhard_mode.cppcontains the hard wordle gamemode loopfour_mode.handfour_mode.cppcontains the 4-letter mode gameplay loopmultiplayer.handmultiplayer.cppcontains the multiplayer gameplay loopinfinite_mode.handinfinite_mode.cppcontains the infinite mode gameplay loopquordle.handquordle.cppcontains the quordle gamemode loopleaderboard.handleaderboard.cppcontains leaderboard fileIO logicMakefilefor compile instructions
- There are multiple modes that are of different difficulty
- Standard Mode and 4-letter Mode should be similarly easy
- Hard mode is a harder version of Standard Mode
- Infinite mode is a great test of skill as it gets progressively harder and harder as players try to guess as many words as possible
- Quordle is the most difficult level, needing great resource management skill, given that you have to guess 4 words in 9 guesses only
- No non-standard libraries were used. Standard libraries only.
- You can directly install the released executable here
- If you choose to directly install the released executable, please also install words4.txt and words5.txt and put it in the same folder as the executable to ensure the game is able to access the word lists.
- Alternatively, if you wish to compile on your own, you can download the code as a ZIP file and compile it yourself
- To compile it yourself, set the directory of the terminal to be the extracted zip folder (
main.cppand other source codes would be in the directory) - Then, in the terminal run
make cleanto clean up unnecessary compiled objects,maketo recompile, then./wordleto execute the program
- To compile it yourself, set the directory of the terminal to be the extracted zip folder (
Follow Instructions in game for input, only a keyboard is needed.