(position, { ignoreHead = false } = {})
| 31 | } |
| 32 | |
| 33 | export function onSnake(position, { ignoreHead = false } = {}) { |
| 34 | return snakeBody.some((segment, index) => { |
| 35 | if (ignoreHead && index === 0) return false |
| 36 | return equalPositions(segment, position) |
| 37 | }) |
| 38 | } |
| 39 | |
| 40 | export function getSnakeHead() { |
| 41 | return snakeBody[0] |
no test coverage detected