anchor.diff:              then
           then
       then
  -\   if (dying) {
  -\     if (++dying == 64) {
  -\       if (--lives == 0 || time == 0) {
  -\         game_over();
  -\         game_start();
  -\         level_start();
  -\       }
  -\       frog_start();
  -\     }
  -\   }
  -\   else if (frogx < 8 || frogx > 224) {
  -\     dying = 1;
  -\   }
  -\   else if (frogy >= 136) {    // road section
  -\     // if touching something, frog dies
  -\     if (tag == 2)
  -\       dying = 1;
  -\   }
  -\   else if (frogy > 40) {      // river section
  -\     if (!leaping) {
  -\       // if touching something, frog is safe
  -\       if (tag != 1) {
  -\         // move frog according to lane speed
  -\         int oldx = riverat(frogy, prevt);
  -\         int newx = riverat(frogy, t);
  -\         int river_velocity = newx - oldx;
  -\         frogx += river_velocity;
  -\       } else {
  -\         dying = 1;
  -\       }
  -\     }
  -\   }
  -\   else 
  -\   {                      // riverbank section
  -\     if (!leaping) {
  -\       byte landed = 0;
  -\       for (byte i = 0; i < 5; i ++) {
  -\         if (!done[i] && abs(homes[i] - frogx) < 4) {
  -\           done[i] = 1;
  -\           landed = 1;
  -\           score += 10;
  -\         }
  -\       }
  -\       if (landed) {
  -\         if (done[0] && done[1] && done[2] && done[3] && done[4])
  -\           level_start();
  -\         frog_start();
  -\       } else // if frog did not land in a home, die!
  -\         dying = 1;
  -\     }
  -\   }
  -\   sound();
  -\   hiscore = max(score, hiscore);
  -\ }
  -
  -;
  -
  -\ 
  -\ void setup()
  -\ {
  -\   Serial.begin(1000000);    // JCB
  -\   GD.begin();
  -\   LOAD_ASSETS();
  -\   game_setup();
  -\ }
  +;
   
   : frogger
       GD.init
  
positive.code:     loop
      88 sprite
  ;
  
  \ 
  \ static int riverat(byte y, uint16_t tt)
  \ {
  \   switch (y) {
  \   case 120: return -tt;
  \   case 104: return tt;
  \   case 88:  return 5 * tt / 4;
  \   case 72:  return -tt / 2;
  \   case 56:  return tt / 2;
  \   }
  \ }
  
  : riverat  ( y tt -- )
      swap case
  
negative.code:     GD.RestoreContext
  
      1 GD.TagMask
  
      depth throw
  
  