()
| 114 | } |
| 115 | |
| 116 | export function createInitialContext(): SnakeMachineContext { |
| 117 | const gridSize: Point = { x: 25, y: 15 }; |
| 118 | return { |
| 119 | gridSize, |
| 120 | snake: makeInitialSnake(gridSize), |
| 121 | apple: makeInitialApple(gridSize), |
| 122 | score: 0, |
| 123 | highScore: 0, |
| 124 | dir: 'Right' |
| 125 | }; |
| 126 | } |
| 127 | |
| 128 | export const snakeMachine = setup({ |
| 129 | types: { |
no test coverage detected
searching dependent graphs…