Skip to content

SuperNoobCraft/COMP2113-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

145 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wordle

Team Members (Group 67)

Game Description

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

Modes Available

  • 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)

Special Features

  • 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"

Coding Requirements Completion

Generation of Random events

  • The secret word that the player needs to guess is random every time.

Data structures for storing data

  • struct was used to store guess results
    struct GuessResult {
        string guess;
        vector<int> states;
    };
  • vectorwere used in:
    • vector<string>* stores pointer to wordlist retrieved from words4.txt and words5.txt
    • vector<GuessResult> stores the results of each guess
    • vector<int> stores the state (gray/white/yellow/green represented as -1/0/1/2) of 26 letters

Dynamic memory management

  • The wordlists words4.txt and words5.txt are stored as vector<string> that are dynamically allocated

File input/output

  • words4.txt and words5.txt were read with FileIO to obtain the word list
  • leaderboard_four_mode.txt, leaderboard_hard_mode.txt, leaderboard_multiplayer.txt, leaderboard_quordle, and leaderboard_standard.txt were used to store leaderboard data, read when accessing leaderboard and modified when a new entry is added to the leaderboards.

Program codes in multiple files

  • The program is split into multiple files, including:
    • main.cpp holds main program, controls main menu
    • wordle.h and wordle.cpp contains essential functions for wordle games
    • standard_mode.h and standard_mode.cpp contains the standard wordle gamemode loop
    • hard_mode.h and hard_mode.cpp contains the hard wordle gamemode loop
    • four_mode.h and four_mode.cpp contains the 4-letter mode gameplay loop
    • multiplayer.h and multiplayer.cpp contains the multiplayer gameplay loop
    • infinite_mode.h and infinite_mode.cpp contains the infinite mode gameplay loop
    • quordle.h and quordle.cpp contains the quordle gamemode loop
    • leaderboard.h and leaderboard.cpp contains leaderboard fileIO logic
    • Makefile for compile instructions

Multiple Difficulty Levels

  • 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

Non-standard C++ Libraries

  • No non-standard libraries were used. Standard libraries only.

Compilation/Execution Instructions

To compile and run:

  • 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.cpp and other source codes would be in the directory)
    • Then, in the terminal run make clean to clean up unnecessary compiled objects, make to recompile, then ./wordle to execute the program

In-game:

Follow Instructions in game for input, only a keyboard is needed.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors