private void hasGameEnded(){
          if ((pelletsLeft <= 0 && !myPinko.thereArePelletsLeft() )|| (loveliesLeft <= 0 && thereAreNoLoveliesLeft())){
               gameHasEnded = true;
               t.stop();
               repaint();
               
          }
     }