The gap
A sliding move makes lines hard to plan: a pebble only stops where something stops it, and the spawns change the board between turns.
Game templates
The complete source of Pebblefen, a skim puzzle with fifteen stages, an endless open fen and a daily fen.
Coming soon
Not published on its store yet, so there is no buy or download link. PN Scripts does not take payment for it here.
The gap
A sliding move makes lines hard to plan: a pebble only stops where something stops it, and the spawns change the board between turns.
What it is
Every landing is computed and drawn before the flick, the tide is generated one turn ahead from a seeded generator kept in the save, and the hint bot plays each candidate on a copy (tide included) to judge the position it leaves.
How you use it
Unzip, serve the folder and open index.html, then edit game.js; npm test plays it again in headless Chrome.
Source code of a real, playable game to reskin and learn from, with a smoke test whose bot plays it.
Use it when
Built for
The fen, the coming tide, the score, the stage goal and the generator's state live in one object, so the same functions run the game, the title scene, undo, saves and the Node tests.
The hint bot scores every flick by the lines it clears and the windows of one colour it fills, then plays the best two dozen on a copy, tide included, and keeps the one that leaves the best clear and the most room.
Plain JavaScript and Canvas 2D; open index.html through any static server and edit game.js.
22 unit tests of the rules core (every stage reachable by the bot), 71 headless Chrome checks (keyboard, mouse, gamepad, phones by touch, menus, saves, both languages, sound levels) and a smoke test whose bot plays a stage.
1 of 3
| Platform or runtime | Supported versions | Tested up to |
|---|---|---|
| Node.js | 22.12 or newer | Not stated |
The template is finished and tested. It is not on sale yet; this page will say where to get it when it is.
Coming soon
Not published on its store yet, so there is no buy or download link. PN Scripts does not take payment for it here.