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};
}