function drawUpdate() {
      g.clearRect(ppx-r, ppy-r, ppx+r, ppy+r);
      const rc = rcFromXy(ppx, ppy),
        row = rc[0], col = rc[1];
      redrawMaze({top: row-1, left: col-1, bottom: row+1, right: col+1});
      drawBall();
      g.flip();
    }
/**
     * Update the screen:
     * - erase previous ball image
     * - redraw maze around the erased area
     * - draw the ball
     */
Update the screen:
- erase previous ball image
- redraw maze around the erased area
- draw the ball
Update the screen : - erase previous ball image - redraw maze around the erased area - draw the ball
function drawUpdate() {
      g.clearRect(ppx-r, ppy-r, ppx+r, ppy+r);
      const rc = rcFromXy(ppx, ppy),
        row = rc[0], col = rc[1];
      redrawMaze({top: row-1, left: col-1, bottom: row+1, right: col+1});
      drawBall();
      g.flip();
    }
function drawUpdate ( ) { g . clearRect ( ppx - r , ppy - r , ppx + r , ppy + r ) ; const rc = rcFromXy ( ppx , ppy ) , row = rc [ 0 ] , col = rc [ 1 ] ; redrawMaze ( { top : row - 1 , left : col - 1 , bottom : row + 1 , right : col + 1 } ) ; drawBall ( ) ; g . flip ( ) ; }
Update the screen:
 - erase previous ball image
 - redraw maze around the erased area
 - draw the ball
Update the screen : - erase previous ball image - redraw maze around the erased area - draw the ball