![Avatar](https://images.clerk.dev/uploaded/img_2PqHa2Gsy93xQrjh2w78Xu0cChW.jpeg)
stevekrouse
mayor of val town
Likes
445
![pomdtr avatar](https://images.clerk.dev/oauth_github/img_2RCoAITJZH1QencEgtVjh4Qirj4.jpeg)
webdavServer
@pomdtr
Script
Webdav Manage your vals from a webdav client (ex: https://cyberduck.io/) ⚠️ some webdav operations are not supported, so support can vary between clients. Installation Click "Create Val" on the code block, and change it's type to http. import { basicAuth } from "https://esm.town/v/pomdtr/basicAuth";
import { verifyToken } from "https://esm.town/v/pomdtr/verifyToken";
import { serveVals } from "https://esm.town/v/pomdtr/webdavServer";
export default basicAuth(serveVals, {
verifyUser: (user) => {
return verifyToken(user);
},
}); Use a val town token as the username, and keep the password blank to authenticate.
numbergame
@moe
HTTP (preview)
* This game implements a number chain puzzle where players drag between adjacent squares (including diagonals) with the same number to add up.
* When a valid chain is selected, the last square in the chain holds the total value rounded up to the nearest power of two,
* and the other squares get new random values. The player scores points based on the chain length and values.
* We'll use React for the UI and manage game state on the client side.
* The server will just serve the initial HTML and JavaScript.
*
* We've updated the color scheme to have a dark background with colored tiles.
* Each number has its own color on a hue scale, cycling through hues for arbitrary powers of two.
* Selected chain tiles now have a white border, and numbers are white for better visibility.
* Non-bordered tiles now have a transparent border to maintain consistent size and prevent layout jumps.
* New tiles fading in no longer show a white border.
* New tiles now have a random power of two between the min and max numbers on the board.
* Initial possible numbers are now between 2 and 32.
*
* Added error handling to prevent "TypeError: cell1 is not iterable" error.