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

Function isOutsideGrid

examples/snake-react/src/snakeMachine.ts:48–50  ·  view source on GitHub ↗
(gridSize: Point, p: Point)

Source from the content-addressed store, hash-verified

46}
47
48function isOutsideGrid(gridSize: Point, p: Point) {
49 return p.x < 0 || p.x >= gridSize.x || p.y < 0 || p.y >= gridSize.y;
50}
51
52function find<T extends Point>(points: T[], p: Point) {
53 return points.find((pp) => isSamePos(pp, p));

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…