Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Wordle
#1
A small version of Wordle. For those not familiar with Wordle, these are the rules:

Basic Gameplay

Objective: Guess the secret five-letter word (the "Wordle") within six tries

Valid Guesses: Each guess must be a valid five-letter English word; numbers, symbols, or words of other lengths are not allowed

Submission: Type your guess (it is submitted automatically when you type the fifth letter)

Feedback System
Green Tile: The letter is in the correct position
Orange Tile: The letter is in the word but in the wrong position
Gray Tile: The letter is not in the word at all

This version has been coded so that it will only accept the 26 letters of the alphabet (other key presses are ignored with the exception of the space bar, which is only recognised once the game has finished). It uses 2 lists of 5 letter words - a complete one which includes really obscure words, many of which I was not aware of, and a smaller list of the most common words in use - there are about 15,000 and 3,000 words in each list. The target word, which you have to guess, is selected at random from the smaller list, and your guesses are checked against the more complete list.

It should be pretty simple to change the language used in this, should you wish. You will just need to source 2 similar lists of 5 letter words in your preferred language, and if your language does not use the same 26 letters that the UK language uses, amend the routine that checks which letters have been entered.


.zip   wordle.zip (Size: 751.79 KB / Downloads: 7)
Reply
#2
This sounds like fun. As I have not played this before, the description, sounds very similar to Mastermind. Colours instead of letters, black and white pegs for correct and incorrect positions. I would imagine that it would not be too difficult to configure the game based on difficulty. Easy, Medium and Hard word lists... Still sounds like fun...

First attempt...

It sounded easy... but the grey matter was sorely tested!!

You did a very nice job indeed!!  Big Grin

J

   

Ok. One minor difficulty... Unless I did not read the instruction or viewed the listing correctly... There does not appear to be a "backspace" function. On several occasions I keyed in the wrong letter but could not delete it... or is this some diablical plot to make it harder? If so, nicely done! Smile

J
Logic is the beginning of wisdom.

Live long and prosper.
Reply
#3
(07-02-2026, 08:15 PM)johnno56 Wrote: ... There does not appear to be a "backspace" function. On several occasions I keyed in the wrong letter but could not delete it... or is this some diablical plot to make it harder? If so, nicely done! Smile

Perhaps just inserted this code to support "backspace" ....

Code:
    ' Handle letter input
    if l >= 65 and l <= 90 or l >= 97 and l <= 122
        add_letter = chr(l)
        guess = guess + add_letter
        idx = guess_number * 5 + len(guess) - 1
        if idx < 30 then
            guess_grid[idx].letter = upper(add_letter)
        endif
       
    ' Handle backspace (ASCII 8)
    elseif l = 8
        if len(guess) > 0
            guess = left(guess, len(guess) - 1)
            idx = guess_number * 5 + len(guess)
            if idx < 30 then
                guess_grid[idx].letter = unset
            endif
        endif
    endif 
Reply
#4
I got lucky with my first guess, didn't quite understand the game at my second guess, stupid third guess, forgot about the O, but then I activated full scribble mode on a piece of paper and got it - first game and completed it!

It was super fun but also really hard for one that doesn't know the language well. I'll see if I can setup a Swedish version Smile Very well done, awesome!

   
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)