It was briefly fun, but I took it down now. This archived repository remains in case anyone is interested.
Martin's Wordle Clone. Hosted at wordle.mfashby.net.
My game requires login and stores scores on the server, so I can have a leaderboard. Also store the wordlist serverside to prevent cheating.
- push all the state to the database
- separate concerns to different modules
- models.h: common structures used throughout the application, e.g. game_state, user, leaderboard.
- storage.h: storage layer, hide it's implementation so we could swap it (e.g. in-memory, sqlite, postgres etc etc.)
- user.h: logic for signup, login, etc.
- game.h: logic for game manouvres
- index_page.h: function to render index page, similar for any other pages (but you might only require the one)
- main.c: HTTP server and routing
keepin it old-school
- c
- mongoose http server
- mustach html templating
- postgres database
- maybe a sprinkle of javascript
- munit for testing