Gab AI · work example
Play the loop. Inspect the rules.
A complete local mechanic prototype: collect three stars in 12 legal moves, then win, lose or restart. Original shapes; no live model calls or publishing.
ORIGINAL MECHANIC / 01
Star Route
Three stars. Twelve moves. Find a route.
Player position (0,2)
Stars collected0 / 3
Moves left12
Game statePlaying
Collect all three stars. Blocked attempts cost no move.
Use direction buttons, or focus the board and press arrow keys. Coordinates start at zero. The square is your player; diamonds are stars; the crossed tile is blocked.
No timer, audio, live model calls, network or persistent save. This is a mechanic prototype, not a published game.
Read the prototype’s game logic
const BOARD_SIZE=5,ROCK=[2,2],STAR_CELLS=[[1,1],[3,1],[4,3]];
function initialGame(){return {x:0,y:2,moves:12,collected:[],status:'Playing'};}
function stepGame(state,direction){
const vectors={up:[0,-1],down:[0,1],left:[-1,0],right:[1,0]};
if(state.status!=='Playing'||!vectors[direction])return state;
const [dx,dy]=vectors[direction],x=state.x+dx,y=state.y+dy;
if(x<0||y<0||x>=BOARD_SIZE||y>=BOARD_SIZE||(x===ROCK[0]&&y===ROCK[1]))return state;
const key=x+','+y,collected=state.collected.slice();
if(STAR_CELLS.some(([sx,sy])=>x===sx&&y===sy)&&!collected.includes(key))collected.push(key);
const moves=state.moves-1,status=collected.length===STAR_CELLS.length?'Won':moves===0?'Lost':'Playing';
return {x,y,moves,collected,status};
}Star-route-game-rules.txt
Board and starting state Star Route uses a 5-by-5 board with zero-based (x,y) coordinates. Start at (0,2). A blocked rock occupies (2,2). Three stars are at (1,1), (3,1) and (4,3). Start with 12 moves remaining and zero collected stars. Input and movement Move one cell up, down, left or right using arrow keys when the board is focused or the four on-screen direction buttons. Each legal move costs one move. Attempts outside the board or onto the rock do not move the player or consume a move. Stars are collected once on entering their cells. Win, loss and restart Collect all three stars to win. If the final allowed move collects the third star, winning takes precedence over running out of moves. Lose when no moves remain and fewer than three stars have been collected. Movement after a win or loss has no effect. Restart restores the complete initial state. Prototype scope This is a turn-based single-player mechanic prototype with original CSS shapes, no audio, no timer, no multiplayer and no publishing. It has no account, external service, persistent save or model-powered character. Difficulty and enjoyment have not been established through player research.
Star-route-acceptance-checks.txt
Winning path From restart, press Right, Up, Right, Right, Right, Down, Down. Expected: position (4,3), three collected stars, five moves remaining and Won. This is seven legal moves. Boundary and obstacle checks From restart, press Left. Expected: position (0,2), zero stars and 12 moves remaining. Then press Right twice. The first reaches (1,2) and leaves 11 moves; the second attempts the rock at (2,2) and must leave position and moves unchanged. Loss and terminal checks From restart, alternate Right then Left six times. Expected: position (0,2), zero stars, zero moves remaining and Lost. Further direction inputs must have no effect. Restart must restore position (0,2), all three stars and 12 moves. Last-move win precedence From restart, use Right, Up, Right, Up, Right, Right, Down, Down, Down, Left, Up, Up. Expected: position (3,1), three stars, zero moves and Won. This route takes exactly 12 legal moves and collects the star at (3,1) last. Verification boundary The test matrix names checks and expected outcomes. Execution evidence belongs in a separate dated QA record. A passing fixture does not establish game balance, accessibility on every device or production readiness.