Skip to content

Commit

Permalink
Remove answer reveal and document build:
Browse files Browse the repository at this point in the history
  • Loading branch information
kbuffardi committed Feb 20, 2022
1 parent 11b4e24 commit 3c4d001
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 3 deletions.
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.PHONY: clean

all:
g++ -std=c++11 -Wfatal-errors main.cpp dictionary.cpp -o wordler

clean:
rm -rf *.o wordler
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,19 @@
# Wordler
# Wordler

This is a command line word guessing game.

## Getting Started

To build the project, use the following command:

```
make
```

Then play the game:

```
./wordler
```

The game will randomly-select a 5-letter word and you have unlimited guesses to get the word right. Each time you guess, if you have a letter that matches the same location as it is in the secret word, it will be revealed to you. However, any letter that does *not* match the secret word's letter at the same location will be displayed as `_`. Good luck!
4 changes: 2 additions & 2 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ int main(){
int guesses = 0;

secret = word_list.select_word();
std::cout << secret << std::endl;
// REVEAL ANSWER: std::cout << secret << std::endl;
std::cout << "Welcome to Wordler -- a game that totally isn't simplified Wordle\n";
std::cout << "Guess your five-letter word:\n_____\n";

Expand All @@ -37,7 +37,7 @@ int main(){
std::cout << "Congrats, you got it in " << guesses << " guesses!\n";
}
else{
std::cout << hint << std::endl << "Guess again: ";
std::cout << hint << " Guess again: ";
}
}while( hint != secret );

Expand Down

0 comments on commit 3c4d001

Please sign in to comment.