Skip to content

Instantly share code, notes, and snippets.

The Random Wordle

From wikipedia:

Wordle is a web-based word game developed by Josh Wardle. Players have six attempts to guess a five-letter word, with feedback given for each guess in the form of colored tiles indicating when letters match or occupy the correct position. The mechanics are nearly identical to the 1955 pen-and-paper game Jotto and the US television game show Lingo. Wordle has a single daily solution, with all players attempting to guess the same word.

The Challenge

We want you to create a version of the Wordle game for terminal in Python.

Your program will pick a random word from the list of valid words and will give the user 6 attempts to guess it. To guess, your program will read from the terminal input. After each attempt, the program will print the guess, but each letter will be colored based on the Wordle rules. However, if the guess is not a word in the list, it should not count as an at

// Share code with inheritance
class Report {
constructor(name) {
this.name = name;
}
// This is abstract, each subclass must implement it
getData() {
throw new Error("Implement me");
}
@meis
meis / alb_in_docker_compose.yml
Created November 30, 2021 15:38
Example of "ALB" in docker-compose.yml
services:
alb:
image: nginx:alpine
ports:
- "8080:80"
depends_on:
- web
- api
command: |
sh -c "sh -s <<'EOF' cat > /etc/nginx/conf.d/default.conf <<'EON'
while (i >= 0 || j >= 0)
case
# no change
when i >= 0 && j >= 0 && x[i] == y[j]
i -= 1
j -= 1
# insert
when (j >= 0 && (i < 0 || c[i+1][j] >= c[i][j+1]))
curr_pos = pos + j
if (ops[0] && ops[0].insert? && ops[0].pos == curr_pos +

Keybase proof

I hereby claim:

  • I am meis on github.
  • I am meis (https://keybase.io/meis) on keybase.
  • I have a public key whose fingerprint is 1EB2 F91A C102 D309 B82F EFD8 9301 94E5 CEA7 7A38

To claim this, I am signing this object: