{"id":15059954,"url":"https://github.com/adam-gladstone/wordle","last_synced_at":"2026-01-01T23:41:25.887Z","repository":{"id":219314771,"uuid":"737320136","full_name":"Adam-Gladstone/Wordle","owner":"Adam-Gladstone","description":"An implementation of the popular Wordle game using WinUI 3.0 and C++/WinRT","archived":false,"fork":false,"pushed_at":"2024-05-26T15:12:58.000Z","size":363,"stargazers_count":0,"open_issues_count":3,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-15T04:12:51.750Z","etag":null,"topics":["cpp","cpp20","windows","windows-desktop","windows-desktop-application","windows-sdk","winrt","winui3","xaml"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Adam-Gladstone.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-12-30T15:55:29.000Z","updated_at":"2024-05-26T15:13:01.000Z","dependencies_parsed_at":"2024-02-16T13:48:40.121Z","dependency_job_id":null,"html_url":"https://github.com/Adam-Gladstone/Wordle","commit_stats":null,"previous_names":["adam-gladstone/wordle"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adam-Gladstone%2FWordle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adam-Gladstone%2FWordle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adam-Gladstone%2FWordle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adam-Gladstone%2FWordle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Adam-Gladstone","download_url":"https://codeload.github.com/Adam-Gladstone/Wordle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243681084,"owners_count":20330155,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","cpp20","windows","windows-desktop","windows-desktop-application","windows-sdk","winrt","winui3","xaml"],"created_at":"2024-09-24T22:50:26.392Z","updated_at":"2026-01-01T23:41:25.841Z","avatar_url":"https://github.com/Adam-Gladstone.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca name=\"readme-top\"\u003e\u003c/a\u003e\n\n\u003c!-- PROJECT LOGO --\u003e\n\u003cbr /\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://github.com/Adam-Gladstone/Wordle\"\u003e\n    \u003cimg src=\"Images/logo.png\" alt=\"logo\" width=\"80\" height=\"80\"\u003e\n  \u003c/a\u003e\n\n  \u003ch3 align=\"center\"\u003eWordle\u003c/h3\u003e\n\n  \u003cp align=\"center\"\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/Adam-Gladstone/Wordle\"\u003e\u003cstrong\u003eExplore the docs »\u003c/strong\u003e\u003c/a\u003e\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/Adam-Gladstone/Wordle/issues\"\u003eReport Bug\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/Adam-Gladstone/Wordle/issues\"\u003eRequest Feature\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n\u003c!-- TABLE OF CONTENTS --\u003e\n\u003cdetails\u003e\n  \u003csummary\u003eTable of Contents\u003c/summary\u003e\n  \u003col\u003e\n    \u003cli\u003e\n      \u003ca href=\"#about-the-project\"\u003eAbout The Project\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#built-with\"\u003eBuilt With\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\n      \u003ca href=\"#getting-started\"\u003eGetting Started\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#prerequisites\"\u003ePrerequisites\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#roadmap\"\u003eRoadmap\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contact\"\u003eContact\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#acknowledgments\"\u003eAcknowledgments\u003c/a\u003e\u003c/li\u003e\n  \u003c/ol\u003e\n\u003c/details\u003e\n\n\u003c!-- ABOUT THE PROJECT --\u003e\n## About The Project\nThis project started out as a simple console based clone of the [Wordle](https://en.wikipedia.org/wiki/Wordle) game. The console application has no graphics, just keyboard input and the console window to output the result of each guess. It is written in C++20 and I used it as a test bed for some of the C++20 features. I was particularly interested in creating a `constexpr` game. This mostly worked except for the random number generation.\n\nI then decided that it might be nice to add a UI to the project. So, I refactored the original console project into a static library __WordleLib__, the console application __WordleConsole__ and a test harness __WordleTest__:\n* __WordleLib__: contains the core game functionality (i.e. checking the user's guess in terms of the letters and their positions) and the collection of words.\n* __WordleConsole__: contains the main game loop.\n* __WordleTest__: contains unit tests for the game functions. It is based on GTest and provides a simple way to check the API.\n\nFinally, on top of __WordleLib__, I built a __WordleWinUI__ project. This is a Windows Desktop application written in C++/WinRT.\nIt consists of a single page which displays a board of tiles and a keyboard for selecting letters.\n\nThis project demonstrates:\n* XAML:\n  * Using the ItemsRepeater to display the keyboard rows and keys.\n  * Using a nested DataTemplate with an ItemsRepeater to display the grid.\n  * Using DataTemplate's to simplify applying styles to controls.\n\n* MVVM\n  * The `MainPage` code behind handles the construction of the view model and the keyboard 'tapped' event.\n  * Separation of the `MainPage` (the view) from the model (`Letters`, `WordRow`) using the model view (`MainViewModel`) as the intermediary.\n  * The `MainViewModel` handles initialising the game and processing the game turns. The underlying __WordleLib__ handles the selection of the target word, retrieving results and checking if the game is won/lost.\n\n* C++/WinRT:\n  * Resizing the main application window; setting an application icon.\n  * Using Package.appxmanifest to generate icons for the taskbar.\n  * Defining models using MIDL3.0, and providing implementations and type conversions.\n  * `ContentDialog` and a custom MessageBox (this is still a work in progress).\n  * Support for Light/Dark mode via a toggle button on the `MainPage`.\n  * Support for persisting and retrieving the `LightTheme` setting from local application settings.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n### Built With\n\n* Visual Studio 2022\n* C++20\n* C++/WinRT\n* WinUI 3.0\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!-- GETTING STARTED --\u003e\n## Getting Started\n\nThe project can be downloaded from the GitHub repository in the usual way.\n\n### Prerequisites\n\n\n### Installation\n\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!-- USAGE EXAMPLES --\u003e\n## Usage\n### __WordleConsole__\nThe console application (and the static WordleLib) is small: only ~200 lines of code. It has a small set of possible words (463). The game begins by the code choosing one word at random (see below). The user then proceeds to make guesses (up to a maximum of 5) using the report from each word to refine his/her guess. The 'report' basically says, for each letter whether the letter is correct in the position (Green), correct but not in that position (Orange) and incorrect (Grey). There are only two outcomes: you guess the word (in up to 5 guesses) or you lose.\n\nThe console application allows you to play the game. \n\n![Product Name Screen Shot][product-screenshot]\n\nOf course, there is a 'cheat' mode that allows you to display the target word.\n\n### __WordleWinUI__\nThe intention of __WordleWinUI__ was to use both WinUI 3.0 and XAML for the UI, but more importantly to write a Windows Desktop application in C++/WinRT. A more natural choice may have been to use C# (and I'm certain the development would have been easier). However, the underlying __WordleLib__ is written in C++20 and I did not want to wrap this with a Windows Runtime Component in order to use C# (as I have done in the past in the [Software Interoperability project](https://github.com/Adam-Gladstone/SoftwareInteroperability)).\n\nThe screenshots below show a couple of typical game turns.\n\n![WordleWinUI](Images/WordleWinUI%20Game1.png)\n\n![WordleWinUI](Images/WordleWinUI%20Game2.png)\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!-- ROADMAP --\u003e\n## Roadmap\n\nSee the [open issues](https://github.com/Adam-Gladstone/Wordle/issues) for a full list of proposed features (and known issues).\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!-- LICENSE --\u003e\n## License\n\nDistributed under the GPL-3.0 License. See `LICENSE.md` for more information.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!-- CONTACT --\u003e\n## Contact\n\nAdam Gladstone - (https://www.linkedin.com/in/adam-gladstone-b6458b156/)\n\nProject Link: [https://github.com/Adam-Gladstone/Wordle](https://github.com/Adam-Gladstone/Wordle)\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!-- ACKNOWLEDGMENTS --\u003e\n## Acknowledgments\n\nHelpful resources\n\n* [Choose an Open Source License](https://choosealicense.com)\n* [Img Shields](https://shields.io)\n* [GitHub Pages](https://pages.github.com)\n* [Font Awesome](https://fontawesome.com)\n* [React Icons](https://react-icons.github.io/react-icons/search)\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!-- PROJECT SHIELDS --\u003e\n\n[![Issues][issues-shield]][issues-url]\n[![GPL-3 License][license-shield]][license-url]\n[![LinkedIn][linkedin-shield]][linkedin-url]\n\n\u003c!-- MARKDOWN LINKS \u0026 IMAGES --\u003e\n\u003c!-- https://www.markdownguide.org/basic-syntax/#reference-style-links --\u003e\n\n[issues-shield]: https://img.shields.io/github/issues/Adam-Gladstone/Wordle.svg?style=for-the-badge\n[issues-url]: https://github.com/Adam-Gladstone/Wordle/issues\n\n[license-shield]: https://img.shields.io/github/license/Adam-Gladstone/Wordle.svg?style=for-the-badge\n[license-url]: https://github.com/Adam-Gladstone/Wordle/LICENSE.md\n\n[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge\u0026logo=linkedin\u0026colorB=555\n[linkedin-url]: https://www.linkedin.com/in/adam-gladstone-b6458b156/\n\n[product-screenshot]: Images/Screenshot.PNG\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadam-gladstone%2Fwordle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadam-gladstone%2Fwordle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadam-gladstone%2Fwordle/lists"}