Workshop › Pac-Man-style Maze Chase › Step 27 of 42
Orange chases you while it is more than 8 tiles away, but when it gets closer it turns to its corner. It is shy, which makes it hard to predict.
```js
if (g.name === 'orange') {
const far = (g.col - player.col) ** 2 + (g.row - player.row) ** 2 > 64
return far ? player : g.corner
}
```In target, under the pink line, write the orange block.
Skills: Game states
← Pink cuts you off Cyan works with red →