Exemple #1
0
 public bool eatBooster(Pacman pacman)
 {
     int x = (int)(pacman.element.Position.X / 20);
     int y = (int)(pacman.element.Position.Y / 20);
     if (y < 0)
         y = 0;
     if (x < 0)
         x = 0;
     if (map[y, x] == 3)
     {
         map[y, x] = 2;
         pacman.startInvincible();
         return true;
     }
     return false;
 }