public static boolean loadFile(File f)
   {
      Scanner infile;
      try
      {
         infile = new Scanner(f);
      }
      catch(FileNotFoundException e)
      {
         return false;
      }
      try
      {
         int rows = (infile.nextInt());
         int cols = (infile.nextInt());
         int count = 0;
         int xpos = 0;
         int ypos = 0;
         SugarPanel.get().clear();
         SugarPanel.get().newGrid(rows,cols);
      
         while(infile.hasNext())
         {
            int value = infile.nextInt();
            xpos = count % cols;
            ypos = count / rows;
            Sugar a = new Sugar(xpos, ypos, value, value);
            count++;
         }
      
         
         for(int x = 0; x < (Math.sqrt(rows*cols))/4+1; x++)
         {
            Agent a = new Agent();
         }
      }
      catch(Exception e)
      {
         return false;
      }
      return true;
   }