var Update=function(g,i)
{
  // For each line in the game board.
  for (i=H; --i;)
      // If time cycle is 1/4 or line is below middle sidewalk.
      if (!(t%4) | i>5)
      //{
        // Read the current bits for log/car traffic
        g=r[i],
        // Shift (odd) rows left with wrap-around
        // Shift (even) rows right with wrap-around
        r[i] = i&1?(g&1)<<V|g>>1:g>>V&1|g<<1;
      //}
  // If player has not reach (0,1,2,3) end of death animation advance timer.
  // otherwise reset the player to the bottom middle of the screen.
  p<3?t++:(p=0,x=M,y=B);
  // Advance the player animation if already dead or newly hit by traffic.
  p+=p?1:r[y]>>x&1;
}