MCPcopy
hub / github.com/statelyai/xstate / growSnake

Function growSnake

examples/snake-react/src/snakeMachine.ts:96–98  ·  view source on GitHub ↗
(snake: Snake)

Source from the content-addressed store, hash-verified

94}
95
96function growSnake(snake: Snake): Snake {
97 return [...snake, snake[snake.length - 1]];
98}
99
100function makeInitialSnake(gridSize: Point): Snake {
101 const head: BodyPart = {

Callers 1

snakeMachine.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…