Skip to content
Repl icon
WORDLE 2K
Frozones
Frozones
Made with
C++ (Legacy)
C++ (Legacy)
Published on Apr 5, 2022
#cool#fun#game#cpp#wordle

WORDLE 2K

Word guessing game

2K plays

Based off of WORDLE by Josh Wardle

https://www.powerlanguage.co.uk/wordle/

Version 1.3

  • Added 5 themes: Original, High Contrast, Bright, Ocean, RGB

Created: 01/15/22

Updated: 01/31/22

Similar repls
Rock Paper Scissors Game
Rock Paper Scissors Game
ashusharma07
ashusharma07
This a fun Rock Paper Scissors Game using python Programming #Game #Game using python
#python
+4
Time Passer!!
Time Passer!!Basic game I created to pass the time! Just an experiment. Have FUN!!
Universal-Arduino-Telegram-Bot-1
Universal-Arduino-Telegram-Bot-1Use Telegram on your Arduino (ESP8266 or Wifi-101 boards)
48comments
BobIsReal
BobIsReal2 months ago

No Word Filter. Try to fix it!

RixTheTyrunt
RixTheTyrunt3 months ago

Sounds like "WORDLE TOUCAN", LOL.

Stormcrest
Stormcrest3 months ago

noice

Frozones
Frozonesshared this Repl4 months ago
🎉 WORDLE 2K 🎉Post

Recently achieved 2K plays 🎉🎉

Word guessing game

Updated to include 5 new themes: Original, High Contrast, Bright, Ocean, and RGB

https://www.powerlanguage.co.uk/wordle/

ColoredHue
ColoredHue4 months ago

woo i won by looking at google

ColoredHue
ColoredHue4 months ago

wait, nvm i spoke too soon

ColoredHue
ColoredHue4 months ago

it wont work for me anymore D:

NathanJHoffman
NathanJHoffman4 months ago

Wow- a repl.it developer who updates their game based on suggestions? I am unironically impressed, nice job Frozones!

BradenBest
BradenBest4 months ago

"keyboard" printout:

// only call this if you have already found a match for ch in guess_history // returns "match type" as a number (none, partial or full) int find_guess_history_optimistic(char ch) { size_t ghsize = 60; char *match = memchr(guess_history, ch, ghsize); switch (*(match - 1)) { case '0': return 0; case '2': return 2; } // we know for a fact the first match was a 1 (yellow) match // try to see if there's a more optimistic (better) match anywhere else while (ghsize > 0) { ++match; ghsize = 60 - (match - guess_history); match = memchr(match, ch, ghsize); if(match == NULL) return 1; if(*(match - 1) == '2') return 2; } return 1; } void print_keyboard(void) { static char const *row_qwerty = "QWERTYUIOP"; static char const *row_asdf = "ASDFGHJKL"; static char const *row_zxc = "ZXCVBNM"; for (int i = 0; i < 10; ++i) { char const *match = memchr(guess_history, row_qwerty[i], 60); int matchtype; if (match == NULL) // print row_qwerty[i] the default way else { matchtype = find_guess_history_optimistic(row_qwerty[i]); // print row_qwerty[i] using matchtype // 0 = no match (dark grey) // 1 = partial match (yellow) // 2 = full match (green) } } for (int i = 0; i < 9; ++i) // do the same for row_asdf for(int i = 0; i < 7; ++i) // do the same for row_zxc }

This is following from the last comment I wrote about how to better-manage the guess history, which is at the bottom of the other thread. In case you were confused about what guess_history is.

BradenBest
BradenBest4 months ago
char wordle[5]; ... if (random == 1) { wordle[0] = 'C'; wordle[1] = 'L'; wordle[2] = 'O'; wordle[3] = 'U'; wordle[4] = 'T'; } else if (random == 2) ... // this goes on for like 400 lines

there is a much easier way to do this, just saying

#include <string.h> char wordle[5]; static char const *dictionary[] = { "CLOUT", "POKER", "VISTA", ... }; ... size_t dict_len = sizeof dictionary / sizeof *dictionary; int random = rand() % len; memcpy(wordle, dictionary[random], 5);
pro0grammer
pro0grammer4 months ago

where's yellow?... image

NathanJHoffman
NathanJHoffman4 months ago

No credit? Nowhere? This was made by Josh Wardle (https://www.powerlanguage.co.uk/wordle/) and was imitated here.

VictorZwaga
VictorZwaga4 months ago

Really cool game! Reminds me of a TV-show we have in our country called Lingo!

cdCreepArghhh
cdCreepArghhh4 months ago

Really cool

MDDude
MDDude4 months ago

YEE