<commit_before>package eco;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Scanner;

public class Util {

	/*
	Lines of the save file:
		wPop
		fPop
		tAcres
		employedFarmers
		unemployedFarmers
		tMoney
		wheatPrice
		tWheat

	*/
    public static void createSave(){

    }

    public static void readSave(){
         String path = "../saves/save.txt";
         Scanner s = null;
         try {
             s = new Scanner(new File(path));
         } catch (FileNotFoundException e){
             readError();
             return;
         }
            ArrayList<String> list = new ArrayList<String>();
         try{
             while (s.hasNext()){
                 list.add(s.next());
             }
             s.close();
         }
         catch (Exception e){
             readError();
             return;
         }
         try{
            for (String str : list){
            str = str.replace(System.getProperty("line.separator"), "");
            }
             PopManager.wPopulation = Integer.valueOf(list.get(0));
             //System.out.println(Warrior.wPop);
             PopManager.fPopulation = Integer.valueOf(list.get(1));
             //System.out.println(Farmer.fPop);
             Main.tAcres = Integer.valueOf(list.get(2));
             //System.out.println(Main.tAcres);
          //   Wheat.employedFarmers = Integer.valueOf(list.get(3));
             //System.out.println(Wheat.employedFarmers);
            // Wheat.unemployedFarmers = Integer.valueOf(list.get(4));
             //System.out.println(Wheat.unemployedFarmers);
             Money.tMoney = Integer.valueOf(list.get(5));
             //System.out.println(Money.tMoney);
             Main.wheatPrice = Integer.valueOf(list.get(6));
             //System.out.println(Main.wheatPrice);
             Main.uneatenwheat = Integer.valueOf(list.get(7));
             readSuccess();
         } catch(Exception e){
             readError();
         }
         return;
     }

    public static void readError(){
		World.messages.add(new Message("------------------------------------------", 100, 100, 300));
	 	World.messages.add(new Message("Failed to load save!", 100, 130, 300));
	 	World.messages.add(new Message("The file either disappeared or is corrupt!", 100, 160, 300));
	 	World.messages.add(new Message("------------------------------------------", 100, 190, 300));
	}

    public static void readSuccess(){
		World.messages.add(new Message("----------------------------------", 100, 100, 300));
	 	World.messages.add(new Message("Loaded game state from save file!", 100, 130, 300));
	 	World.messages.add(new Message("----------------------------------", 100, 160, 300));
	}

}
<commit_msg>Moved random methods<commit_after>package eco;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Scanner;

public class Util {

	/*
	Lines of the save file:
		wPop
		fPop
		tAcres
		employedFarmers
		unemployedFarmers
		tMoney
		wheatPrice
		tWheat

	*/
    public static void createSave(){

    }

    public static void readSave(){
         String path = "../saves/save.txt";
         Scanner s = null;
         try {
             s = new Scanner(new File(path));
         } catch (FileNotFoundException e){
             readError();
             return;
         }
            ArrayList<String> list = new ArrayList<String>();
         try{
             while (s.hasNext()){
                 list.add(s.next());
             }
             s.close();
         }
         catch (Exception e){
             readError();
             return;
         }
         try{
            for (String str : list){
            str = str.replace(System.getProperty("line.separator"), "");
            }
             PopManager.wPopulation = Integer.valueOf(list.get(0));
             //System.out.println(Warrior.wPop);
             PopManager.fPopulation = Integer.valueOf(list.get(1));
             //System.out.println(Farmer.fPop);
             Main.tAcres = Integer.valueOf(list.get(2));
             //System.out.println(Main.tAcres);
          //   Wheat.employedFarmers = Integer.valueOf(list.get(3));
             //System.out.println(Wheat.employedFarmers);
            // Wheat.unemployedFarmers = Integer.valueOf(list.get(4));
             //System.out.println(Wheat.unemployedFarmers);
             Money.tMoney = Integer.valueOf(list.get(5));
             //System.out.println(Money.tMoney);
             Main.wheatPrice = Integer.valueOf(list.get(6));
             //System.out.println(Main.wheatPrice);
             Main.uneatenwheat = Integer.valueOf(list.get(7));
             readSuccess();
         } catch(Exception e){
             readError();
         }
         return;
     }

    public static void readError(){
		World.messages.add(new Message("------------------------------------------", 100, 100, 300));
	 	World.messages.add(new Message("Failed to load save!", 100, 130, 300));
	 	World.messages.add(new Message("The file either disappeared or is corrupt!", 100, 160, 300));
	 	World.messages.add(new Message("------------------------------------------", 100, 190, 300));
	}

    public static void readSuccess(){
		World.messages.add(new Message("----------------------------------", 100, 100, 300));
	 	World.messages.add(new Message("Loaded game state from save file!", 100, 130, 300));
	 	World.messages.add(new Message("----------------------------------", 100, 160, 300));
	}
	 public static int randInt(int max) { //Returns a random number below max.

        return Main.random.nextInt(max);

	}

    public static int randInt(int min, int max) { //Returns a random number between min and max.

        return min + Main.random.nextInt((max + 1)- min);

	}

}

{'fraction_non_alphanumeric': 0.17812394175414833, 'fraction_numerical': 0.02421266508635286, 'mean_word_length': 1.762862488306829, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4580188', 'n_tokens_mistral': 1829, 'n_tokens_neox': 1623, 'n_words': 355}