https://gitlab.com/christosangel/wordy

Wordy is a word spelling puzzle.

You have 6 guesses to find out the secret 5-letter word.

https://gitlab.com/christosangel/wordy/-/raw/main/png/wordy.gif


  • If a letter appears green, that means that this letter exists in the secret word, and is in the right position.

  • If a letter appears yellow, that means that this letter exists in the secret word, but is in NOT the right position.

  • If a letter appears red, that means that this letter does NOT appear in the secret word AT ALL.


The user can select to play with HARD MODE enabled, just to make things more challenging.

This is done be selecting to Configure (c) in the main menu.

Alternatively, it can be toggled by the 4 option with the keyboard or mouse, but only before the first word is submitted.

Playing with Hard Mode enabled means the following for the next guesses:

  1. Letters proven green must remain in that exact position in the next guesses.

  2. Accordingly, yellow letters must be included in the next guesses,until placed correctly.


Full mouse support has been introduced in the updated version of the game. That means that the player can select menu options and enter words during the game using the mouse as well as the keyboard.


Depending whether the player toggles the Legend, Info or Mouse Support, the game layout changes accordingly:

https://gitlab.com/christosangel/wordy/-/raw/main/png/layouts.gif


No A.I. was used during the development of this project.


Feedback will be appreciated, enjoy!

  • Rynux@lemmy.ml
    link
    fedilink
    arrow-up
    4
    ·
    11 hours ago

    That looks cool. I like it. I always wanted some terminal foss wordle clone.

  • Arthur Besse@lemmy.mlM
    link
    fedilink
    English
    arrow-up
    12
    ·
    edit-2
    13 hours ago

    wow, very nice work!

    I have a few minor bugs to report. (despite the code being (impressively) concise enough that after briefly skimming it i was pretty confident that it wasn’t malicious, i ran it in a fresh minimal container anyway… which explains how i encountered the first three of these.)

    1. if /usr/share/dict/words is not present, it does not report any problem and simply says “invalid word” for every guess entered. (it should give an error and refuse to start in this case.)
    2. if bc is not installed, the stats screen says ./wordy.sh: line 275: bc: command not found which could be handled more gracefully. (same for if column is not installed on the help screen.)
    3. typing “c” to edit the config fails silently if the preferred editor is not available. this also could print an error explaining what is missing instead.
    4. using my laptop’s trackpad, every mouse click is registering twice. however, using its touchscreen it actually works. (i investigated this a little and it seems that my terminal emulator is sending the same mousedown and mouseup events for both the touchscreen and trackpad; i guess the difference is that there is a brief pause between them when I use the trackpad?)
    5. there are several typos in the comments in the config file

    one more thought: “hard mode” doesn’t really make sense to me; preventing accidental definitely-incorrect guesses ultimately makes it easier, doesn’t it?

    thanks again for sharing this!

    edit: in case anyone else wants to run this in a debian:trixie container, an apt install line you can use to get /usr/share/dict/words, bc, and column is:

    apt install --no-install-recommends wamerican bc bsdextrautils
    

    (and to create the container, after cd’ing into the git checkout, i’m running podman run -v $(pwd):$(pwd) -w $(pwd) --rm -it debian:trixie bash)

    • f314@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      39 minutes ago

      one more thought: “hard mode” doesn’t really make sense to me; preventing accidental definitely-incorrect guesses ultimately makes it easier, doesn’t it?

      You can eliminate more letters by typing a completely different word with only unused letters. I’ve always preferred hard mode, though.

    • christos@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      3
      ·
      10 hours ago

      First of all, your feedback is really appreciated.

      • As far as the word list is concerned, it is mentioned as the sole dependency in the documentation.

      • I assumed that since I have never needed to install commands like bc or column, or nano for that matter, all other systems have these already installed, evidently that is not the case, thx for bringing this up.

      • Mouse compatibility issues mostly had to do with kitty or mac systems, where mouse printed output differed from xterm terminals, and that I took care of. I don’t know the details of your system and why trackpad fails to work in yours. Perhaps give it a go with another terminal, see what happens.

      • Hard mode is really a matter of preference, some people prefer it, some people don’t, it is better to have the toggle option that not.

      Again, I appreciate the input and the nice words, I hope you enjoy this game.

    • psycotica0@lemmy.ca
      link
      fedilink
      arrow-up
      5
      ·
      13 hours ago

      As an upstream hard-moder myself, the challenge isn’t that it disallows incorrect guesses.

      The challenge is that it doesn’t allow one to find extra information without a plausible guess.

      So if I already knew there was an “S” and not an “A”, I couldn’t guess “BREAK” to smoke out whether or not there are any Rs, Es, or Bs, for example.

      Yes, true, you know that “break” could never be the word, but you could potentially converge faster if you could eliminate some common letters.

      In hard mode you have to come up with something that fits the information you have in order to gain more information. This is especially painful bordering on “unfun” when you have something like “⬛IGHT”. There are a bunch of options for what you might guess, but you have no choice but to just go through them. Someone not playing hard mode could instead be more strategic in picking a word that doesn’t end “ight” but contains several of the potential first letters and narrow it down in one guess.

  • tomenzgg@midwest.social
    link
    fedilink
    English
    arrow-up
    7
    ·
    edit-2
    12 hours ago

    I was going to make a joke of “I only play Wordle in Emacs, as God intended” but, as others have noted, it really is super impressive as to be a waste not to acknowledge that, on its own.

    As a fellow Bash lover, very cool!

    • christos@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      10 hours ago

      Thanks so much, I hope you enjoy the game. I appreciate it, these are heavy words coming from an Emacs afficionado (sorry but I could not help recalling this video)

  • prism@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    41
    ·
    20 hours ago

    Upvoted purely for not using AI. Congrats on using your brain! This might seem sarcastic but I really mean it.

  • communism@lemmy.ml
    link
    fedilink
    arrow-up
    14
    ·
    17 hours ago

    Impressive to do it in Bash. How come you chose Bash instead of a programming language that would make this sort of thing easier? Learning exercise?

    • christos@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      15
      ·
      17 hours ago

      Well, what can I say, I like Bash. This project started as a one-liner, and improved from there. I guess it could be written in Python, or in C if you are adventurous enough, but it seemed way easier to not invent the wheel all over, and use the magic powers of grep.

      • confusedpuppy@lemmy.dbzer0.com
        link
        fedilink
        arrow-up
        7
        ·
        15 hours ago

        I enjoy writing POSIX scripts and it gets a lot of reactions. Sure I could use a higher level language but I love the oddities and strangeness of POSIX shell.

        I definitely have more fun working with a limited canvas so I get why people would use bash.

        Plus all anyone needs to get started is a text editor. No list of dependencies or compilers, just get in and go :)

    • eldavi@lemmy.ml
      link
      fedilink
      English
      arrow-up
      5
      arrow-down
      1
      ·
      16 hours ago

      funny you say this since i went into java, ruby and python because bash made it difficult.

      fast forward 20 years and i’m working as a devops engineer and absolutely 👏 every 👏 single 👏 shop is absolutely DOMINATED by bash – yes there’s plenty of python et. al; but bash is clearly doing the heavy lifting. :p

  • eldyaitch@lemmy.zip
    link
    fedilink
    arrow-up
    10
    ·
    21 hours ago

    I don’t know BASH beyond some simple scripting, but I didn’t know a TUI could be written in BASH! Am I understanding that correctly?