Workshop › Pac-Man-style Maze Chase › Step 8 of 42
The player will glide from tile to tile, not jump. So besides its tile it keeps: dir (where it is going),
want (where the player would like to go), progress (frames done of the current step) and frames (frames one step
takes). STOP is the direction "nowhere", and same compares two directions.
```js
const STOP = [0, 0]
const PLAYER_FRAMES = 8 // frames the player needs to cross one tile
const same = (a, b) => a[0] === b[0] && a[1] === b[1]
player = { col: MAZE[row].indexOf('P'), row, dir: STOP, want: STOP, progress: 0, frames: PLAYER_FRAMES }
```STOP is a direction that adds nothing.=== unless they are the same array, so same compares their two numbers.COLS write STOP and PLAYER_FRAMES.canGo, after an empty line, write same.placeActors, add the four new fields to player.Skills: Game states
← Where can you walk? One frame of movement →