Newest
Clone of @maxm/staticChess but for Wordle. Every letter is a link. The game state is stored in the URL bar.
You could do silly things like playing collaborative Wordle with your friends by trading links back and forth. Or undo any mistakes by clicking the back button. I also make it easy to generate a new game from any of your current game's guesses – to send to a friend.
They key to these static games like this one and @maxm/staticChess is to figure out:
- a representation for your game state (the
Game
type) - how to encode/decode your game state into the URL (base64-encoding JSON)
- how to render your game state into HTML (looping over guesses and making divs)
- placing the links into your HTML in the right spots (on my on-screen keyboard)
- prettify with CSS (for guesses and the keyboard)
The idea for the GPT is so that the user comes up with a fun idea for a Video Game. When the user submits the idea, the AI will submit it to the API. The API will return a different idea from the pool of ideas already submitted to the API. This makes this GPT kind-of multiplayer as you will likely get ideas for video games that other people submitted.
Useful when working with ZodFormData and you need to parse a text field that contains JSON.
See https://www.val.town/v/freecrayon/zodStringToJSON_example for an example of how to use it.
Render form and save data
This val provides a web-based interface for collecting email addresses. It features a dual-functionality approach: when accessed via a web browser using a GET request, it serves an HTML form where users can submit their email address. If the script receives a POST request, it implies that the form has been submitted, and it proceeds to handle the incoming data.
Fork this val to customize it and use it on your account.