void Unemployment_Controller() { //Check to see if anyone is employed in each job //If so then it removes a job and an employment slot if (data_manager_script.Check_Total_Employed(0) > 0) { data_manager_script.Change_Total_Employed(0, -1); data_manager_script.Change_Employer_Slots(0, -1); } else if (data_manager_script.Check_Total_Employed(1) > 0) { data_manager_script.Change_Total_Employed(1, -1); data_manager_script.Change_Employer_Slots(1, -1); } else if (data_manager_script.Check_Total_Employed(2) > 0) { data_manager_script.Change_Total_Employed(2, -1); data_manager_script.Change_Employer_Slots(2, -1); } else if (data_manager_script.Check_Total_Employed(3) > 0) { data_manager_script.Change_Total_Employed(3, -1); data_manager_script.Change_Employer_Slots(3, -1); } else if (data_manager_script.Check_Total_Employed(4) > 0) { data_manager_script.Change_Total_Employed(4, -1); data_manager_script.Change_Employer_Slots(4, -1); } //Continues to run the method while unemployed is less than zero if (data_manager_script.Get_Unemployed() < 0) { Unemployment_Controller(); } }
//INCREASING AND DECREASNG BUTTONS void UI_Increase_Buttons(int job_key) { //Alls method to be run only once when the button is pressed if (button_pressed == false) { //If the number of employed in this job is less that the number of this type of jobs if (data_manager_script.Check_Total_Employed(job_key) < data_manager_script.Check_Jobs(job_key) && data_manager_script.Get_Unemployed() > 0) { //Adds 1 from the employment slots data_manager_script.Change_Employer_Slots(job_key, 1); //Add 1 to the total employed in a specific job data_manager_script.Change_Total_Employed(job_key, 1); } //Changes bool to true button_pressed = true; } }