diff --git a/.DS_Store b/.DS_Store
new file mode 100644
index 0000000..09137ca
Binary files /dev/null and b/.DS_Store differ
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..26d3352
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
new file mode 100644
index 0000000..639314b
--- /dev/null
+++ b/.idea/compiler.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml
new file mode 100644
index 0000000..712ab9d
--- /dev/null
+++ b/.idea/jarRepositories.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__junit_junit_4_13_2.xml b/.idea/libraries/Maven__junit_junit_4_13_2.xml
new file mode 100644
index 0000000..606c352
--- /dev/null
+++ b/.idea/libraries/Maven__junit_junit_4_13_2.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml b/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml
new file mode 100644
index 0000000..f58bbc1
--- /dev/null
+++ b/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..bcd41e5
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..16ae36c
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
new file mode 100644
index 0000000..2b63946
--- /dev/null
+++ b/.idea/uiDesigner.xml
@@ -0,0 +1,124 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..35eb1dd
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HammurabiTest.java b/HammurabiTest.java
deleted file mode 100644
index 5cf1cc9..0000000
--- a/HammurabiTest.java
+++ /dev/null
@@ -1,125 +0,0 @@
-package hammurabi;
-
-import static org.junit.Assert.*;
-
-import org.junit.Before;
-import org.junit.Test;
-
-public class HammurabiTest {
-
- Hammurabi ham;
-
- boolean about(double expected, double actual) {
- return actual > 0.90 * expected && actual < 1.10 * expected;
- }
-
- @Before
- public void setUp() throws Exception {
- ham = new Hammurabi();
- }
-
- @Test
- public final void testPlagueDeaths1() {
- int number_of_plagues = 0;
- for (int i = 0; i < 10000; i++) {
- int deaths = ham.plagueDeaths(100);
- if (deaths > 0) {
- number_of_plagues += 1;
- }
- }
- int percentPlagues = number_of_plagues / 100;
- assertTrue("Number of plagues is about " + percentPlagues + ", not about 15%.",
- about(1500, number_of_plagues));
- }
-
- @Test
- public final void testPlagueDeaths2() {
- int deaths = 0;
- for (int i = 0; i < 10000; i++) {
- deaths = ham.plagueDeaths(100);
- if (deaths > 0) break;
- }
- assertEquals("In a plague, " + deaths + "% of your people die, not 50%.",
- 50, deaths);
- }
-
- @Test
- public final void testStarvationDeaths() {
- int deaths = ham.starvationDeaths(100, 1639);
- assertEquals("Wrong number of starvations deaths.", 19, deaths);
- deaths = ham.starvationDeaths(100, 2500);
- if (deaths < 0) {
- fail("You starved a negative number of people!");
- }
- }
-
- @Test
- public final void testUprising() {
- assertTrue("Should have had an uprising!", ham.uprising(1000, 451));
- assertFalse("Should not have had an uprising!", ham.uprising(1000, 449));
- }
-
- @Test
- public final void testImmigrants() {
- int imm = ham.immigrants(10, 1200, 500);
- assertEquals("Wrong number of immigrants.", 25, imm);
- }
-
- @Test
- public final void testHarvest() {
- int[] yield = new int[7];
- for (int i = 0; i < 1000; i++) {
- int harvest = ham.harvest(1);
- assertTrue("Illegal harvest per acre: " + harvest, harvest > 0 && harvest <= 6);
- yield[harvest] += 1;
- }
- for (int j = 1; j <= 6; j++) {
- assertTrue("You never have a yield of " + j + " bushels per acre.", yield[j] > 0);
- }
- }
-
- @Test
- public final void testGrainEatenByRats1() {
- int infestations = 0;
- for (int i = 0; i < 1000; i++) {
- int eaten = ham.grainEatenByRats(100);
- if (eaten > 0) {
- infestations += 1;
- }
- }
- int percentInfestations = infestations / 100;
- assertTrue("Number of rat infestations is about " + percentInfestations +
- ", not about 40%.", about(400, infestations));
- }
-
- @Test
- public final void testGrainEatenByRats2() {
- int percent = 0;
- int[] counts = new int[31];
- for (int i = 0; i < 10000; i++) {
- percent = ham.grainEatenByRats(100);
- if (percent == 0) continue;
- counts[percent] += 1;
- assertTrue("Rats ate " + percent + "% of your grain, not 10% to 30%.",
- percent >= 10 && percent <= 30);
- }
- for (int j = 11; j < 30; j++) {
- assertTrue("Rats never ate " + j + "% of your grain.", counts[j] > 0);
- }
- }
-
- @Test
- public final void testNewCostOfLand() {
- int[] cost = new int[24];
- for (int i = 0; i < 1000; i++) {
- int price = ham.newCostOfLand();
- assertTrue("Illegal cost of land: " + price, price >= 17 && price <= 23);
- cost[price] += 1;
- }
- for (int j = 17; j <= 23; j++) {
- assertTrue("You never have a land cost of " + j + " bushels per acre.", cost[j] > 0);
- }
- }
-
-}
-
diff --git a/Hamurabi.iml b/Hamurabi.iml
new file mode 100644
index 0000000..903044c
--- /dev/null
+++ b/Hamurabi.iml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/.DS_Store b/docs/.DS_Store
new file mode 100644
index 0000000..f13b2b3
Binary files /dev/null and b/docs/.DS_Store differ
diff --git a/docs/hamurabi.java b/docs/hamurabi.java
deleted file mode 100644
index 9947af3..0000000
--- a/docs/hamurabi.java
+++ /dev/null
@@ -1,156 +0,0 @@
-import java.io.IOException;
-import java.util.Scanner;
-
-// this seems to be an example of a solution that mimics the original BASIC code the author was writing from.
-//
-// it's a great example of Very Bad Java.
-// Do not write Java like this. If you do, do NOT tell people you went to Zip Code.
-// I'm serious.
-// (how the hell would you ever be able to TEST this piece of code?)
-//
-public class HAMURABI {
- static int totalDeaths = 0, percentDied = 0, year = 0, population = 95, stores = 2800, immigrants = 5, deaths,
- harvest = 3000, yeild = 3, acres = harvest / yeild, eaten = harvest - stores, landPrice, fullPeople, temp;
- static boolean plague = false;
- final static String FINK = "DUE TO THIS EXTREME MISMANAGEMENT YOU HAVE NOT ONLY\n" +
- "BEEN IMPEACHED AND THROWN OUT OF OFFICE BUT YOU HAVE\n" +
- "ALSO BEEN DECLARED PERSONA NON GRATA!!\n";
- Scanner input = new Scanner(System.in);
-
- private void newYear() {
- year += 1;
- population += immigrants;
- landPrice = (int) (10 * Math.random() + 17);
- System.out.println(report());
- do {
- System.out.print("HOW MANY ACRES DO YOU WISH TO BUY? ");
- temp = input.nextInt();
- if (temp < 0)
- epicFail(0);
- if (temp * landPrice > stores)
- System.out.println("HAMURABI: THINK AGAIN. YOU HAVE ONLY\n" +
- stores + " BUSHELS OF GRAIN. NOW THEN,");
- } while (temp * landPrice > stores);
- acres += temp;
- stores -= temp * landPrice;
- do {
- System.out.print("HOW MANY ACRES DO YOU WISH TO SELL? ");
- temp = input.nextInt();
- if (temp < 0)
- epicFail(0);
- if (temp > acres)
- System.out.println("HAMURABI: THINK AGAIN. YOU OWN ONLY " + acres + " ACRES. NOW THEN,");
- } while (temp > acres);
- stores += temp * landPrice;
- acres -= temp;
- do {
- System.out.print("\nHOW MANY BUSHELS DO YOU WISH TO FEED YOUR PEOPLE? ");
- temp = input.nextInt();
- if (temp < 0)
- epicFail(0);
- if (temp > stores)
- System.out.println("HAMURABI: THINK AGAIN. YOU HAVE ONLY\n" +
- stores + " BUSHELS OF GRAIN. NOW THEN,");
- } while (temp > stores);
- fullPeople = temp / 20;
- stores -= temp;
- do {
- System.out.print("\nHOW MANY ACRES DO YOU WISH TO PLANT WITH SEED? ");
- temp = input.nextInt();
- if (temp < 0)
- epicFail(0);
- if (temp > acres)
- System.out.println("HAMURABI: THINK AGAIN. YOU OWN ONLY " + acres + " ACRES. NOW THEN,");
- if (temp / 2 > stores)
- System.out.println("HAMURABI: THINK AGAIN. YOU HAVE ONLY\n" +
- stores + " BUSHELS OF GRAIN. NOW THEN,");
- if (temp > population * 10)
- System.out.println("BUT YOU HAVE ONLY" + population + "PEOPLE TO TEND THE FIELDS. NOW THEN,");
- } while (temp > acres || temp / 2 > stores || temp > population * 10);
- stores -= temp / 2;
- yeild = (int) (Math.random() * 5 + 1);
- harvest = temp * yeild;
- temp = (int) (Math.random() * 5 + 1);
- if (temp % 2 != 1)
- eaten = (stores / temp);
- else
- eaten = 0;
- stores += (harvest - eaten);
- immigrants = (int) (Math.random() * 5 + 1) *
- (20 * acres + stores) / population / 100 + 1;
- if (population > fullPeople) {
- deaths = population - fullPeople;
- if (deaths > .45 * population)
- epicFail(1);
- percentDied = ((year - 1) * percentDied + deaths * 100 / population) / year;
- population = fullPeople;
- totalDeaths += deaths;
- }
- if (20 * Math.random() >= 17)
- plague = true;
- plague = false;
- }
-
- private static String report() {
- String answer = "\nHAMURABI: I BEG TO REPORT TO YOU,\n" +
- "IN YEAR " + year + ", " + deaths + " PEOPLE STARVED, " + immigrants + " CAME TO THE CITY.\n";
- if (plague) {
- population = population / 2;
- answer += "A HORRIBLE PLAGUE STRUCK! HALF THE PEOPLE DIED.\n";
- }
- answer += "POPULATION IS NOW " + population + ".\n" +
- "THE CITY NOW OWNS " + acres + " ACRES.\n" +
- "YOU HARVESTED " + yeild + " BUSHELS PER ACRE.\n" +
- "RATS ATE " + eaten + " BUSHELS.\n" +
- "YOU NOW HAVE " + stores + " BUSHELS IN STORE\n\n" +
- "LAND IS TRADING AT " + landPrice + " BUSHELS PER ACRE.";
- return answer;
- }
-
-
- private static void epicFail(int x) {
- String reason = "";
- switch (x) {
- case 0: reason = "HAMURABI: I CANNOT DO WHAT YOU WISH.\n" +
- "GET YOURSELF ANOTHER STEWARD!!!!!"; break;
- case 1: reason = "YOU STARVED " + deaths + " PEOPLE IN ONE YEAR!!!\n" +
- FINK; break;
- }
- System.out.println(reason);
- System.exit(0);
- }
-
- private void finished() {
- String answer = "IN YOUR 10-YEAR TERM OF OFFICE, " + percentDied + " PERCENT OF THE\n" +
- "POPULATION STARVED PER YEAR ON AVERAGE, I.E., A TOTAL OF\n" +
- totalDeaths + " PEOPLE DIED!!\n" +
- "YOU STARTED WITH 10 ACRES PER PERSON AND ENDED WITH\n" +
- acres / population + " ACRES PER PERSON\n\n";
- if (percentDied > 33 || acres / population < 7)
- answer += FINK;
- else if (percentDied > 10 || acres / population < 9)
- answer += "YOUR HEAVY-HANDED PERFORMANCE SMACKS OF NERO AND IVAN IV.\n" +
- "THE PEOPLE (REMAINING) FIND YOU AN UNPLEASANT RULER, AND,\n" +
- "FRANKLY, HATE YOUR GUTS!";
- else if (percentDied > 3 || acres / population < 10)
- answer += "YOUR PERFORMANCE COULD HAVE BEEN SOMEWHAT BETTER, BUT\n" +
- "REALLY WASN'T TOO BAD AT ALL.\n" +
- Math.random() * population * .8 + " PEOPLE WOULD" +
- "DEARLY LIKE TO SEE YOU ASSASSINATED BUT WE ALL HAVE OUR" +
- "TRIVIAL PROBLEMS";
- else
- answer += "A FANTASTIC PERFORMANCE!!! CHARLEMANGE, DISRAELI, AND\n" +
- "JEFFERSON COMBINED COULD NOT HAVE DONE BETTER!";
- answer += "\n\n\n\n\n\n\n\n\n\nSo long for now.";
- System.out.println(answer);
- }
-
- public static void main(String[] args) throws IOException {
- HAMURABI a = new HAMURABI();
- System.out.println("\t\t\t\tHAMURABI\n\t CREATIVE COMPUTING MORRISTOWN, NEW JERSEY\n\n" +
- "TRY YOUR HAND AT GOVERNING ANCIENT SUMERIA\nSUCCESSFULLY FOR A TEN-YEAR TERM OF OFFICE.");
- while (year < 10)
- a.newYear();
- a.finished();
- }
-}
\ No newline at end of file
diff --git a/docs/matuszek/Hammurabi.java b/docs/matuszek/Hammurabi.java
new file mode 100644
index 0000000..a00e317
--- /dev/null
+++ b/docs/matuszek/Hammurabi.java
@@ -0,0 +1,259 @@
+package hammurabi.docs.matuszek;//package Hammurabi;
+import java.util.Random; // imports go here
+import java.util.Scanner;
+import hammurabi.docs.matuszek.normalEvents.*;
+import hammurabi.docs.matuszek.disasterEvents.*;
+
+ public class Hammurabi { // must save in a file named Hammurabi.java
+ Random rand = new Random(); // this is an instance variable
+ static Scanner scanner = new Scanner(System.in);
+
+ private static int year = 0;
+ private static boolean gameOver = false;
+ private static int harvest = 0;
+ private static int ratEaten = 0;
+ private static int starving = 0;
+ private static int immigrants = 0;
+ private static int people = 100;
+ private static int bushelsOfGrain = 2800;
+ private static int acres = 1000;
+ private static int landValue = 25;
+ private static int bushelsPerAcre = 0;
+ private static int peopleDeath = 0;
+ private static int starvationPeopleDeath = 0;
+ private static int acresToBuy =0;
+ private static int acresToSell =0;
+ private static int grainToFeed =0;
+ private static int acresToPlant = 0;
+ private static int plaguePeopleDeath =0;
+ private static boolean uprisingPeople =false;
+ private static int immigrantsPeople = 0;
+ private static int harvestPeople = 0;
+ private static int grainEatenByRatsPeople =0;
+ private static int newCostOfLandPeople =0;
+
+
+
+
+
+ public Hammurabi(int peo,int bus, int acr, int lan){
+ people=peo;
+ bushelsOfGrain=bus;
+ acres=acr;
+ landValue=lan;
+
+ }
+
+
+
+
+ public void playGame() {
+
+ while (!gameOver) {
+ year += 1;
+ normalEvents.printStatus();
+ normalEvents.playerTypeIn();
+ disasterEvents.disasterCal();
+ if (uprisingPeople) {
+ System.out.println("Too many people starved to death. Game Over!");
+ break;
+ }
+ if(starvationPeopleDeath > 0){
+ immigrantsPeople = normalEvents.immigrants(people, acres, bushelsOfGrain);
+ }
+ normalEvents.nextCal();
+ if(year == 10){
+ gameOver = true;
+ }
+ }
+ }
+
+ //other methods go here
+
+
+
+
+
+ public static int getYear() {
+ return year;
+ }
+
+ public static void setYear(int year) {
+ Hammurabi.year = year;
+ }
+
+ public static boolean isGameOver() {
+ return gameOver;
+ }
+
+ public static void setGameOver(boolean gameOver) {
+ Hammurabi.gameOver = gameOver;
+ }
+
+ public static int getHarvest() {
+ return harvest;
+ }
+
+ public static void setHarvest(int harvest) {
+ Hammurabi.harvest = harvest;
+ }
+
+ public static int getRatEaten() {
+ return ratEaten;
+ }
+
+ public static void setRatEaten(int ratEaten) {
+ Hammurabi.ratEaten = ratEaten;
+ }
+
+ public static int getStarving() {
+ return starving;
+ }
+
+ public static void setStarving(int starving) {
+ Hammurabi.starving = starving;
+ }
+
+ public static int getImmigrants() {
+ return immigrants;
+ }
+
+ public static void setImmigrants(int immigrants) {
+ Hammurabi.immigrants = immigrants;
+ }
+
+ public static int getPeople() {
+ return people;
+ }
+
+ public static void setPeople(int people) {
+ Hammurabi.people = people;
+ }
+
+ public static int getBushelsOfGrain() {
+ return bushelsOfGrain;
+ }
+
+ public static void setBushelsOfGrain(int bushelsOfGrain) {
+ Hammurabi.bushelsOfGrain = bushelsOfGrain;
+ }
+
+ public static int getAcres() {
+ return acres;
+ }
+
+ public static void setAcres(int acres) {
+ Hammurabi.acres = acres;
+ }
+
+ public static int getLandValue() {
+ return landValue;
+ }
+
+ public static void setLandValue(int landValue) {
+ Hammurabi.landValue = landValue;
+ }
+
+ public static int getBushelsPerAcre() {
+ return bushelsPerAcre;
+ }
+
+ public static void setBushelsPerAcre(int bushelsPerAcre) {
+ Hammurabi.bushelsPerAcre = bushelsPerAcre;
+ }
+
+ public static int getPeopleDeath() {
+ return peopleDeath;
+ }
+
+ public static void setPeopleDeath(int peopleDeath) {
+ Hammurabi.peopleDeath = peopleDeath;
+ }
+
+ public static int getStarvationPeopleDeath() {
+ return starvationPeopleDeath;
+ }
+
+ public static void setStarvationPeopleDeath(int starvationPeopleDeath) {
+ Hammurabi.starvationPeopleDeath = starvationPeopleDeath;
+ }
+ public static int getAcresToBuy() {
+ return acresToBuy;
+ }
+
+ public static void setAcresToBuy(int acresToBuy) {
+ Hammurabi.acresToBuy = acresToBuy;
+ }
+
+ public static int getAcresToSell() {
+ return acresToSell;
+ }
+
+ public static void setAcresToSell(int acresToSell) {
+ Hammurabi.acresToSell = acresToSell;
+ }
+ public static int getGrainToFeed() {
+ return grainToFeed;
+ }
+
+ public static void setGrainToFeed(int grainToFeed) {
+ Hammurabi.grainToFeed = grainToFeed;
+ }
+
+ public static int getAcresToPlant() {
+ return acresToPlant;
+ }
+
+ public static void setAcresToPlant(int acresToPlant) {
+ Hammurabi.acresToPlant = acresToPlant;
+ }
+
+ public static int getPlaguePeopleDeath() {
+ return plaguePeopleDeath;
+ }
+
+ public static void setPlaguePeopleDeath(int plaguePeopleDeath) {
+ Hammurabi.plaguePeopleDeath = plaguePeopleDeath;
+ }
+ public static boolean isUprisingPeople() {
+ return uprisingPeople;
+ }
+
+ public static void setUprisingPeople(boolean uprisingPeople) {
+ Hammurabi.uprisingPeople = uprisingPeople;
+ }
+ public static int getImmigrantsPeople() {
+ return immigrantsPeople;
+ }
+
+ public static void setImmigrantsPeople(int immigrantsPeople) {
+ Hammurabi.immigrantsPeople = immigrantsPeople;
+ }
+
+ public static int getHarvestPeople() {
+ return harvestPeople;
+ }
+
+ public static void setHarvestPeople(int harvestPeople) {
+ Hammurabi.harvestPeople = harvestPeople;
+ }
+
+ public static int getGrainEatenByRatsPeople() {
+ return grainEatenByRatsPeople;
+ }
+
+ public static void setGrainEatenByRatsPeople(int grainEatenByRatsPeople) {
+ Hammurabi.grainEatenByRatsPeople = grainEatenByRatsPeople;
+ }
+
+ public static int getNewCostOfLandPeople() {
+ return newCostOfLandPeople;
+ }
+
+ public static void setNewCostOfLandPeople(int newCostOfLandPeople) {
+ Hammurabi.newCostOfLandPeople = newCostOfLandPeople;
+ }
+
+
+ }
+
diff --git a/docs/matuszek/HammurabiTest.java b/docs/matuszek/HammurabiTest.java
index 5cf1cc9..1887863 100644
--- a/docs/matuszek/HammurabiTest.java
+++ b/docs/matuszek/HammurabiTest.java
@@ -1,28 +1,33 @@
-package hammurabi;
+package hammurabi.docs.matuszek;
import static org.junit.Assert.*;
+import hammurabi.docs.matuszek.disasterEvents.*;
import org.junit.Before;
import org.junit.Test;
public class HammurabiTest {
-
+
Hammurabi ham;
-
+ disasterEvents disa;
+ normalEvents nor;
+
boolean about(double expected, double actual) {
return actual > 0.90 * expected && actual < 1.10 * expected;
}
@Before
public void setUp() throws Exception {
- ham = new Hammurabi();
+ ham = new Hammurabi(100,2800,1000,19);
+ disa = new disasterEvents();
+ nor = new normalEvents();
}
@Test
public final void testPlagueDeaths1() {
int number_of_plagues = 0;
for (int i = 0; i < 10000; i++) {
- int deaths = ham.plagueDeaths(100);
+ int deaths = disa.plagueDeaths(100);
if (deaths > 0) {
number_of_plagues += 1;
}
@@ -36,18 +41,18 @@ public final void testPlagueDeaths1() {
public final void testPlagueDeaths2() {
int deaths = 0;
for (int i = 0; i < 10000; i++) {
- deaths = ham.plagueDeaths(100);
+ deaths = disa.plagueDeaths(100);
if (deaths > 0) break;
}
assertEquals("In a plague, " + deaths + "% of your people die, not 50%.",
50, deaths);
}
-
+
@Test
public final void testStarvationDeaths() {
- int deaths = ham.starvationDeaths(100, 1639);
+ int deaths = disa.starvationDeaths(100, 1639);
assertEquals("Wrong number of starvations deaths.", 19, deaths);
- deaths = ham.starvationDeaths(100, 2500);
+ deaths = disa.starvationDeaths(100, 2500);
if (deaths < 0) {
fail("You starved a negative number of people!");
}
@@ -55,13 +60,13 @@ public final void testStarvationDeaths() {
@Test
public final void testUprising() {
- assertTrue("Should have had an uprising!", ham.uprising(1000, 451));
- assertFalse("Should not have had an uprising!", ham.uprising(1000, 449));
+ assertTrue("Should have had an uprising!", disa.uprising(1000, 451));
+ assertFalse("Should not have had an uprising!", disa.uprising(1000, 449));
}
@Test
public final void testImmigrants() {
- int imm = ham.immigrants(10, 1200, 500);
+ int imm = nor.immigrants(10, 1200, 500);
assertEquals("Wrong number of immigrants.", 25, imm);
}
@@ -69,7 +74,7 @@ public final void testImmigrants() {
public final void testHarvest() {
int[] yield = new int[7];
for (int i = 0; i < 1000; i++) {
- int harvest = ham.harvest(1);
+ int harvest = nor.harvest(1,1);
assertTrue("Illegal harvest per acre: " + harvest, harvest > 0 && harvest <= 6);
yield[harvest] += 1;
}
@@ -82,13 +87,13 @@ public final void testHarvest() {
public final void testGrainEatenByRats1() {
int infestations = 0;
for (int i = 0; i < 1000; i++) {
- int eaten = ham.grainEatenByRats(100);
+ int eaten = nor.grainEatenByRats(100);
if (eaten > 0) {
infestations += 1;
}
}
int percentInfestations = infestations / 100;
- assertTrue("Number of rat infestations is about " + percentInfestations +
+ assertTrue("Number of rat infestations is about " + percentInfestations +
", not about 40%.", about(400, infestations));
}
@@ -97,7 +102,7 @@ public final void testGrainEatenByRats2() {
int percent = 0;
int[] counts = new int[31];
for (int i = 0; i < 10000; i++) {
- percent = ham.grainEatenByRats(100);
+ percent = nor.grainEatenByRats(100);
if (percent == 0) continue;
counts[percent] += 1;
assertTrue("Rats ate " + percent + "% of your grain, not 10% to 30%.",
@@ -112,7 +117,7 @@ public final void testGrainEatenByRats2() {
public final void testNewCostOfLand() {
int[] cost = new int[24];
for (int i = 0; i < 1000; i++) {
- int price = ham.newCostOfLand();
+ int price = nor.newCostOfLand();
assertTrue("Illegal cost of land: " + price, price >= 17 && price <= 23);
cost[price] += 1;
}
diff --git a/docs/matuszek/disasterEvents.java b/docs/matuszek/disasterEvents.java
new file mode 100644
index 0000000..841d563
--- /dev/null
+++ b/docs/matuszek/disasterEvents.java
@@ -0,0 +1,62 @@
+package hammurabi.docs.matuszek;
+
+import java.util.Random;
+
+public class disasterEvents {
+
+ public disasterEvents(){}
+ static Random rand = new Random(); // this is an instance variable
+ public static void disasterCal(){
+ Hammurabi.setPlaguePeopleDeath( plagueDeaths(Hammurabi.getPeople()));
+ Hammurabi.setStarvationPeopleDeath( starvationDeaths(Hammurabi.getPeople(), Hammurabi.getGrainToFeed()));
+ Hammurabi.setUprisingPeople(uprising(Hammurabi.getPeople(), Hammurabi.getStarvationPeopleDeath()));
+ }
+
+ static int plagueDeaths(int population){
+ int plaDea = rand.nextInt(100)+1;
+ if(plaDea<=15) {
+ Hammurabi.setPeopleDeath(Hammurabi.getPeople() / 2);
+ return Hammurabi.getPeopleDeath();
+ }else return 0;
+
+ /*
+ int plagueDeaths(int population) {
+ int plaDea = rand.nextInt(100) + 1;
+ if (plaDea <= 15) {
+ return population / 2;
+ } else return 0;
+ */
+
+ }
+
+
+ // Each year, there is a 15% chance of a horrible plague. When this happens, half your people die.
+ // Return the number of plague deaths (possibly zero).
+ static int starvationDeaths(int population, int bushelsFedToPeople) {
+ int numberOfStar = bushelsFedToPeople / 20 - population;
+ if (numberOfStar >= 0) {
+ return 0;
+ } else {
+
+ Hammurabi.setPeople(Hammurabi.getPeople() - Math.abs(numberOfStar));
+ return Math.abs(numberOfStar);
+ }
+ }
+ // Each person needs 20 bushels of grain to survive. If you feed them more than this, they are happy,
+ // but the grain is still gone. You don't get any benefit from having happy subjects.
+ // Return the number of deaths from starvation (possibly zero).
+
+ static boolean uprising(int population, int howManyPeopleStarved) {
+
+ double starvingRate = (double) howManyPeopleStarved / population;
+ if (starvingRate > 0.450) {
+ Hammurabi.setGameOver(true);
+ } else if (starvingRate <= 0.450) {
+ Hammurabi.setGameOver(false);
+ }
+
+ return Hammurabi.isGameOver();
+
+
+ }
+}
diff --git a/docs/matuszek/gameStart.java b/docs/matuszek/gameStart.java
new file mode 100644
index 0000000..1a57d7e
--- /dev/null
+++ b/docs/matuszek/gameStart.java
@@ -0,0 +1,15 @@
+package hammurabi.docs.matuszek;//package Hammurabi;
+import java.util.Random; // imports go here
+import java.util.Scanner;
+
+import hammurabi.docs.matuszek.Hammurabi;
+import hammurabi.docs.matuszek.normalEvents.*;
+import hammurabi.docs.matuszek.disasterEvents.*;;
+
+public class gameStart {
+ public static void main(String[] args) { // required in every Java program
+
+ new Hammurabi(100, 2800, 1000, 19).playGame();
+
+ }
+}
diff --git a/docs/matuszek/normalEvents.java b/docs/matuszek/normalEvents.java
new file mode 100644
index 0000000..3e2657c
--- /dev/null
+++ b/docs/matuszek/normalEvents.java
@@ -0,0 +1,159 @@
+package hammurabi.docs.matuszek;
+import hammurabi.docs.matuszek.Hammurabi;
+
+import static hammurabi.docs.matuszek.Hammurabi.*;
+import static hammurabi.docs.matuszek.disasterEvents.rand;
+
+public class normalEvents {
+
+ public normalEvents(){};
+ public static void printStatus() {
+ System.out.println("O great Hammurabi!");
+ System.out.println("You are in year " + Hammurabi.getYear() + " of your ten year rule.");
+ System.out.println("In the previous year " + Hammurabi.getStarvationPeopleDeath() + " people starved to death.");
+ System.out.println("the previous year " + Hammurabi.getImmigrants() + " people entered the kingdom.");
+ System.out.println("The population is now " + Hammurabi.getPeople() + " .");
+ System.out.println("We harvested " + Hammurabi.getHarvest() + " bushels at " + Hammurabi.getBushelsPerAcre() + " bushels per acre.");
+ System.out.println("Rats destroyed " + Hammurabi.getRatEaten() + " bushels, leaving " + Hammurabi.getBushelsOfGrain() + " bushels in storage.");
+ System.out.println("The city owns " + Hammurabi.getAcres() + " acres of land.");
+ System.out.println("Land is currently worth " + Hammurabi.getLandValue() + " bushels per acre.\n");
+ }
+
+ public static void playerTypeIn() {
+ int acresToBuy = askHowManyAcresToBuy(Hammurabi.getLandValue(), Hammurabi.getBushelsOfGrain());
+ Hammurabi.setAcresToBuy(acresToBuy);
+ if (Hammurabi.getAcresToBuy() == 0) {
+ int acresToSell = askHowManyAcresToSell(Hammurabi.getAcres());
+ Hammurabi.setAcresToSell(acresToSell);
+
+ }
+ int grainToFeed = askHowMuchGrainToFeedPeople(Hammurabi.getBushelsOfGrain());
+ Hammurabi.setGrainToFeed(grainToFeed);
+
+ int acresToPlant = askHowManyAcresToPlant(Hammurabi.getAcres(), Hammurabi.getPeople(), Hammurabi.getBushelsOfGrain());
+ Hammurabi.setAcresToPlant(acresToPlant);
+ }
+ public static void nextCal(){
+ Hammurabi.setHarvestPeople(harvest(Hammurabi.getAcresToPlant(), Hammurabi.getBushelsOfGrain()));
+ Hammurabi.setGrainEatenByRatsPeople(grainEatenByRats(Hammurabi.getBushelsOfGrain()));
+ Hammurabi.setNewCostOfLandPeople(newCostOfLand());
+ }
+ static int askHowManyAcresToBuy(int price, int bushels) {
+ System.out.println("How many acres do you wish to buy?");
+ int in = scanner.nextInt();
+ while (in * price > bushels) {
+ System.out.println("Hammurabi: Think again. You have only " + bushels + " of grain. ");
+ System.out.println("Re-enter the numbers of acres you wish to buy");
+ in = scanner.nextInt();
+ }
+ Hammurabi.setBushelsOfGrain(Hammurabi.getBushelsOfGrain() - in * price);
+ Hammurabi.setAcres(Hammurabi.getAcres() + in);
+ return in;
+ }
+ //Asks the player how many acres of land to buy, and returns that number.
+ // You must have enough grain to pay for your purchase.
+
+ static int askHowManyAcresToSell(int acresOwned) {
+
+ System.out.println("How many acres do you wish to sell?");
+ int in = scanner.nextInt();
+ while (in > acresOwned) {
+ System.out.println("Hammurabi: Thank again. You have only " + acresOwned + " of grain. ");
+ System.out.println("Re-enter the numbers of acres you wish to sell: ");
+ in = scanner.nextInt();
+ }
+ Hammurabi.setBushelsOfGrain(Hammurabi.getBushelsOfGrain() + in * Hammurabi.getLandValue());
+ Hammurabi.setAcres(Hammurabi.getAcres() - in);
+ return in;
+ }
+ //Asks the player how many acres of land to sell, and returns that number. You can't sell more than you have.
+ //Do not ask this question if the player is buying land; it doesn't make sense to do both in one turn.
+
+ static int askHowMuchGrainToFeedPeople(int bushels) {
+
+ System.out.println("How many bushels do you wish to feed your people?");
+ int in = scanner.nextInt();
+ while (in > bushels ) {
+ System.out.println("Hammurabi: Think again. You have only " + Hammurabi.getBushelsOfGrain() + " of grain.");
+ System.out.println("Re-enter the numbers of bushels you wish to feed people: ");
+ in = scanner.nextInt();
+ }
+
+ Hammurabi.setBushelsOfGrain(Hammurabi.getBushelsOfGrain() - in);
+ return in;
+ }
+
+ //Ask the player how much grain to feed people,
+ // and returns that number. You can't feed them more grain than you have.
+ // You can feed them more than they need to survive.
+
+ static int askHowManyAcresToPlant(int acresOwned, int population, int bushels) {
+ System.out.println("How many acres do you wish to plant with seed?");
+ int in = scanner.nextInt();
+ while (in > acresOwned || in > bushels || in>population*10) {
+ System.out.println("Hammurabi: Think again. You have only " + Hammurabi.getBushelsOfGrain() + " of grain. ");
+ System.out.println("Re-enter the numbers of acres you wish to plant with seed: ");
+ in = scanner.nextInt();
+ }
+
+ Hammurabi.setBushelsOfGrain(Hammurabi.getBushelsOfGrain() - in);
+ return in;
+ }
+ // Return true if more than 45% of the people starve. (This will cause you to be immediately thrown out of office, ending the game.)
+
+ static int immigrants(int population, int acresOwned, int grainInStorage) {
+
+ if (Hammurabi.getStarving() == 0) {
+ Hammurabi.setImmigrants((20 * acresOwned + grainInStorage) / (100 * population) + 1);
+ }
+ Hammurabi.setPeople(Hammurabi.getPeople() + Hammurabi.getImmigrants());
+ return Hammurabi.getImmigrants();
+ /*
+ if(starvationDeaths(population,grainInStorage)>0){
+ return 0;
+ }else{
+ return (20*acresOwned+grainInStorage)/(100*population)+1;
+ }
+ */
+
+ }
+
+ //Nobody will come to the city if people are starving (so don't call this method).
+ // If everyone is well fed, compute how many people come to the city as:
+ // (20 * _number of acres you have_ + _amount of grain you have in storage_) / (100 * _population_) + 1.
+
+ static int harvest(int acres, int bushelsUsedAsSeed) {
+
+ Hammurabi.setBushelsPerAcre(rand.nextInt(6) + 1);
+ Hammurabi.setHarvest(Hammurabi.getBushelsPerAcre() * acres);
+ Hammurabi.setBushelsOfGrain(Hammurabi.getBushelsOfGrain() - bushelsUsedAsSeed + Hammurabi.getHarvest());
+ return Hammurabi.getHarvest();
+
+ }
+
+ //Choose a random integer between 1 and 6, inclusive. Each acre that was planted with seed will yield this many bushels of grain.
+ // (Example: if you planted 50 acres, and your number is 3, you harvest 150 bushels of grain). Return the number of bushels harvested.
+
+ static int grainEatenByRats(int bushels) {
+ boolean ratInfestation = false;
+ int ratEaten = 0;
+ if (rand.nextFloat() * 100 <= 40) {
+ ratInfestation = true;
+ }
+ if (ratInfestation) {
+ ratEaten = bushels * (rand.nextInt(31 - 10) + 10) / 100;
+ }
+
+ Hammurabi.setRatEaten(ratEaten);
+ return Hammurabi.getRatEaten();
+ }
+
+ //There is a 40% chance that you will have a rat infestation. When this happens, rats will eat somewhere between 10% and 30% of your grain. Return the amount of grain eaten by rats (possibly zero).
+
+ static int newCostOfLand() {
+ int min = 17, max = 24;
+ Hammurabi.setLandValue(rand.nextInt(max - min) + min);
+ return Hammurabi.getLandValue();
+ }
+
+}
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..d789654
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,25 @@
+
+
+ 4.0.0
+
+ io.zipcoder
+ MicroLabs-Loops
+ 1.0-SNAPSHOT
+
+
+
+
+ junit
+ junit
+ 4.13.2
+
+
+
+
+
+ 1.8
+ 1.8
+
+
\ No newline at end of file
diff --git a/target/classes/.gitignore b/target/classes/.gitignore
new file mode 100644
index 0000000..a1c2a23
--- /dev/null
+++ b/target/classes/.gitignore
@@ -0,0 +1,23 @@
+# Compiled class file
+*.class
+
+# Log file
+*.log
+
+# BlueJ files
+*.ctxt
+
+# Mobile Tools for Java (J2ME)
+.mtj.tmp/
+
+# Package Files #
+*.jar
+*.war
+*.nar
+*.ear
+*.zip
+*.tar.gz
+*.rar
+
+# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
+hs_err_pid*
diff --git a/target/classes/.idea/.gitignore b/target/classes/.idea/.gitignore
new file mode 100644
index 0000000..26d3352
--- /dev/null
+++ b/target/classes/.idea/.gitignore
@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml
diff --git a/target/classes/.idea/compiler.xml b/target/classes/.idea/compiler.xml
new file mode 100644
index 0000000..639314b
--- /dev/null
+++ b/target/classes/.idea/compiler.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/target/classes/.idea/jarRepositories.xml b/target/classes/.idea/jarRepositories.xml
new file mode 100644
index 0000000..712ab9d
--- /dev/null
+++ b/target/classes/.idea/jarRepositories.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/target/classes/.idea/libraries/Maven__junit_junit_4_13_2.xml b/target/classes/.idea/libraries/Maven__junit_junit_4_13_2.xml
new file mode 100644
index 0000000..606c352
--- /dev/null
+++ b/target/classes/.idea/libraries/Maven__junit_junit_4_13_2.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/target/classes/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml b/target/classes/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml
new file mode 100644
index 0000000..f58bbc1
--- /dev/null
+++ b/target/classes/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/target/classes/.idea/misc.xml b/target/classes/.idea/misc.xml
new file mode 100644
index 0000000..bcd41e5
--- /dev/null
+++ b/target/classes/.idea/misc.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/target/classes/.idea/modules.xml b/target/classes/.idea/modules.xml
new file mode 100644
index 0000000..16ae36c
--- /dev/null
+++ b/target/classes/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/target/classes/.idea/vcs.xml b/target/classes/.idea/vcs.xml
new file mode 100644
index 0000000..35eb1dd
--- /dev/null
+++ b/target/classes/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/target/classes/Hamurabi.iml b/target/classes/Hamurabi.iml
new file mode 100644
index 0000000..903044c
--- /dev/null
+++ b/target/classes/Hamurabi.iml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/target/classes/LICENSE b/target/classes/LICENSE
new file mode 100644
index 0000000..22474e4
--- /dev/null
+++ b/target/classes/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2022 Zip Code Wilmington Core
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/target/classes/README.md b/target/classes/README.md
new file mode 100644
index 0000000..e4672c9
--- /dev/null
+++ b/target/classes/README.md
@@ -0,0 +1,228 @@
+# hamurabi
+an ancient (in more ways than one) computer game (text)
+
+## General idea of the lab
+
+*Hammurabi* is a very old computer game (like about as old as Kris). Your job is to bring it into the 21st century by writing it in Java.
+
+Here are the standard instructions for the game:
+
+> **Congratulations, you are the newest ruler of ancient Sumer, elected for a ten year term of office. Your duties are to dispense food, direct farming, and buy and sell land as needed to support your people. Watch out for rat infestiations and the plague! Grain is the general currency, measured in bushels. The following will help you in your decisions:**
+>
+> * **Each person needs at least 20 bushels of grain per year to survive**
+> * **Each person can farm at most 10 acres of land**
+> * **It takes 2 bushels of grain to farm an acre of land**
+> * **The market price for land fluctuates yearly**
+>
+> **Rule wisely and you will be showered with appreciation at the end of your term. Rule poorly and you will be kicked out of office!**
+
+### Maven
+
+There is NO `pom.xml` file in this repo. You need to add that. Use `vscode` or `IntelliJ` to make sure your project is a Maven project with a POM file.
+
+### Details
+
+Define a single class named `Hammurabi`. Use the following skeleton (but leave out the `//` comments):
+
+```java
+package hammurabi; // package declaration
+import java.util.Random; // imports go here
+import java.util.Scanner;
+
+public class Hammurabi { // must save in a file named Hammurabi.java
+ Random rand = new Random(); // this is an instance variable
+ Scanner scanner = new Scanner(System.in);
+
+ public static void main(String\[\] args) { // required in every Java program
+ new Hammurabi().playGame();
+ }
+
+ void playGame() {
+ // declare local variables here: grain, population, etc.
+ // statements go after the declations
+ }
+
+ //other methods go here
+}
+```
+
+### Playing the game
+
+Here is what you start the game with:
+
+* 100 people
+* 2800 bushels of grain in storage
+* 1000 acres of land
+* Land value is 19 bushels/acre
+
+
+Each year, print out a summary similar to the following:
+
+ O great Hammurabi!
+ You are in year 1 of your ten year rule.
+ In the previous year 0 people starved to death.
+ In the previous year 5 people entered the kingdom.
+ The population is now 100.
+ We harvested 3000 bushels at 3 bushels per acre.
+ Rats destroyed 200 bushels, leaving 2800 bushels in storage.
+ The city owns 1000 acres of land.
+ Land is currently worth 19 bushels per acre.
+
+The above summary represents the initial state, at the _beginning_ of the first year--that is, when you first take office, and before you do any of the computations below). So, for example, the previous year (under a different ruler) must have started with 95 people; none starved, and 5 entered the kingdom, so as you enter office you rule 100 people.
+
+Here's what your `playGame` method needs to do each year, for up to 10 years:
+
+> Ask the player the following questions. These questions should be asked **in this order.** Do **not** give the player a chance to "back up" and change a previous answer. Each question should be asked in a separate method, and the answer returned as the value of the method, as specified below:
+>
+> `int askHowManyAcresToBuy(int price, int bushels)`
+>
+> Asks the player how many acres of land to buy, and returns that number. You must have enough grain to pay for your purchase.
+>
+> `
+> int askHowManyAcresToSell(int acresOwned)`
+>
+> Asks the player how many acres of land to sell, and returns that number. You can't sell more than you have.
+> Do not ask this question if the player is buying land; it doesn't make sense to do both in one turn.
+>
+> `
+> int askHowMuchGrainToFeedPeople(int bushels)`
+>
+> Ask the player how much grain to feed people, and returns that number. You can't feed them more grain than you have. You **can** feed them more than they need to survive.
+>
+> `
+> int askHowManyAcresToPlant(int acresOwned, int population, int bushels)`
+>
+> Ask the player how many acres to plant with grain, and returns that number. You must have enough acres, enough grain, and enough people to do the planting. Any grain left over goes into storage for next year.
+>
+> For each question, do "sanity checking"; that is, test whether the answer is possible (you have enough grain, you have enough people to do the planting etc.), and keep asking until you get a possible value. (For example, `O Great Hammurabi, surely you jest! We have only 3415 bushels left!`)
+>
+> Then the method needs to determine:
+>
+> 1. If there is a plague, and how many people die from it.
+> 2. How many people starved.
+> 3. How many people came to the city.
+> 4. How good the harvest is.
+> 5. If you have a problem with rats, and how much grain they eat.
+> 6. How much land costs (for deciding what to do next).
+>
+> These can all be local variables of your `playGame` method.
+>
+> Use the following methods, **in this order,** to make the necessary calculations:
+>
+> `int plagueDeaths(int population)`
+>
+> Each year, there is a 15% chance of a horrible plague. When this happens, half your people die. Return the number of plague deaths (possibly zero).
+>
+> `
+> int starvationDeaths(int population, int bushelsFedToPeople)`
+>
+> Each person needs 20 bushels of grain to survive. If you feed them more than this, they are happy, but the grain is still gone. You don't get any benefit from having happy subjects. Return the number of deaths from starvation (possibly zero).
+>
+> `
+> boolean uprising(int population, int howManyPeopleStarved)`
+>
+> Return `true` if more than 45% of the people starve. (This will cause you to be immediately thrown out of office, ending the game.)
+>
+> `
+> int immigrants(int population, int acresOwned, int grainInStorage)`
+>
+> Nobody will come to the city if people are starving (so don't call this method). If everyone is well fed, compute how many people come to the city as: `(20 * _number of acres you have_ + _amount of grain you have in storage_) / (100 * _population_) + 1`.
+>
+> `
+> int harvest(int acres, int bushelsUsedAsSeed)`
+>
+> Choose a random integer between 1 and 6, inclusive. Each acre that was planted with seed will yield this many bushels of grain. (Example: if you planted 50 acres, and your number is 3, you harvest 150 bushels of grain). Return the number of bushels harvested.
+>
+> `
+> int grainEatenByRats(int bushels)`
+>
+> There is a 40% chance that you will have a rat infestation. When this happens, rats will eat somewhere between 10% and 30% of your grain. Return the amount of grain eaten by rats (possibly zero).
+>
+> `
+> int newCostOfLand()`
+>
+> The price of land is random, and ranges from 17 to 23 bushels per acre. Return the new price for the next set of decisions the player has to make. (The player will need this information in order to buy or sell land.)
+
+Do these computations, _in this order,_ for each of ten years. Each computation should be done in a separate method, and none of these methods should read anything or print anything. Since most methods change the amount of grain available, you will need to keep this information in a variable so it is available to the next method that needs it.
+
+When the computations are finished, call a method `printSummary` to print the summary for the year. This method will take several parameters.
+
+When the game ends, use a method `finalSummary` to print out a final summary, and to tell the player how good a job he/she did. I'll leave the details up to you, but the usual evaluation is based on how many people starved, and how many acres per person you end up with.
+
+Your `playGame` method will be quite long, but very straightforward; it does very little but call other methods.
+
+All the required arithmetic in this program should be **integer**. You do not need doubles.
+
+### Urgent!
+
+> It is **strongly** suggest that you first get the *simplest possible version of the program running* and tested out (that is, leave out things like rats, plagues, and immigration), then add these things one at a time to a _working_ program, **testing as you go**.
+
+### Things you need to know:
+
+#### Random numbers
+
+To get a random number generator, you first need to import `java.util.Random` (or `java.util.*`). Then, you can create a random number generator with a statement such as:
+
+> `static Random rand = new Random();`
+
+To get a new random number in the range `0..n-1`, where `n` is an `int`, call `rand.nextInt(n)`. To get a new random number in the range `min..max`, use the expression `rand.nextInt(max - min + 1) + min`. You can use the `rand` method in statements such as
+
+> `myNewNumber = rand.nextInt(5);
+> if (rand.nextInt(100) < 15) { ... }`
+
+To do something that happens `p` percent of the time, use
+
+> `if (rand.nextInt(100) < p) { _...do something..._ }`
+
+#### Getting input
+
+To get a number from the player, add this method to your program:
+
+```java
+ /**
+ * Prints the given message (which should ask the user for some integral
+ * quantity), and returns the number entered by the user. If the user's
+ * response isn't an integer, the question is repeated until the user
+ * does give a integer response.
+ *
+ * @param message The request to present to the user.
+ * @return The user's numeric response.
+ */
+ int getNumber(String message) {
+ while (true) {
+ System.out.print(message);
+ try {
+ return scanner.nextInt();
+ }
+ catch (InputMismatchException e) {
+ System.out.println("\"" + scanner.next() + "\" isn't a number!");
+ }
+ }
+ }
+```
+
+Here is an example of how you can use this method:
+
+> `sell = getNumber("O great Hammurabi, how many acres shall you sell?");`
+
+### Structure of the solution
+
+* Project name: `Hammurabi`
+* Package name: `hammurabi`
+* Class names and method signatures:
+ * `class Hammurabi`
+ * `public static void main(String[] args)`
+ * Numerous other methods, as described above.
+
+The above are requirements. **The methods that do calculations**, not input/output, **will be tested by the test methods in the test class**, so be sure to get the spelling, capitalization, and number and types of arguments correct (argument _names_ are irrelevant). You may have additional methods if you wish.
+
+### Yo! Test it!
+
+You'll see there is a Test File (HammurabiTest.java) you need to be able to run against your code to prove your solution works. Use It!!
+
+But realize that you'll have to structure your solution so that app classes are in one source direstory and your test files is in another. Study your other labs to figure out what to do.
+
+### Credits
+
+Adapted from: CIT 591 Assignment 3: Hammurabi, Fall 2010, David Matuszek (this guy is a Rock Star)
+
diff --git a/target/classes/docs/matuszek/06-hammurabi.html b/target/classes/docs/matuszek/06-hammurabi.html
new file mode 100644
index 0000000..78bbf24
--- /dev/null
+++ b/target/classes/docs/matuszek/06-hammurabi.html
@@ -0,0 +1,299 @@
+
+
+
+
+
+
+ CIT591 Hammurabi
+
+
+
+
+
+
CIT 591 Assignment 3:
+ Hammurabi
+ Fall 2010, David Matuszek
+
+
Purpose of this assignment
+
+
+
To get you started using Java.
+
+
+
General idea of the assignment
+
+
Hammurabi is a very old computer game. Your job is to bring it into the
+ 21st century by writing it in Java.
+
+
Here are the standard instructions for the game:
+
+
+
Congratulations, you are the newest ruler of
+ ancient Samaria, elected for a ten year term of office. Your duties are to
+ dispense food, direct farming, and buy and sell land as needed to support
+ your people. Watch out for rat infestiations and the plague! Grain is the
+ general currency, measured in bushels. The following will help you in your
+ decisions:
+
+
+
Each person needs at least 20 bushels of
+ grain per year to survive
+
+
Each person can farm at most 10 acres of
+ land
+
+
It takes 2 bushels of grain to farm an acre
+ of land
+
+
The market price for land fluctuates
+ yearly
+
+
+
Rule wisely and you will be showered with
+ appreciation at the end of your term. Rule poorly and you will be kicked
+ out of office!
+
+
+
Details
+
+
Define a single class named Hammurabi. Use the following skeleton (but leave out the // comments):
+
package hammurabi; // package declaration
+
+import java.util.Random; // imports go here
+import java.util.Scanner;
+
+/**
+ * The Hammurabi game.
+ * @author Your name goes here
+ * @author Your partner's name goes here
+ */
+public class Hammurabi { // must save in a file named Hammurabi.java
+ Random rand = new Random(); // this is an instance variable
+ Scanner scanner = new Scanner(System.in);
+
+ public static void main(String[] args) { // required in every Java program
+ new Hammurabi().playGame();
+ }
+
+ void playGame() {
+ // declare local variables here: grain, population, etc.
+ // statements go after the declations
+ }
+
+ //other methods go here
+}
+
Playing the game
+
Here is what you start the game with:
+
+
100 people
+
2800 bushels of grain in storage
+
1000 acres of land
+
Land value is 19 bushels/acre
+
+
+
Each year, print out a summary similar to the following:
+
+O great Hammurabi!
+You are in year 1 of your ten year rule.
+In the previous year 0 people starved to death.
+In the previous year 5 people entered the kingdom.
+The population is now 100.
+We harvested 3000 bushels at 3 bushels per acre.
+Rats destroyed 200 bushels, leaving 2800 bushels in storage.
+The city owns 1000 acres of land.
+Land is currently worth 19 bushels per acre.
+
+
+
The above summary represents the initial state, at the beginning of
+ the first year--that is, when you first take office, and before you do any of
+ the computations below). So, for example, the previous year (under a
+ different ruler) must have started with 95 people; none starved, and 5
+ entered the kingdom, so as you enter office you rule 100 people.
+
+
Here's what your playGame method needs to do each year, for up to 10 years:
+
+
+
Ask the player the following questions. These questions should be asked in this order. Do not give the player a chance to "back up" and change a previous answer. Each question should be asked in a separate method, and the answer returned as the value of the method, as specified below:
+
+
int askHowManyAcresToBuy(int price, int bushels)
+
Asks the player how many acres of land to buy, and returns that number. You must have enough grain to pay for your purchase.
+
+ int askHowManyAcresToSell(int acresOwned)
+
Asks the player how many acres of land to sell, and returns that number. You can't sell more than you have.
+ Do not ask this question if the player is buying land; it doesn't make sense to do both in one turn.
+
+ int askHowMuchGrainToFeedPeople(int bushels)
+
Ask the player how much grain to feed people, and returns that number. You can't feed them more grain than you have. You can feed them more than they need to survive.
+
+ int askHowManyAcresToPlant(int acresOwned, int population, int bushels)
+
Ask the player how many acres to plant with grain, and returns that number. You must have enough acres, enough grain, and enough people to do the planting. Any grain left over goes into storage for next year.
+
+
For each
+ question, do "sanity checking"; that is, test whether the answer is
+ possible (you have enough grain, you have enough people to do the planting
+ etc.), and keep asking until you get a possible value. (For example,
+ O Great Hammurabi, surely you jest! We have only 3415 bushels left!)
+
+
Then the method needs to determine:
+
+
+
If there is a plague, and how many people die from it.
+
How many people starved.
+
How many people came to the city.
+
How good the harvest is.
+
If you have a problem with rats, and how much grain they eat.
+
How much land costs (for deciding what to do next).
+
+
These can all be local variables of your playGame method.
+
Use the following methods, in this order, to make the necessary calculations:
+
+
int plagueDeaths(int population)
+
Each year, there is a 15% chance of a horrible plague. When this
+ happens, half your people die. Return the number of plague deaths (possibly zero).
+
+ int starvationDeaths(int population, int bushelsFedToPeople)
+
Each person needs 20 bushels of grain to survive. If you feed them
+ more than this, they are happy, but the grain is still gone. You don't get any benefit from having happy subjects. Return the number of deaths from starvation (possibly zero).
+
+ boolean uprising(int population, int howManyPeopleStarved)
+
Return true if more than
+ 45% of the people starve. (This will cause you to be immediately thrown out of office, ending the game.)
+
+ int immigrants(int population, int acresOwned, int grainInStorage)
+
Nobody will come to the city if people are starving (so don't call this method). If everyone is
+ well fed, compute how many people come to the city as: (20 * number of acres you have + amount of grain you have in
+ storage) / (100 * population) + 1.
+
+ int harvest(int acres, int bushelsUsedAsSeed)
+
Choose a random integer between 1 and 6, inclusive. Each acre that was planted
+ with seed will yield this many bushels of grain. (Example: if you planted
+ 50 acres, and your number is 3, you harvest 150 bushels of grain). Return the number of bushels harvested.
+
+ int grainEatenByRats(int bushels)
+
There is a 40% chance that you will have a rat infestation. When this
+ happens, rats will eat somewhere between 10% and 30% of your
+ grain. Return the amount of grain eaten by rats (possibly zero).
+
+ int newCostOfLand()
+
The price of land is random, and ranges from 17 to 23 bushels per
+ acre. Return the new price for the next set of decisions the player has to make. (The player will need this information in order to buy or sell
+ land.)
+
+
+
Do these computations, in this order, for each of ten years. Each
+ computation should be done in a separate method, and none of these methods
+ should read anything or print anything. Since most methods change the amount of grain available, you will need to keep this information in a variable so it is available to the next method that needs it.
+
+
When the computations are finished, call a method printSummary to print the
+ summary for the year. This method will take several parameters.
+
+
+
When the game ends , use a method finalSummary to print out a final summary, and to tell the
+ player how good a job he/she did. I'll leave the details up to you, but the
+ usual evaluation is based on how many people starved, and how many acres per
+ person you end up with.
+
Your playGame method will be quite long, but very straightforward; it does very little but call other methods.
+
All the required arithmetic in this program should be integer. You
+ do not need doubles.
+
+
I suggest that you first get the simplest possible version of the program
+ running and tested out (that is, leave out things like rats, plagues, and
+ immigration), then add these things one at a time to a working
+ program, testing as you go.
+
+
Things you need to know:
+
+
Random numbers
+
+
To get a random number generator, you first need to import
+ java.util.Random (or java.util.*). Then, you can
+ create a random number generator with a statement such as:
+
+
+
static Random rand = new Random();
+
+
+
To get a new random number in the range 0..n-1, where
+ n is an int, call rand.nextInt(n).
+ To get a new random number in the range min..max, use
+ the expression rand.nextInt(max - min + 1) + min. You
+ can use the rand method in statements such as
To do something that happens p percent of the time, use
+
+
+
if (rand.nextInt(100) < p) { ...do something...
+ }
+
+
+
Getting input
+
To get a number from the player, add this method to your program:
+
+/**
+ * Prints the given message (which should ask the user for some integral
+ * quantity), and returns the number entered by the user. If the user's
+ * response isn't an integer, the question is repeated until the user
+ * does give a integer response.
+ *
+ * @param message The request to present to the user.
+ * @return The user's numeric response.
+ */
+ int getNumber(String message) {
+ while (true) {
+ System.out.print(message);
+ try {
+ return scanner.nextInt();
+ }
+ catch (InputMismatchException e) {
+ System.out.println("\"" + scanner.next() + "\" isn't a number!");
+ }
+ }
+}
+
+
+
Here is an example of how you can use this method:
+
+
+
sell = getNumber("O great Hammurabi, how many acres shall you sell?");
+
+
+
Structure of the assignment:
+
+
+
Project name: Hammurabi
+
+
Package name: hammurabi
+
+
Class names and method signatures:
+
+
+
+ class Hammurabi
+
+
+
public static void main(String[] args)
+
+
Numerous other methods, as described above.
+
+
+
+
+
+
+
+
The above are requirements. The methods that do calculations, not input/output, will be tested by my test methods, so be sure to get the spelling, capitalization, and number and types of arguments correct (argument names are irrelevant). You may have additional methods if you wish.
+
+
Due date:
+
+
Thursday, October 21, before midnight. Turn in your zipped assignment via
+ Blackboard. Email submissions will incur the wrath of Hammurabi (and won't be graded).
+
+
+
diff --git a/target/classes/docs/matuszek/README..md b/target/classes/docs/matuszek/README..md
new file mode 100644
index 0000000..796d85c
--- /dev/null
+++ b/target/classes/docs/matuszek/README..md
@@ -0,0 +1,6 @@
+# Notes
+
+from the original Dave Matuszek course of 2010.
+
+https://www.cis.upenn.edu/~matuszek/cit591-2010/Assignments/06-hammurabi.html
+
diff --git a/target/classes/pom.xml b/target/classes/pom.xml
new file mode 100644
index 0000000..d789654
--- /dev/null
+++ b/target/classes/pom.xml
@@ -0,0 +1,25 @@
+
+
+ 4.0.0
+
+ io.zipcoder
+ MicroLabs-Loops
+ 1.0-SNAPSHOT
+
+
+
+
+ junit
+ junit
+ 4.13.2
+
+
+
+
+
+ 1.8
+ 1.8
+
+
\ No newline at end of file
diff --git a/target/classes/target/classes/.gitignore b/target/classes/target/classes/.gitignore
new file mode 100644
index 0000000..a1c2a23
--- /dev/null
+++ b/target/classes/target/classes/.gitignore
@@ -0,0 +1,23 @@
+# Compiled class file
+*.class
+
+# Log file
+*.log
+
+# BlueJ files
+*.ctxt
+
+# Mobile Tools for Java (J2ME)
+.mtj.tmp/
+
+# Package Files #
+*.jar
+*.war
+*.nar
+*.ear
+*.zip
+*.tar.gz
+*.rar
+
+# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
+hs_err_pid*
diff --git a/target/classes/target/classes/.idea/.gitignore b/target/classes/target/classes/.idea/.gitignore
new file mode 100644
index 0000000..26d3352
--- /dev/null
+++ b/target/classes/target/classes/.idea/.gitignore
@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml
diff --git a/target/classes/target/classes/.idea/compiler.xml b/target/classes/target/classes/.idea/compiler.xml
new file mode 100644
index 0000000..639314b
--- /dev/null
+++ b/target/classes/target/classes/.idea/compiler.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/target/classes/target/classes/.idea/jarRepositories.xml b/target/classes/target/classes/.idea/jarRepositories.xml
new file mode 100644
index 0000000..712ab9d
--- /dev/null
+++ b/target/classes/target/classes/.idea/jarRepositories.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/target/classes/target/classes/.idea/libraries/Maven__junit_junit_4_13_2.xml b/target/classes/target/classes/.idea/libraries/Maven__junit_junit_4_13_2.xml
new file mode 100644
index 0000000..606c352
--- /dev/null
+++ b/target/classes/target/classes/.idea/libraries/Maven__junit_junit_4_13_2.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/target/classes/target/classes/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml b/target/classes/target/classes/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml
new file mode 100644
index 0000000..f58bbc1
--- /dev/null
+++ b/target/classes/target/classes/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/target/classes/target/classes/.idea/modules.xml b/target/classes/target/classes/.idea/modules.xml
new file mode 100644
index 0000000..16ae36c
--- /dev/null
+++ b/target/classes/target/classes/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/target/classes/target/classes/.idea/vcs.xml b/target/classes/target/classes/.idea/vcs.xml
new file mode 100644
index 0000000..35eb1dd
--- /dev/null
+++ b/target/classes/target/classes/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/target/classes/target/classes/Hamurabi.iml b/target/classes/target/classes/Hamurabi.iml
new file mode 100644
index 0000000..903044c
--- /dev/null
+++ b/target/classes/target/classes/Hamurabi.iml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/target/classes/target/classes/LICENSE b/target/classes/target/classes/LICENSE
new file mode 100644
index 0000000..22474e4
--- /dev/null
+++ b/target/classes/target/classes/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2022 Zip Code Wilmington Core
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/target/classes/target/classes/README.md b/target/classes/target/classes/README.md
new file mode 100644
index 0000000..e4672c9
--- /dev/null
+++ b/target/classes/target/classes/README.md
@@ -0,0 +1,228 @@
+# hamurabi
+an ancient (in more ways than one) computer game (text)
+
+## General idea of the lab
+
+*Hammurabi* is a very old computer game (like about as old as Kris). Your job is to bring it into the 21st century by writing it in Java.
+
+Here are the standard instructions for the game:
+
+> **Congratulations, you are the newest ruler of ancient Sumer, elected for a ten year term of office. Your duties are to dispense food, direct farming, and buy and sell land as needed to support your people. Watch out for rat infestiations and the plague! Grain is the general currency, measured in bushels. The following will help you in your decisions:**
+>
+> * **Each person needs at least 20 bushels of grain per year to survive**
+> * **Each person can farm at most 10 acres of land**
+> * **It takes 2 bushels of grain to farm an acre of land**
+> * **The market price for land fluctuates yearly**
+>
+> **Rule wisely and you will be showered with appreciation at the end of your term. Rule poorly and you will be kicked out of office!**
+
+### Maven
+
+There is NO `pom.xml` file in this repo. You need to add that. Use `vscode` or `IntelliJ` to make sure your project is a Maven project with a POM file.
+
+### Details
+
+Define a single class named `Hammurabi`. Use the following skeleton (but leave out the `//` comments):
+
+```java
+package hammurabi; // package declaration
+import java.util.Random; // imports go here
+import java.util.Scanner;
+
+public class Hammurabi { // must save in a file named Hammurabi.java
+ Random rand = new Random(); // this is an instance variable
+ Scanner scanner = new Scanner(System.in);
+
+ public static void main(String\[\] args) { // required in every Java program
+ new Hammurabi().playGame();
+ }
+
+ void playGame() {
+ // declare local variables here: grain, population, etc.
+ // statements go after the declations
+ }
+
+ //other methods go here
+}
+```
+
+### Playing the game
+
+Here is what you start the game with:
+
+* 100 people
+* 2800 bushels of grain in storage
+* 1000 acres of land
+* Land value is 19 bushels/acre
+
+
+Each year, print out a summary similar to the following:
+
+ O great Hammurabi!
+ You are in year 1 of your ten year rule.
+ In the previous year 0 people starved to death.
+ In the previous year 5 people entered the kingdom.
+ The population is now 100.
+ We harvested 3000 bushels at 3 bushels per acre.
+ Rats destroyed 200 bushels, leaving 2800 bushels in storage.
+ The city owns 1000 acres of land.
+ Land is currently worth 19 bushels per acre.
+
+The above summary represents the initial state, at the _beginning_ of the first year--that is, when you first take office, and before you do any of the computations below). So, for example, the previous year (under a different ruler) must have started with 95 people; none starved, and 5 entered the kingdom, so as you enter office you rule 100 people.
+
+Here's what your `playGame` method needs to do each year, for up to 10 years:
+
+> Ask the player the following questions. These questions should be asked **in this order.** Do **not** give the player a chance to "back up" and change a previous answer. Each question should be asked in a separate method, and the answer returned as the value of the method, as specified below:
+>
+> `int askHowManyAcresToBuy(int price, int bushels)`
+>
+> Asks the player how many acres of land to buy, and returns that number. You must have enough grain to pay for your purchase.
+>
+> `
+> int askHowManyAcresToSell(int acresOwned)`
+>
+> Asks the player how many acres of land to sell, and returns that number. You can't sell more than you have.
+> Do not ask this question if the player is buying land; it doesn't make sense to do both in one turn.
+>
+> `
+> int askHowMuchGrainToFeedPeople(int bushels)`
+>
+> Ask the player how much grain to feed people, and returns that number. You can't feed them more grain than you have. You **can** feed them more than they need to survive.
+>
+> `
+> int askHowManyAcresToPlant(int acresOwned, int population, int bushels)`
+>
+> Ask the player how many acres to plant with grain, and returns that number. You must have enough acres, enough grain, and enough people to do the planting. Any grain left over goes into storage for next year.
+>
+> For each question, do "sanity checking"; that is, test whether the answer is possible (you have enough grain, you have enough people to do the planting etc.), and keep asking until you get a possible value. (For example, `O Great Hammurabi, surely you jest! We have only 3415 bushels left!`)
+>
+> Then the method needs to determine:
+>
+> 1. If there is a plague, and how many people die from it.
+> 2. How many people starved.
+> 3. How many people came to the city.
+> 4. How good the harvest is.
+> 5. If you have a problem with rats, and how much grain they eat.
+> 6. How much land costs (for deciding what to do next).
+>
+> These can all be local variables of your `playGame` method.
+>
+> Use the following methods, **in this order,** to make the necessary calculations:
+>
+> `int plagueDeaths(int population)`
+>
+> Each year, there is a 15% chance of a horrible plague. When this happens, half your people die. Return the number of plague deaths (possibly zero).
+>
+> `
+> int starvationDeaths(int population, int bushelsFedToPeople)`
+>
+> Each person needs 20 bushels of grain to survive. If you feed them more than this, they are happy, but the grain is still gone. You don't get any benefit from having happy subjects. Return the number of deaths from starvation (possibly zero).
+>
+> `
+> boolean uprising(int population, int howManyPeopleStarved)`
+>
+> Return `true` if more than 45% of the people starve. (This will cause you to be immediately thrown out of office, ending the game.)
+>
+> `
+> int immigrants(int population, int acresOwned, int grainInStorage)`
+>
+> Nobody will come to the city if people are starving (so don't call this method). If everyone is well fed, compute how many people come to the city as: `(20 * _number of acres you have_ + _amount of grain you have in storage_) / (100 * _population_) + 1`.
+>
+> `
+> int harvest(int acres, int bushelsUsedAsSeed)`
+>
+> Choose a random integer between 1 and 6, inclusive. Each acre that was planted with seed will yield this many bushels of grain. (Example: if you planted 50 acres, and your number is 3, you harvest 150 bushels of grain). Return the number of bushels harvested.
+>
+> `
+> int grainEatenByRats(int bushels)`
+>
+> There is a 40% chance that you will have a rat infestation. When this happens, rats will eat somewhere between 10% and 30% of your grain. Return the amount of grain eaten by rats (possibly zero).
+>
+> `
+> int newCostOfLand()`
+>
+> The price of land is random, and ranges from 17 to 23 bushels per acre. Return the new price for the next set of decisions the player has to make. (The player will need this information in order to buy or sell land.)
+
+Do these computations, _in this order,_ for each of ten years. Each computation should be done in a separate method, and none of these methods should read anything or print anything. Since most methods change the amount of grain available, you will need to keep this information in a variable so it is available to the next method that needs it.
+
+When the computations are finished, call a method `printSummary` to print the summary for the year. This method will take several parameters.
+
+When the game ends, use a method `finalSummary` to print out a final summary, and to tell the player how good a job he/she did. I'll leave the details up to you, but the usual evaluation is based on how many people starved, and how many acres per person you end up with.
+
+Your `playGame` method will be quite long, but very straightforward; it does very little but call other methods.
+
+All the required arithmetic in this program should be **integer**. You do not need doubles.
+
+### Urgent!
+
+> It is **strongly** suggest that you first get the *simplest possible version of the program running* and tested out (that is, leave out things like rats, plagues, and immigration), then add these things one at a time to a _working_ program, **testing as you go**.
+
+### Things you need to know:
+
+#### Random numbers
+
+To get a random number generator, you first need to import `java.util.Random` (or `java.util.*`). Then, you can create a random number generator with a statement such as:
+
+> `static Random rand = new Random();`
+
+To get a new random number in the range `0..n-1`, where `n` is an `int`, call `rand.nextInt(n)`. To get a new random number in the range `min..max`, use the expression `rand.nextInt(max - min + 1) + min`. You can use the `rand` method in statements such as
+
+> `myNewNumber = rand.nextInt(5);
+> if (rand.nextInt(100) < 15) { ... }`
+
+To do something that happens `p` percent of the time, use
+
+> `if (rand.nextInt(100) < p) { _...do something..._ }`
+
+#### Getting input
+
+To get a number from the player, add this method to your program:
+
+```java
+ /**
+ * Prints the given message (which should ask the user for some integral
+ * quantity), and returns the number entered by the user. If the user's
+ * response isn't an integer, the question is repeated until the user
+ * does give a integer response.
+ *
+ * @param message The request to present to the user.
+ * @return The user's numeric response.
+ */
+ int getNumber(String message) {
+ while (true) {
+ System.out.print(message);
+ try {
+ return scanner.nextInt();
+ }
+ catch (InputMismatchException e) {
+ System.out.println("\"" + scanner.next() + "\" isn't a number!");
+ }
+ }
+ }
+```
+
+Here is an example of how you can use this method:
+
+> `sell = getNumber("O great Hammurabi, how many acres shall you sell?");`
+
+### Structure of the solution
+
+* Project name: `Hammurabi`
+* Package name: `hammurabi`
+* Class names and method signatures:
+ * `class Hammurabi`
+ * `public static void main(String[] args)`
+ * Numerous other methods, as described above.
+
+The above are requirements. **The methods that do calculations**, not input/output, **will be tested by the test methods in the test class**, so be sure to get the spelling, capitalization, and number and types of arguments correct (argument _names_ are irrelevant). You may have additional methods if you wish.
+
+### Yo! Test it!
+
+You'll see there is a Test File (HammurabiTest.java) you need to be able to run against your code to prove your solution works. Use It!!
+
+But realize that you'll have to structure your solution so that app classes are in one source direstory and your test files is in another. Study your other labs to figure out what to do.
+
+### Credits
+
+Adapted from: CIT 591 Assignment 3: Hammurabi, Fall 2010, David Matuszek (this guy is a Rock Star)
+
diff --git a/target/classes/target/classes/pom.xml b/target/classes/target/classes/pom.xml
new file mode 100644
index 0000000..d789654
--- /dev/null
+++ b/target/classes/target/classes/pom.xml
@@ -0,0 +1,25 @@
+
+
+ 4.0.0
+
+ io.zipcoder
+ MicroLabs-Loops
+ 1.0-SNAPSHOT
+
+
+
+
+ junit
+ junit
+ 4.13.2
+
+
+
+
+
+ 1.8
+ 1.8
+
+
\ No newline at end of file
diff --git a/target/classes/target/classes/target/classes/.gitignore b/target/classes/target/classes/target/classes/.gitignore
new file mode 100644
index 0000000..a1c2a23
--- /dev/null
+++ b/target/classes/target/classes/target/classes/.gitignore
@@ -0,0 +1,23 @@
+# Compiled class file
+*.class
+
+# Log file
+*.log
+
+# BlueJ files
+*.ctxt
+
+# Mobile Tools for Java (J2ME)
+.mtj.tmp/
+
+# Package Files #
+*.jar
+*.war
+*.nar
+*.ear
+*.zip
+*.tar.gz
+*.rar
+
+# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
+hs_err_pid*
diff --git a/target/classes/target/classes/target/classes/LICENSE b/target/classes/target/classes/target/classes/LICENSE
new file mode 100644
index 0000000..22474e4
--- /dev/null
+++ b/target/classes/target/classes/target/classes/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2022 Zip Code Wilmington Core
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/target/classes/target/classes/target/classes/README.md b/target/classes/target/classes/target/classes/README.md
new file mode 100644
index 0000000..e4672c9
--- /dev/null
+++ b/target/classes/target/classes/target/classes/README.md
@@ -0,0 +1,228 @@
+# hamurabi
+an ancient (in more ways than one) computer game (text)
+
+## General idea of the lab
+
+*Hammurabi* is a very old computer game (like about as old as Kris). Your job is to bring it into the 21st century by writing it in Java.
+
+Here are the standard instructions for the game:
+
+> **Congratulations, you are the newest ruler of ancient Sumer, elected for a ten year term of office. Your duties are to dispense food, direct farming, and buy and sell land as needed to support your people. Watch out for rat infestiations and the plague! Grain is the general currency, measured in bushels. The following will help you in your decisions:**
+>
+> * **Each person needs at least 20 bushels of grain per year to survive**
+> * **Each person can farm at most 10 acres of land**
+> * **It takes 2 bushels of grain to farm an acre of land**
+> * **The market price for land fluctuates yearly**
+>
+> **Rule wisely and you will be showered with appreciation at the end of your term. Rule poorly and you will be kicked out of office!**
+
+### Maven
+
+There is NO `pom.xml` file in this repo. You need to add that. Use `vscode` or `IntelliJ` to make sure your project is a Maven project with a POM file.
+
+### Details
+
+Define a single class named `Hammurabi`. Use the following skeleton (but leave out the `//` comments):
+
+```java
+package hammurabi; // package declaration
+import java.util.Random; // imports go here
+import java.util.Scanner;
+
+public class Hammurabi { // must save in a file named Hammurabi.java
+ Random rand = new Random(); // this is an instance variable
+ Scanner scanner = new Scanner(System.in);
+
+ public static void main(String\[\] args) { // required in every Java program
+ new Hammurabi().playGame();
+ }
+
+ void playGame() {
+ // declare local variables here: grain, population, etc.
+ // statements go after the declations
+ }
+
+ //other methods go here
+}
+```
+
+### Playing the game
+
+Here is what you start the game with:
+
+* 100 people
+* 2800 bushels of grain in storage
+* 1000 acres of land
+* Land value is 19 bushels/acre
+
+
+Each year, print out a summary similar to the following:
+
+ O great Hammurabi!
+ You are in year 1 of your ten year rule.
+ In the previous year 0 people starved to death.
+ In the previous year 5 people entered the kingdom.
+ The population is now 100.
+ We harvested 3000 bushels at 3 bushels per acre.
+ Rats destroyed 200 bushels, leaving 2800 bushels in storage.
+ The city owns 1000 acres of land.
+ Land is currently worth 19 bushels per acre.
+
+The above summary represents the initial state, at the _beginning_ of the first year--that is, when you first take office, and before you do any of the computations below). So, for example, the previous year (under a different ruler) must have started with 95 people; none starved, and 5 entered the kingdom, so as you enter office you rule 100 people.
+
+Here's what your `playGame` method needs to do each year, for up to 10 years:
+
+> Ask the player the following questions. These questions should be asked **in this order.** Do **not** give the player a chance to "back up" and change a previous answer. Each question should be asked in a separate method, and the answer returned as the value of the method, as specified below:
+>
+> `int askHowManyAcresToBuy(int price, int bushels)`
+>
+> Asks the player how many acres of land to buy, and returns that number. You must have enough grain to pay for your purchase.
+>
+> `
+> int askHowManyAcresToSell(int acresOwned)`
+>
+> Asks the player how many acres of land to sell, and returns that number. You can't sell more than you have.
+> Do not ask this question if the player is buying land; it doesn't make sense to do both in one turn.
+>
+> `
+> int askHowMuchGrainToFeedPeople(int bushels)`
+>
+> Ask the player how much grain to feed people, and returns that number. You can't feed them more grain than you have. You **can** feed them more than they need to survive.
+>
+> `
+> int askHowManyAcresToPlant(int acresOwned, int population, int bushels)`
+>
+> Ask the player how many acres to plant with grain, and returns that number. You must have enough acres, enough grain, and enough people to do the planting. Any grain left over goes into storage for next year.
+>
+> For each question, do "sanity checking"; that is, test whether the answer is possible (you have enough grain, you have enough people to do the planting etc.), and keep asking until you get a possible value. (For example, `O Great Hammurabi, surely you jest! We have only 3415 bushels left!`)
+>
+> Then the method needs to determine:
+>
+> 1. If there is a plague, and how many people die from it.
+> 2. How many people starved.
+> 3. How many people came to the city.
+> 4. How good the harvest is.
+> 5. If you have a problem with rats, and how much grain they eat.
+> 6. How much land costs (for deciding what to do next).
+>
+> These can all be local variables of your `playGame` method.
+>
+> Use the following methods, **in this order,** to make the necessary calculations:
+>
+> `int plagueDeaths(int population)`
+>
+> Each year, there is a 15% chance of a horrible plague. When this happens, half your people die. Return the number of plague deaths (possibly zero).
+>
+> `
+> int starvationDeaths(int population, int bushelsFedToPeople)`
+>
+> Each person needs 20 bushels of grain to survive. If you feed them more than this, they are happy, but the grain is still gone. You don't get any benefit from having happy subjects. Return the number of deaths from starvation (possibly zero).
+>
+> `
+> boolean uprising(int population, int howManyPeopleStarved)`
+>
+> Return `true` if more than 45% of the people starve. (This will cause you to be immediately thrown out of office, ending the game.)
+>
+> `
+> int immigrants(int population, int acresOwned, int grainInStorage)`
+>
+> Nobody will come to the city if people are starving (so don't call this method). If everyone is well fed, compute how many people come to the city as: `(20 * _number of acres you have_ + _amount of grain you have in storage_) / (100 * _population_) + 1`.
+>
+> `
+> int harvest(int acres, int bushelsUsedAsSeed)`
+>
+> Choose a random integer between 1 and 6, inclusive. Each acre that was planted with seed will yield this many bushels of grain. (Example: if you planted 50 acres, and your number is 3, you harvest 150 bushels of grain). Return the number of bushels harvested.
+>
+> `
+> int grainEatenByRats(int bushels)`
+>
+> There is a 40% chance that you will have a rat infestation. When this happens, rats will eat somewhere between 10% and 30% of your grain. Return the amount of grain eaten by rats (possibly zero).
+>
+> `
+> int newCostOfLand()`
+>
+> The price of land is random, and ranges from 17 to 23 bushels per acre. Return the new price for the next set of decisions the player has to make. (The player will need this information in order to buy or sell land.)
+
+Do these computations, _in this order,_ for each of ten years. Each computation should be done in a separate method, and none of these methods should read anything or print anything. Since most methods change the amount of grain available, you will need to keep this information in a variable so it is available to the next method that needs it.
+
+When the computations are finished, call a method `printSummary` to print the summary for the year. This method will take several parameters.
+
+When the game ends, use a method `finalSummary` to print out a final summary, and to tell the player how good a job he/she did. I'll leave the details up to you, but the usual evaluation is based on how many people starved, and how many acres per person you end up with.
+
+Your `playGame` method will be quite long, but very straightforward; it does very little but call other methods.
+
+All the required arithmetic in this program should be **integer**. You do not need doubles.
+
+### Urgent!
+
+> It is **strongly** suggest that you first get the *simplest possible version of the program running* and tested out (that is, leave out things like rats, plagues, and immigration), then add these things one at a time to a _working_ program, **testing as you go**.
+
+### Things you need to know:
+
+#### Random numbers
+
+To get a random number generator, you first need to import `java.util.Random` (or `java.util.*`). Then, you can create a random number generator with a statement such as:
+
+> `static Random rand = new Random();`
+
+To get a new random number in the range `0..n-1`, where `n` is an `int`, call `rand.nextInt(n)`. To get a new random number in the range `min..max`, use the expression `rand.nextInt(max - min + 1) + min`. You can use the `rand` method in statements such as
+
+> `myNewNumber = rand.nextInt(5);
+> if (rand.nextInt(100) < 15) { ... }`
+
+To do something that happens `p` percent of the time, use
+
+> `if (rand.nextInt(100) < p) { _...do something..._ }`
+
+#### Getting input
+
+To get a number from the player, add this method to your program:
+
+```java
+ /**
+ * Prints the given message (which should ask the user for some integral
+ * quantity), and returns the number entered by the user. If the user's
+ * response isn't an integer, the question is repeated until the user
+ * does give a integer response.
+ *
+ * @param message The request to present to the user.
+ * @return The user's numeric response.
+ */
+ int getNumber(String message) {
+ while (true) {
+ System.out.print(message);
+ try {
+ return scanner.nextInt();
+ }
+ catch (InputMismatchException e) {
+ System.out.println("\"" + scanner.next() + "\" isn't a number!");
+ }
+ }
+ }
+```
+
+Here is an example of how you can use this method:
+
+> `sell = getNumber("O great Hammurabi, how many acres shall you sell?");`
+
+### Structure of the solution
+
+* Project name: `Hammurabi`
+* Package name: `hammurabi`
+* Class names and method signatures:
+ * `class Hammurabi`
+ * `public static void main(String[] args)`
+ * Numerous other methods, as described above.
+
+The above are requirements. **The methods that do calculations**, not input/output, **will be tested by the test methods in the test class**, so be sure to get the spelling, capitalization, and number and types of arguments correct (argument _names_ are irrelevant). You may have additional methods if you wish.
+
+### Yo! Test it!
+
+You'll see there is a Test File (HammurabiTest.java) you need to be able to run against your code to prove your solution works. Use It!!
+
+But realize that you'll have to structure your solution so that app classes are in one source direstory and your test files is in another. Study your other labs to figure out what to do.
+
+### Credits
+
+Adapted from: CIT 591 Assignment 3: Hammurabi, Fall 2010, David Matuszek (this guy is a Rock Star)
+
diff --git a/target/classes/target/classes/target/classes/pom.xml b/target/classes/target/classes/target/classes/pom.xml
new file mode 100644
index 0000000..d789654
--- /dev/null
+++ b/target/classes/target/classes/target/classes/pom.xml
@@ -0,0 +1,25 @@
+
+
+ 4.0.0
+
+ io.zipcoder
+ MicroLabs-Loops
+ 1.0-SNAPSHOT
+
+
+
+
+ junit
+ junit
+ 4.13.2
+
+
+
+
+
+ 1.8
+ 1.8
+
+
\ No newline at end of file
diff --git a/target/classes/target/classes/target/classes/target/classes/.gitignore b/target/classes/target/classes/target/classes/target/classes/.gitignore
new file mode 100644
index 0000000..a1c2a23
--- /dev/null
+++ b/target/classes/target/classes/target/classes/target/classes/.gitignore
@@ -0,0 +1,23 @@
+# Compiled class file
+*.class
+
+# Log file
+*.log
+
+# BlueJ files
+*.ctxt
+
+# Mobile Tools for Java (J2ME)
+.mtj.tmp/
+
+# Package Files #
+*.jar
+*.war
+*.nar
+*.ear
+*.zip
+*.tar.gz
+*.rar
+
+# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
+hs_err_pid*
diff --git a/target/classes/target/classes/target/classes/target/classes/LICENSE b/target/classes/target/classes/target/classes/target/classes/LICENSE
new file mode 100644
index 0000000..22474e4
--- /dev/null
+++ b/target/classes/target/classes/target/classes/target/classes/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2022 Zip Code Wilmington Core
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/target/classes/target/classes/target/classes/target/classes/README.md b/target/classes/target/classes/target/classes/target/classes/README.md
new file mode 100644
index 0000000..e4672c9
--- /dev/null
+++ b/target/classes/target/classes/target/classes/target/classes/README.md
@@ -0,0 +1,228 @@
+# hamurabi
+an ancient (in more ways than one) computer game (text)
+
+## General idea of the lab
+
+*Hammurabi* is a very old computer game (like about as old as Kris). Your job is to bring it into the 21st century by writing it in Java.
+
+Here are the standard instructions for the game:
+
+> **Congratulations, you are the newest ruler of ancient Sumer, elected for a ten year term of office. Your duties are to dispense food, direct farming, and buy and sell land as needed to support your people. Watch out for rat infestiations and the plague! Grain is the general currency, measured in bushels. The following will help you in your decisions:**
+>
+> * **Each person needs at least 20 bushels of grain per year to survive**
+> * **Each person can farm at most 10 acres of land**
+> * **It takes 2 bushels of grain to farm an acre of land**
+> * **The market price for land fluctuates yearly**
+>
+> **Rule wisely and you will be showered with appreciation at the end of your term. Rule poorly and you will be kicked out of office!**
+
+### Maven
+
+There is NO `pom.xml` file in this repo. You need to add that. Use `vscode` or `IntelliJ` to make sure your project is a Maven project with a POM file.
+
+### Details
+
+Define a single class named `Hammurabi`. Use the following skeleton (but leave out the `//` comments):
+
+```java
+package hammurabi; // package declaration
+import java.util.Random; // imports go here
+import java.util.Scanner;
+
+public class Hammurabi { // must save in a file named Hammurabi.java
+ Random rand = new Random(); // this is an instance variable
+ Scanner scanner = new Scanner(System.in);
+
+ public static void main(String\[\] args) { // required in every Java program
+ new Hammurabi().playGame();
+ }
+
+ void playGame() {
+ // declare local variables here: grain, population, etc.
+ // statements go after the declations
+ }
+
+ //other methods go here
+}
+```
+
+### Playing the game
+
+Here is what you start the game with:
+
+* 100 people
+* 2800 bushels of grain in storage
+* 1000 acres of land
+* Land value is 19 bushels/acre
+
+
+Each year, print out a summary similar to the following:
+
+ O great Hammurabi!
+ You are in year 1 of your ten year rule.
+ In the previous year 0 people starved to death.
+ In the previous year 5 people entered the kingdom.
+ The population is now 100.
+ We harvested 3000 bushels at 3 bushels per acre.
+ Rats destroyed 200 bushels, leaving 2800 bushels in storage.
+ The city owns 1000 acres of land.
+ Land is currently worth 19 bushels per acre.
+
+The above summary represents the initial state, at the _beginning_ of the first year--that is, when you first take office, and before you do any of the computations below). So, for example, the previous year (under a different ruler) must have started with 95 people; none starved, and 5 entered the kingdom, so as you enter office you rule 100 people.
+
+Here's what your `playGame` method needs to do each year, for up to 10 years:
+
+> Ask the player the following questions. These questions should be asked **in this order.** Do **not** give the player a chance to "back up" and change a previous answer. Each question should be asked in a separate method, and the answer returned as the value of the method, as specified below:
+>
+> `int askHowManyAcresToBuy(int price, int bushels)`
+>
+> Asks the player how many acres of land to buy, and returns that number. You must have enough grain to pay for your purchase.
+>
+> `
+> int askHowManyAcresToSell(int acresOwned)`
+>
+> Asks the player how many acres of land to sell, and returns that number. You can't sell more than you have.
+> Do not ask this question if the player is buying land; it doesn't make sense to do both in one turn.
+>
+> `
+> int askHowMuchGrainToFeedPeople(int bushels)`
+>
+> Ask the player how much grain to feed people, and returns that number. You can't feed them more grain than you have. You **can** feed them more than they need to survive.
+>
+> `
+> int askHowManyAcresToPlant(int acresOwned, int population, int bushels)`
+>
+> Ask the player how many acres to plant with grain, and returns that number. You must have enough acres, enough grain, and enough people to do the planting. Any grain left over goes into storage for next year.
+>
+> For each question, do "sanity checking"; that is, test whether the answer is possible (you have enough grain, you have enough people to do the planting etc.), and keep asking until you get a possible value. (For example, `O Great Hammurabi, surely you jest! We have only 3415 bushels left!`)
+>
+> Then the method needs to determine:
+>
+> 1. If there is a plague, and how many people die from it.
+> 2. How many people starved.
+> 3. How many people came to the city.
+> 4. How good the harvest is.
+> 5. If you have a problem with rats, and how much grain they eat.
+> 6. How much land costs (for deciding what to do next).
+>
+> These can all be local variables of your `playGame` method.
+>
+> Use the following methods, **in this order,** to make the necessary calculations:
+>
+> `int plagueDeaths(int population)`
+>
+> Each year, there is a 15% chance of a horrible plague. When this happens, half your people die. Return the number of plague deaths (possibly zero).
+>
+> `
+> int starvationDeaths(int population, int bushelsFedToPeople)`
+>
+> Each person needs 20 bushels of grain to survive. If you feed them more than this, they are happy, but the grain is still gone. You don't get any benefit from having happy subjects. Return the number of deaths from starvation (possibly zero).
+>
+> `
+> boolean uprising(int population, int howManyPeopleStarved)`
+>
+> Return `true` if more than 45% of the people starve. (This will cause you to be immediately thrown out of office, ending the game.)
+>
+> `
+> int immigrants(int population, int acresOwned, int grainInStorage)`
+>
+> Nobody will come to the city if people are starving (so don't call this method). If everyone is well fed, compute how many people come to the city as: `(20 * _number of acres you have_ + _amount of grain you have in storage_) / (100 * _population_) + 1`.
+>
+> `
+> int harvest(int acres, int bushelsUsedAsSeed)`
+>
+> Choose a random integer between 1 and 6, inclusive. Each acre that was planted with seed will yield this many bushels of grain. (Example: if you planted 50 acres, and your number is 3, you harvest 150 bushels of grain). Return the number of bushels harvested.
+>
+> `
+> int grainEatenByRats(int bushels)`
+>
+> There is a 40% chance that you will have a rat infestation. When this happens, rats will eat somewhere between 10% and 30% of your grain. Return the amount of grain eaten by rats (possibly zero).
+>
+> `
+> int newCostOfLand()`
+>
+> The price of land is random, and ranges from 17 to 23 bushels per acre. Return the new price for the next set of decisions the player has to make. (The player will need this information in order to buy or sell land.)
+
+Do these computations, _in this order,_ for each of ten years. Each computation should be done in a separate method, and none of these methods should read anything or print anything. Since most methods change the amount of grain available, you will need to keep this information in a variable so it is available to the next method that needs it.
+
+When the computations are finished, call a method `printSummary` to print the summary for the year. This method will take several parameters.
+
+When the game ends, use a method `finalSummary` to print out a final summary, and to tell the player how good a job he/she did. I'll leave the details up to you, but the usual evaluation is based on how many people starved, and how many acres per person you end up with.
+
+Your `playGame` method will be quite long, but very straightforward; it does very little but call other methods.
+
+All the required arithmetic in this program should be **integer**. You do not need doubles.
+
+### Urgent!
+
+> It is **strongly** suggest that you first get the *simplest possible version of the program running* and tested out (that is, leave out things like rats, plagues, and immigration), then add these things one at a time to a _working_ program, **testing as you go**.
+
+### Things you need to know:
+
+#### Random numbers
+
+To get a random number generator, you first need to import `java.util.Random` (or `java.util.*`). Then, you can create a random number generator with a statement such as:
+
+> `static Random rand = new Random();`
+
+To get a new random number in the range `0..n-1`, where `n` is an `int`, call `rand.nextInt(n)`. To get a new random number in the range `min..max`, use the expression `rand.nextInt(max - min + 1) + min`. You can use the `rand` method in statements such as
+
+> `myNewNumber = rand.nextInt(5);
+> if (rand.nextInt(100) < 15) { ... }`
+
+To do something that happens `p` percent of the time, use
+
+> `if (rand.nextInt(100) < p) { _...do something..._ }`
+
+#### Getting input
+
+To get a number from the player, add this method to your program:
+
+```java
+ /**
+ * Prints the given message (which should ask the user for some integral
+ * quantity), and returns the number entered by the user. If the user's
+ * response isn't an integer, the question is repeated until the user
+ * does give a integer response.
+ *
+ * @param message The request to present to the user.
+ * @return The user's numeric response.
+ */
+ int getNumber(String message) {
+ while (true) {
+ System.out.print(message);
+ try {
+ return scanner.nextInt();
+ }
+ catch (InputMismatchException e) {
+ System.out.println("\"" + scanner.next() + "\" isn't a number!");
+ }
+ }
+ }
+```
+
+Here is an example of how you can use this method:
+
+> `sell = getNumber("O great Hammurabi, how many acres shall you sell?");`
+
+### Structure of the solution
+
+* Project name: `Hammurabi`
+* Package name: `hammurabi`
+* Class names and method signatures:
+ * `class Hammurabi`
+ * `public static void main(String[] args)`
+ * Numerous other methods, as described above.
+
+The above are requirements. **The methods that do calculations**, not input/output, **will be tested by the test methods in the test class**, so be sure to get the spelling, capitalization, and number and types of arguments correct (argument _names_ are irrelevant). You may have additional methods if you wish.
+
+### Yo! Test it!
+
+You'll see there is a Test File (HammurabiTest.java) you need to be able to run against your code to prove your solution works. Use It!!
+
+But realize that you'll have to structure your solution so that app classes are in one source direstory and your test files is in another. Study your other labs to figure out what to do.
+
+### Credits
+
+Adapted from: CIT 591 Assignment 3: Hammurabi, Fall 2010, David Matuszek (this guy is a Rock Star)
+
diff --git a/target/classes/target/classes/target/classes/target/classes/pom.xml b/target/classes/target/classes/target/classes/target/classes/pom.xml
new file mode 100644
index 0000000..d789654
--- /dev/null
+++ b/target/classes/target/classes/target/classes/target/classes/pom.xml
@@ -0,0 +1,25 @@
+
+
+ 4.0.0
+
+ io.zipcoder
+ MicroLabs-Loops
+ 1.0-SNAPSHOT
+
+
+
+
+ junit
+ junit
+ 4.13.2
+
+
+
+
+
+ 1.8
+ 1.8
+
+
\ No newline at end of file
diff --git a/target/classes/target/classes/target/classes/target/classes/target/classes/.gitignore b/target/classes/target/classes/target/classes/target/classes/target/classes/.gitignore
new file mode 100644
index 0000000..a1c2a23
--- /dev/null
+++ b/target/classes/target/classes/target/classes/target/classes/target/classes/.gitignore
@@ -0,0 +1,23 @@
+# Compiled class file
+*.class
+
+# Log file
+*.log
+
+# BlueJ files
+*.ctxt
+
+# Mobile Tools for Java (J2ME)
+.mtj.tmp/
+
+# Package Files #
+*.jar
+*.war
+*.nar
+*.ear
+*.zip
+*.tar.gz
+*.rar
+
+# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
+hs_err_pid*
diff --git a/target/classes/target/classes/target/classes/target/classes/target/classes/LICENSE b/target/classes/target/classes/target/classes/target/classes/target/classes/LICENSE
new file mode 100644
index 0000000..22474e4
--- /dev/null
+++ b/target/classes/target/classes/target/classes/target/classes/target/classes/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2022 Zip Code Wilmington Core
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/target/classes/target/classes/target/classes/target/classes/target/classes/README.md b/target/classes/target/classes/target/classes/target/classes/target/classes/README.md
new file mode 100644
index 0000000..e4672c9
--- /dev/null
+++ b/target/classes/target/classes/target/classes/target/classes/target/classes/README.md
@@ -0,0 +1,228 @@
+# hamurabi
+an ancient (in more ways than one) computer game (text)
+
+## General idea of the lab
+
+*Hammurabi* is a very old computer game (like about as old as Kris). Your job is to bring it into the 21st century by writing it in Java.
+
+Here are the standard instructions for the game:
+
+> **Congratulations, you are the newest ruler of ancient Sumer, elected for a ten year term of office. Your duties are to dispense food, direct farming, and buy and sell land as needed to support your people. Watch out for rat infestiations and the plague! Grain is the general currency, measured in bushels. The following will help you in your decisions:**
+>
+> * **Each person needs at least 20 bushels of grain per year to survive**
+> * **Each person can farm at most 10 acres of land**
+> * **It takes 2 bushels of grain to farm an acre of land**
+> * **The market price for land fluctuates yearly**
+>
+> **Rule wisely and you will be showered with appreciation at the end of your term. Rule poorly and you will be kicked out of office!**
+
+### Maven
+
+There is NO `pom.xml` file in this repo. You need to add that. Use `vscode` or `IntelliJ` to make sure your project is a Maven project with a POM file.
+
+### Details
+
+Define a single class named `Hammurabi`. Use the following skeleton (but leave out the `//` comments):
+
+```java
+package hammurabi; // package declaration
+import java.util.Random; // imports go here
+import java.util.Scanner;
+
+public class Hammurabi { // must save in a file named Hammurabi.java
+ Random rand = new Random(); // this is an instance variable
+ Scanner scanner = new Scanner(System.in);
+
+ public static void main(String\[\] args) { // required in every Java program
+ new Hammurabi().playGame();
+ }
+
+ void playGame() {
+ // declare local variables here: grain, population, etc.
+ // statements go after the declations
+ }
+
+ //other methods go here
+}
+```
+
+### Playing the game
+
+Here is what you start the game with:
+
+* 100 people
+* 2800 bushels of grain in storage
+* 1000 acres of land
+* Land value is 19 bushels/acre
+
+
+Each year, print out a summary similar to the following:
+
+ O great Hammurabi!
+ You are in year 1 of your ten year rule.
+ In the previous year 0 people starved to death.
+ In the previous year 5 people entered the kingdom.
+ The population is now 100.
+ We harvested 3000 bushels at 3 bushels per acre.
+ Rats destroyed 200 bushels, leaving 2800 bushels in storage.
+ The city owns 1000 acres of land.
+ Land is currently worth 19 bushels per acre.
+
+The above summary represents the initial state, at the _beginning_ of the first year--that is, when you first take office, and before you do any of the computations below). So, for example, the previous year (under a different ruler) must have started with 95 people; none starved, and 5 entered the kingdom, so as you enter office you rule 100 people.
+
+Here's what your `playGame` method needs to do each year, for up to 10 years:
+
+> Ask the player the following questions. These questions should be asked **in this order.** Do **not** give the player a chance to "back up" and change a previous answer. Each question should be asked in a separate method, and the answer returned as the value of the method, as specified below:
+>
+> `int askHowManyAcresToBuy(int price, int bushels)`
+>
+> Asks the player how many acres of land to buy, and returns that number. You must have enough grain to pay for your purchase.
+>
+> `
+> int askHowManyAcresToSell(int acresOwned)`
+>
+> Asks the player how many acres of land to sell, and returns that number. You can't sell more than you have.
+> Do not ask this question if the player is buying land; it doesn't make sense to do both in one turn.
+>
+> `
+> int askHowMuchGrainToFeedPeople(int bushels)`
+>
+> Ask the player how much grain to feed people, and returns that number. You can't feed them more grain than you have. You **can** feed them more than they need to survive.
+>
+> `
+> int askHowManyAcresToPlant(int acresOwned, int population, int bushels)`
+>
+> Ask the player how many acres to plant with grain, and returns that number. You must have enough acres, enough grain, and enough people to do the planting. Any grain left over goes into storage for next year.
+>
+> For each question, do "sanity checking"; that is, test whether the answer is possible (you have enough grain, you have enough people to do the planting etc.), and keep asking until you get a possible value. (For example, `O Great Hammurabi, surely you jest! We have only 3415 bushels left!`)
+>
+> Then the method needs to determine:
+>
+> 1. If there is a plague, and how many people die from it.
+> 2. How many people starved.
+> 3. How many people came to the city.
+> 4. How good the harvest is.
+> 5. If you have a problem with rats, and how much grain they eat.
+> 6. How much land costs (for deciding what to do next).
+>
+> These can all be local variables of your `playGame` method.
+>
+> Use the following methods, **in this order,** to make the necessary calculations:
+>
+> `int plagueDeaths(int population)`
+>
+> Each year, there is a 15% chance of a horrible plague. When this happens, half your people die. Return the number of plague deaths (possibly zero).
+>
+> `
+> int starvationDeaths(int population, int bushelsFedToPeople)`
+>
+> Each person needs 20 bushels of grain to survive. If you feed them more than this, they are happy, but the grain is still gone. You don't get any benefit from having happy subjects. Return the number of deaths from starvation (possibly zero).
+>
+> `
+> boolean uprising(int population, int howManyPeopleStarved)`
+>
+> Return `true` if more than 45% of the people starve. (This will cause you to be immediately thrown out of office, ending the game.)
+>
+> `
+> int immigrants(int population, int acresOwned, int grainInStorage)`
+>
+> Nobody will come to the city if people are starving (so don't call this method). If everyone is well fed, compute how many people come to the city as: `(20 * _number of acres you have_ + _amount of grain you have in storage_) / (100 * _population_) + 1`.
+>
+> `
+> int harvest(int acres, int bushelsUsedAsSeed)`
+>
+> Choose a random integer between 1 and 6, inclusive. Each acre that was planted with seed will yield this many bushels of grain. (Example: if you planted 50 acres, and your number is 3, you harvest 150 bushels of grain). Return the number of bushels harvested.
+>
+> `
+> int grainEatenByRats(int bushels)`
+>
+> There is a 40% chance that you will have a rat infestation. When this happens, rats will eat somewhere between 10% and 30% of your grain. Return the amount of grain eaten by rats (possibly zero).
+>
+> `
+> int newCostOfLand()`
+>
+> The price of land is random, and ranges from 17 to 23 bushels per acre. Return the new price for the next set of decisions the player has to make. (The player will need this information in order to buy or sell land.)
+
+Do these computations, _in this order,_ for each of ten years. Each computation should be done in a separate method, and none of these methods should read anything or print anything. Since most methods change the amount of grain available, you will need to keep this information in a variable so it is available to the next method that needs it.
+
+When the computations are finished, call a method `printSummary` to print the summary for the year. This method will take several parameters.
+
+When the game ends, use a method `finalSummary` to print out a final summary, and to tell the player how good a job he/she did. I'll leave the details up to you, but the usual evaluation is based on how many people starved, and how many acres per person you end up with.
+
+Your `playGame` method will be quite long, but very straightforward; it does very little but call other methods.
+
+All the required arithmetic in this program should be **integer**. You do not need doubles.
+
+### Urgent!
+
+> It is **strongly** suggest that you first get the *simplest possible version of the program running* and tested out (that is, leave out things like rats, plagues, and immigration), then add these things one at a time to a _working_ program, **testing as you go**.
+
+### Things you need to know:
+
+#### Random numbers
+
+To get a random number generator, you first need to import `java.util.Random` (or `java.util.*`). Then, you can create a random number generator with a statement such as:
+
+> `static Random rand = new Random();`
+
+To get a new random number in the range `0..n-1`, where `n` is an `int`, call `rand.nextInt(n)`. To get a new random number in the range `min..max`, use the expression `rand.nextInt(max - min + 1) + min`. You can use the `rand` method in statements such as
+
+> `myNewNumber = rand.nextInt(5);
+> if (rand.nextInt(100) < 15) { ... }`
+
+To do something that happens `p` percent of the time, use
+
+> `if (rand.nextInt(100) < p) { _...do something..._ }`
+
+#### Getting input
+
+To get a number from the player, add this method to your program:
+
+```java
+ /**
+ * Prints the given message (which should ask the user for some integral
+ * quantity), and returns the number entered by the user. If the user's
+ * response isn't an integer, the question is repeated until the user
+ * does give a integer response.
+ *
+ * @param message The request to present to the user.
+ * @return The user's numeric response.
+ */
+ int getNumber(String message) {
+ while (true) {
+ System.out.print(message);
+ try {
+ return scanner.nextInt();
+ }
+ catch (InputMismatchException e) {
+ System.out.println("\"" + scanner.next() + "\" isn't a number!");
+ }
+ }
+ }
+```
+
+Here is an example of how you can use this method:
+
+> `sell = getNumber("O great Hammurabi, how many acres shall you sell?");`
+
+### Structure of the solution
+
+* Project name: `Hammurabi`
+* Package name: `hammurabi`
+* Class names and method signatures:
+ * `class Hammurabi`
+ * `public static void main(String[] args)`
+ * Numerous other methods, as described above.
+
+The above are requirements. **The methods that do calculations**, not input/output, **will be tested by the test methods in the test class**, so be sure to get the spelling, capitalization, and number and types of arguments correct (argument _names_ are irrelevant). You may have additional methods if you wish.
+
+### Yo! Test it!
+
+You'll see there is a Test File (HammurabiTest.java) you need to be able to run against your code to prove your solution works. Use It!!
+
+But realize that you'll have to structure your solution so that app classes are in one source direstory and your test files is in another. Study your other labs to figure out what to do.
+
+### Credits
+
+Adapted from: CIT 591 Assignment 3: Hammurabi, Fall 2010, David Matuszek (this guy is a Rock Star)
+
diff --git a/target/classes/target/classes/target/classes/target/classes/target/classes/pom.xml b/target/classes/target/classes/target/classes/target/classes/target/classes/pom.xml
new file mode 100644
index 0000000..d789654
--- /dev/null
+++ b/target/classes/target/classes/target/classes/target/classes/target/classes/pom.xml
@@ -0,0 +1,25 @@
+
+
+ 4.0.0
+
+ io.zipcoder
+ MicroLabs-Loops
+ 1.0-SNAPSHOT
+
+
+
+
+ junit
+ junit
+ 4.13.2
+
+
+
+
+
+ 1.8
+ 1.8
+
+
\ No newline at end of file
diff --git a/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/.gitignore b/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/.gitignore
new file mode 100644
index 0000000..a1c2a23
--- /dev/null
+++ b/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/.gitignore
@@ -0,0 +1,23 @@
+# Compiled class file
+*.class
+
+# Log file
+*.log
+
+# BlueJ files
+*.ctxt
+
+# Mobile Tools for Java (J2ME)
+.mtj.tmp/
+
+# Package Files #
+*.jar
+*.war
+*.nar
+*.ear
+*.zip
+*.tar.gz
+*.rar
+
+# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
+hs_err_pid*
diff --git a/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/LICENSE b/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/LICENSE
new file mode 100644
index 0000000..22474e4
--- /dev/null
+++ b/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2022 Zip Code Wilmington Core
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/README.md b/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/README.md
new file mode 100644
index 0000000..e4672c9
--- /dev/null
+++ b/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/README.md
@@ -0,0 +1,228 @@
+# hamurabi
+an ancient (in more ways than one) computer game (text)
+
+## General idea of the lab
+
+*Hammurabi* is a very old computer game (like about as old as Kris). Your job is to bring it into the 21st century by writing it in Java.
+
+Here are the standard instructions for the game:
+
+> **Congratulations, you are the newest ruler of ancient Sumer, elected for a ten year term of office. Your duties are to dispense food, direct farming, and buy and sell land as needed to support your people. Watch out for rat infestiations and the plague! Grain is the general currency, measured in bushels. The following will help you in your decisions:**
+>
+> * **Each person needs at least 20 bushels of grain per year to survive**
+> * **Each person can farm at most 10 acres of land**
+> * **It takes 2 bushels of grain to farm an acre of land**
+> * **The market price for land fluctuates yearly**
+>
+> **Rule wisely and you will be showered with appreciation at the end of your term. Rule poorly and you will be kicked out of office!**
+
+### Maven
+
+There is NO `pom.xml` file in this repo. You need to add that. Use `vscode` or `IntelliJ` to make sure your project is a Maven project with a POM file.
+
+### Details
+
+Define a single class named `Hammurabi`. Use the following skeleton (but leave out the `//` comments):
+
+```java
+package hammurabi; // package declaration
+import java.util.Random; // imports go here
+import java.util.Scanner;
+
+public class Hammurabi { // must save in a file named Hammurabi.java
+ Random rand = new Random(); // this is an instance variable
+ Scanner scanner = new Scanner(System.in);
+
+ public static void main(String\[\] args) { // required in every Java program
+ new Hammurabi().playGame();
+ }
+
+ void playGame() {
+ // declare local variables here: grain, population, etc.
+ // statements go after the declations
+ }
+
+ //other methods go here
+}
+```
+
+### Playing the game
+
+Here is what you start the game with:
+
+* 100 people
+* 2800 bushels of grain in storage
+* 1000 acres of land
+* Land value is 19 bushels/acre
+
+
+Each year, print out a summary similar to the following:
+
+ O great Hammurabi!
+ You are in year 1 of your ten year rule.
+ In the previous year 0 people starved to death.
+ In the previous year 5 people entered the kingdom.
+ The population is now 100.
+ We harvested 3000 bushels at 3 bushels per acre.
+ Rats destroyed 200 bushels, leaving 2800 bushels in storage.
+ The city owns 1000 acres of land.
+ Land is currently worth 19 bushels per acre.
+
+The above summary represents the initial state, at the _beginning_ of the first year--that is, when you first take office, and before you do any of the computations below). So, for example, the previous year (under a different ruler) must have started with 95 people; none starved, and 5 entered the kingdom, so as you enter office you rule 100 people.
+
+Here's what your `playGame` method needs to do each year, for up to 10 years:
+
+> Ask the player the following questions. These questions should be asked **in this order.** Do **not** give the player a chance to "back up" and change a previous answer. Each question should be asked in a separate method, and the answer returned as the value of the method, as specified below:
+>
+> `int askHowManyAcresToBuy(int price, int bushels)`
+>
+> Asks the player how many acres of land to buy, and returns that number. You must have enough grain to pay for your purchase.
+>
+> `
+> int askHowManyAcresToSell(int acresOwned)`
+>
+> Asks the player how many acres of land to sell, and returns that number. You can't sell more than you have.
+> Do not ask this question if the player is buying land; it doesn't make sense to do both in one turn.
+>
+> `
+> int askHowMuchGrainToFeedPeople(int bushels)`
+>
+> Ask the player how much grain to feed people, and returns that number. You can't feed them more grain than you have. You **can** feed them more than they need to survive.
+>
+> `
+> int askHowManyAcresToPlant(int acresOwned, int population, int bushels)`
+>
+> Ask the player how many acres to plant with grain, and returns that number. You must have enough acres, enough grain, and enough people to do the planting. Any grain left over goes into storage for next year.
+>
+> For each question, do "sanity checking"; that is, test whether the answer is possible (you have enough grain, you have enough people to do the planting etc.), and keep asking until you get a possible value. (For example, `O Great Hammurabi, surely you jest! We have only 3415 bushels left!`)
+>
+> Then the method needs to determine:
+>
+> 1. If there is a plague, and how many people die from it.
+> 2. How many people starved.
+> 3. How many people came to the city.
+> 4. How good the harvest is.
+> 5. If you have a problem with rats, and how much grain they eat.
+> 6. How much land costs (for deciding what to do next).
+>
+> These can all be local variables of your `playGame` method.
+>
+> Use the following methods, **in this order,** to make the necessary calculations:
+>
+> `int plagueDeaths(int population)`
+>
+> Each year, there is a 15% chance of a horrible plague. When this happens, half your people die. Return the number of plague deaths (possibly zero).
+>
+> `
+> int starvationDeaths(int population, int bushelsFedToPeople)`
+>
+> Each person needs 20 bushels of grain to survive. If you feed them more than this, they are happy, but the grain is still gone. You don't get any benefit from having happy subjects. Return the number of deaths from starvation (possibly zero).
+>
+> `
+> boolean uprising(int population, int howManyPeopleStarved)`
+>
+> Return `true` if more than 45% of the people starve. (This will cause you to be immediately thrown out of office, ending the game.)
+>
+> `
+> int immigrants(int population, int acresOwned, int grainInStorage)`
+>
+> Nobody will come to the city if people are starving (so don't call this method). If everyone is well fed, compute how many people come to the city as: `(20 * _number of acres you have_ + _amount of grain you have in storage_) / (100 * _population_) + 1`.
+>
+> `
+> int harvest(int acres, int bushelsUsedAsSeed)`
+>
+> Choose a random integer between 1 and 6, inclusive. Each acre that was planted with seed will yield this many bushels of grain. (Example: if you planted 50 acres, and your number is 3, you harvest 150 bushels of grain). Return the number of bushels harvested.
+>
+> `
+> int grainEatenByRats(int bushels)`
+>
+> There is a 40% chance that you will have a rat infestation. When this happens, rats will eat somewhere between 10% and 30% of your grain. Return the amount of grain eaten by rats (possibly zero).
+>
+> `
+> int newCostOfLand()`
+>
+> The price of land is random, and ranges from 17 to 23 bushels per acre. Return the new price for the next set of decisions the player has to make. (The player will need this information in order to buy or sell land.)
+
+Do these computations, _in this order,_ for each of ten years. Each computation should be done in a separate method, and none of these methods should read anything or print anything. Since most methods change the amount of grain available, you will need to keep this information in a variable so it is available to the next method that needs it.
+
+When the computations are finished, call a method `printSummary` to print the summary for the year. This method will take several parameters.
+
+When the game ends, use a method `finalSummary` to print out a final summary, and to tell the player how good a job he/she did. I'll leave the details up to you, but the usual evaluation is based on how many people starved, and how many acres per person you end up with.
+
+Your `playGame` method will be quite long, but very straightforward; it does very little but call other methods.
+
+All the required arithmetic in this program should be **integer**. You do not need doubles.
+
+### Urgent!
+
+> It is **strongly** suggest that you first get the *simplest possible version of the program running* and tested out (that is, leave out things like rats, plagues, and immigration), then add these things one at a time to a _working_ program, **testing as you go**.
+
+### Things you need to know:
+
+#### Random numbers
+
+To get a random number generator, you first need to import `java.util.Random` (or `java.util.*`). Then, you can create a random number generator with a statement such as:
+
+> `static Random rand = new Random();`
+
+To get a new random number in the range `0..n-1`, where `n` is an `int`, call `rand.nextInt(n)`. To get a new random number in the range `min..max`, use the expression `rand.nextInt(max - min + 1) + min`. You can use the `rand` method in statements such as
+
+> `myNewNumber = rand.nextInt(5);
+> if (rand.nextInt(100) < 15) { ... }`
+
+To do something that happens `p` percent of the time, use
+
+> `if (rand.nextInt(100) < p) { _...do something..._ }`
+
+#### Getting input
+
+To get a number from the player, add this method to your program:
+
+```java
+ /**
+ * Prints the given message (which should ask the user for some integral
+ * quantity), and returns the number entered by the user. If the user's
+ * response isn't an integer, the question is repeated until the user
+ * does give a integer response.
+ *
+ * @param message The request to present to the user.
+ * @return The user's numeric response.
+ */
+ int getNumber(String message) {
+ while (true) {
+ System.out.print(message);
+ try {
+ return scanner.nextInt();
+ }
+ catch (InputMismatchException e) {
+ System.out.println("\"" + scanner.next() + "\" isn't a number!");
+ }
+ }
+ }
+```
+
+Here is an example of how you can use this method:
+
+> `sell = getNumber("O great Hammurabi, how many acres shall you sell?");`
+
+### Structure of the solution
+
+* Project name: `Hammurabi`
+* Package name: `hammurabi`
+* Class names and method signatures:
+ * `class Hammurabi`
+ * `public static void main(String[] args)`
+ * Numerous other methods, as described above.
+
+The above are requirements. **The methods that do calculations**, not input/output, **will be tested by the test methods in the test class**, so be sure to get the spelling, capitalization, and number and types of arguments correct (argument _names_ are irrelevant). You may have additional methods if you wish.
+
+### Yo! Test it!
+
+You'll see there is a Test File (HammurabiTest.java) you need to be able to run against your code to prove your solution works. Use It!!
+
+But realize that you'll have to structure your solution so that app classes are in one source direstory and your test files is in another. Study your other labs to figure out what to do.
+
+### Credits
+
+Adapted from: CIT 591 Assignment 3: Hammurabi, Fall 2010, David Matuszek (this guy is a Rock Star)
+
diff --git a/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/pom.xml b/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/pom.xml
new file mode 100644
index 0000000..d789654
--- /dev/null
+++ b/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/pom.xml
@@ -0,0 +1,25 @@
+
+
+ 4.0.0
+
+ io.zipcoder
+ MicroLabs-Loops
+ 1.0-SNAPSHOT
+
+
+
+
+ junit
+ junit
+ 4.13.2
+
+
+
+
+
+ 1.8
+ 1.8
+
+
\ No newline at end of file
diff --git a/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/.gitignore b/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/.gitignore
new file mode 100644
index 0000000..a1c2a23
--- /dev/null
+++ b/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/.gitignore
@@ -0,0 +1,23 @@
+# Compiled class file
+*.class
+
+# Log file
+*.log
+
+# BlueJ files
+*.ctxt
+
+# Mobile Tools for Java (J2ME)
+.mtj.tmp/
+
+# Package Files #
+*.jar
+*.war
+*.nar
+*.ear
+*.zip
+*.tar.gz
+*.rar
+
+# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
+hs_err_pid*
diff --git a/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/LICENSE b/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/LICENSE
new file mode 100644
index 0000000..22474e4
--- /dev/null
+++ b/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2022 Zip Code Wilmington Core
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/README.md b/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/README.md
new file mode 100644
index 0000000..e4672c9
--- /dev/null
+++ b/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/README.md
@@ -0,0 +1,228 @@
+# hamurabi
+an ancient (in more ways than one) computer game (text)
+
+## General idea of the lab
+
+*Hammurabi* is a very old computer game (like about as old as Kris). Your job is to bring it into the 21st century by writing it in Java.
+
+Here are the standard instructions for the game:
+
+> **Congratulations, you are the newest ruler of ancient Sumer, elected for a ten year term of office. Your duties are to dispense food, direct farming, and buy and sell land as needed to support your people. Watch out for rat infestiations and the plague! Grain is the general currency, measured in bushels. The following will help you in your decisions:**
+>
+> * **Each person needs at least 20 bushels of grain per year to survive**
+> * **Each person can farm at most 10 acres of land**
+> * **It takes 2 bushels of grain to farm an acre of land**
+> * **The market price for land fluctuates yearly**
+>
+> **Rule wisely and you will be showered with appreciation at the end of your term. Rule poorly and you will be kicked out of office!**
+
+### Maven
+
+There is NO `pom.xml` file in this repo. You need to add that. Use `vscode` or `IntelliJ` to make sure your project is a Maven project with a POM file.
+
+### Details
+
+Define a single class named `Hammurabi`. Use the following skeleton (but leave out the `//` comments):
+
+```java
+package hammurabi; // package declaration
+import java.util.Random; // imports go here
+import java.util.Scanner;
+
+public class Hammurabi { // must save in a file named Hammurabi.java
+ Random rand = new Random(); // this is an instance variable
+ Scanner scanner = new Scanner(System.in);
+
+ public static void main(String\[\] args) { // required in every Java program
+ new Hammurabi().playGame();
+ }
+
+ void playGame() {
+ // declare local variables here: grain, population, etc.
+ // statements go after the declations
+ }
+
+ //other methods go here
+}
+```
+
+### Playing the game
+
+Here is what you start the game with:
+
+* 100 people
+* 2800 bushels of grain in storage
+* 1000 acres of land
+* Land value is 19 bushels/acre
+
+
+Each year, print out a summary similar to the following:
+
+ O great Hammurabi!
+ You are in year 1 of your ten year rule.
+ In the previous year 0 people starved to death.
+ In the previous year 5 people entered the kingdom.
+ The population is now 100.
+ We harvested 3000 bushels at 3 bushels per acre.
+ Rats destroyed 200 bushels, leaving 2800 bushels in storage.
+ The city owns 1000 acres of land.
+ Land is currently worth 19 bushels per acre.
+
+The above summary represents the initial state, at the _beginning_ of the first year--that is, when you first take office, and before you do any of the computations below). So, for example, the previous year (under a different ruler) must have started with 95 people; none starved, and 5 entered the kingdom, so as you enter office you rule 100 people.
+
+Here's what your `playGame` method needs to do each year, for up to 10 years:
+
+> Ask the player the following questions. These questions should be asked **in this order.** Do **not** give the player a chance to "back up" and change a previous answer. Each question should be asked in a separate method, and the answer returned as the value of the method, as specified below:
+>
+> `int askHowManyAcresToBuy(int price, int bushels)`
+>
+> Asks the player how many acres of land to buy, and returns that number. You must have enough grain to pay for your purchase.
+>
+> `
+> int askHowManyAcresToSell(int acresOwned)`
+>
+> Asks the player how many acres of land to sell, and returns that number. You can't sell more than you have.
+> Do not ask this question if the player is buying land; it doesn't make sense to do both in one turn.
+>
+> `
+> int askHowMuchGrainToFeedPeople(int bushels)`
+>
+> Ask the player how much grain to feed people, and returns that number. You can't feed them more grain than you have. You **can** feed them more than they need to survive.
+>
+> `
+> int askHowManyAcresToPlant(int acresOwned, int population, int bushels)`
+>
+> Ask the player how many acres to plant with grain, and returns that number. You must have enough acres, enough grain, and enough people to do the planting. Any grain left over goes into storage for next year.
+>
+> For each question, do "sanity checking"; that is, test whether the answer is possible (you have enough grain, you have enough people to do the planting etc.), and keep asking until you get a possible value. (For example, `O Great Hammurabi, surely you jest! We have only 3415 bushels left!`)
+>
+> Then the method needs to determine:
+>
+> 1. If there is a plague, and how many people die from it.
+> 2. How many people starved.
+> 3. How many people came to the city.
+> 4. How good the harvest is.
+> 5. If you have a problem with rats, and how much grain they eat.
+> 6. How much land costs (for deciding what to do next).
+>
+> These can all be local variables of your `playGame` method.
+>
+> Use the following methods, **in this order,** to make the necessary calculations:
+>
+> `int plagueDeaths(int population)`
+>
+> Each year, there is a 15% chance of a horrible plague. When this happens, half your people die. Return the number of plague deaths (possibly zero).
+>
+> `
+> int starvationDeaths(int population, int bushelsFedToPeople)`
+>
+> Each person needs 20 bushels of grain to survive. If you feed them more than this, they are happy, but the grain is still gone. You don't get any benefit from having happy subjects. Return the number of deaths from starvation (possibly zero).
+>
+> `
+> boolean uprising(int population, int howManyPeopleStarved)`
+>
+> Return `true` if more than 45% of the people starve. (This will cause you to be immediately thrown out of office, ending the game.)
+>
+> `
+> int immigrants(int population, int acresOwned, int grainInStorage)`
+>
+> Nobody will come to the city if people are starving (so don't call this method). If everyone is well fed, compute how many people come to the city as: `(20 * _number of acres you have_ + _amount of grain you have in storage_) / (100 * _population_) + 1`.
+>
+> `
+> int harvest(int acres, int bushelsUsedAsSeed)`
+>
+> Choose a random integer between 1 and 6, inclusive. Each acre that was planted with seed will yield this many bushels of grain. (Example: if you planted 50 acres, and your number is 3, you harvest 150 bushels of grain). Return the number of bushels harvested.
+>
+> `
+> int grainEatenByRats(int bushels)`
+>
+> There is a 40% chance that you will have a rat infestation. When this happens, rats will eat somewhere between 10% and 30% of your grain. Return the amount of grain eaten by rats (possibly zero).
+>
+> `
+> int newCostOfLand()`
+>
+> The price of land is random, and ranges from 17 to 23 bushels per acre. Return the new price for the next set of decisions the player has to make. (The player will need this information in order to buy or sell land.)
+
+Do these computations, _in this order,_ for each of ten years. Each computation should be done in a separate method, and none of these methods should read anything or print anything. Since most methods change the amount of grain available, you will need to keep this information in a variable so it is available to the next method that needs it.
+
+When the computations are finished, call a method `printSummary` to print the summary for the year. This method will take several parameters.
+
+When the game ends, use a method `finalSummary` to print out a final summary, and to tell the player how good a job he/she did. I'll leave the details up to you, but the usual evaluation is based on how many people starved, and how many acres per person you end up with.
+
+Your `playGame` method will be quite long, but very straightforward; it does very little but call other methods.
+
+All the required arithmetic in this program should be **integer**. You do not need doubles.
+
+### Urgent!
+
+> It is **strongly** suggest that you first get the *simplest possible version of the program running* and tested out (that is, leave out things like rats, plagues, and immigration), then add these things one at a time to a _working_ program, **testing as you go**.
+
+### Things you need to know:
+
+#### Random numbers
+
+To get a random number generator, you first need to import `java.util.Random` (or `java.util.*`). Then, you can create a random number generator with a statement such as:
+
+> `static Random rand = new Random();`
+
+To get a new random number in the range `0..n-1`, where `n` is an `int`, call `rand.nextInt(n)`. To get a new random number in the range `min..max`, use the expression `rand.nextInt(max - min + 1) + min`. You can use the `rand` method in statements such as
+
+> `myNewNumber = rand.nextInt(5);
+> if (rand.nextInt(100) < 15) { ... }`
+
+To do something that happens `p` percent of the time, use
+
+> `if (rand.nextInt(100) < p) { _...do something..._ }`
+
+#### Getting input
+
+To get a number from the player, add this method to your program:
+
+```java
+ /**
+ * Prints the given message (which should ask the user for some integral
+ * quantity), and returns the number entered by the user. If the user's
+ * response isn't an integer, the question is repeated until the user
+ * does give a integer response.
+ *
+ * @param message The request to present to the user.
+ * @return The user's numeric response.
+ */
+ int getNumber(String message) {
+ while (true) {
+ System.out.print(message);
+ try {
+ return scanner.nextInt();
+ }
+ catch (InputMismatchException e) {
+ System.out.println("\"" + scanner.next() + "\" isn't a number!");
+ }
+ }
+ }
+```
+
+Here is an example of how you can use this method:
+
+> `sell = getNumber("O great Hammurabi, how many acres shall you sell?");`
+
+### Structure of the solution
+
+* Project name: `Hammurabi`
+* Package name: `hammurabi`
+* Class names and method signatures:
+ * `class Hammurabi`
+ * `public static void main(String[] args)`
+ * Numerous other methods, as described above.
+
+The above are requirements. **The methods that do calculations**, not input/output, **will be tested by the test methods in the test class**, so be sure to get the spelling, capitalization, and number and types of arguments correct (argument _names_ are irrelevant). You may have additional methods if you wish.
+
+### Yo! Test it!
+
+You'll see there is a Test File (HammurabiTest.java) you need to be able to run against your code to prove your solution works. Use It!!
+
+But realize that you'll have to structure your solution so that app classes are in one source direstory and your test files is in another. Study your other labs to figure out what to do.
+
+### Credits
+
+Adapted from: CIT 591 Assignment 3: Hammurabi, Fall 2010, David Matuszek (this guy is a Rock Star)
+
diff --git a/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/pom.xml b/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/pom.xml
new file mode 100644
index 0000000..d789654
--- /dev/null
+++ b/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/pom.xml
@@ -0,0 +1,25 @@
+
+
+ 4.0.0
+
+ io.zipcoder
+ MicroLabs-Loops
+ 1.0-SNAPSHOT
+
+
+
+
+ junit
+ junit
+ 4.13.2
+
+
+
+
+
+ 1.8
+ 1.8
+
+
\ No newline at end of file
diff --git a/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/.gitignore b/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/.gitignore
new file mode 100644
index 0000000..a1c2a23
--- /dev/null
+++ b/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/.gitignore
@@ -0,0 +1,23 @@
+# Compiled class file
+*.class
+
+# Log file
+*.log
+
+# BlueJ files
+*.ctxt
+
+# Mobile Tools for Java (J2ME)
+.mtj.tmp/
+
+# Package Files #
+*.jar
+*.war
+*.nar
+*.ear
+*.zip
+*.tar.gz
+*.rar
+
+# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
+hs_err_pid*
diff --git a/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/LICENSE b/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/LICENSE
new file mode 100644
index 0000000..22474e4
--- /dev/null
+++ b/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2022 Zip Code Wilmington Core
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/README.md b/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/README.md
new file mode 100644
index 0000000..e4672c9
--- /dev/null
+++ b/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/README.md
@@ -0,0 +1,228 @@
+# hamurabi
+an ancient (in more ways than one) computer game (text)
+
+## General idea of the lab
+
+*Hammurabi* is a very old computer game (like about as old as Kris). Your job is to bring it into the 21st century by writing it in Java.
+
+Here are the standard instructions for the game:
+
+> **Congratulations, you are the newest ruler of ancient Sumer, elected for a ten year term of office. Your duties are to dispense food, direct farming, and buy and sell land as needed to support your people. Watch out for rat infestiations and the plague! Grain is the general currency, measured in bushels. The following will help you in your decisions:**
+>
+> * **Each person needs at least 20 bushels of grain per year to survive**
+> * **Each person can farm at most 10 acres of land**
+> * **It takes 2 bushels of grain to farm an acre of land**
+> * **The market price for land fluctuates yearly**
+>
+> **Rule wisely and you will be showered with appreciation at the end of your term. Rule poorly and you will be kicked out of office!**
+
+### Maven
+
+There is NO `pom.xml` file in this repo. You need to add that. Use `vscode` or `IntelliJ` to make sure your project is a Maven project with a POM file.
+
+### Details
+
+Define a single class named `Hammurabi`. Use the following skeleton (but leave out the `//` comments):
+
+```java
+package hammurabi; // package declaration
+import java.util.Random; // imports go here
+import java.util.Scanner;
+
+public class Hammurabi { // must save in a file named Hammurabi.java
+ Random rand = new Random(); // this is an instance variable
+ Scanner scanner = new Scanner(System.in);
+
+ public static void main(String\[\] args) { // required in every Java program
+ new Hammurabi().playGame();
+ }
+
+ void playGame() {
+ // declare local variables here: grain, population, etc.
+ // statements go after the declations
+ }
+
+ //other methods go here
+}
+```
+
+### Playing the game
+
+Here is what you start the game with:
+
+* 100 people
+* 2800 bushels of grain in storage
+* 1000 acres of land
+* Land value is 19 bushels/acre
+
+
+Each year, print out a summary similar to the following:
+
+ O great Hammurabi!
+ You are in year 1 of your ten year rule.
+ In the previous year 0 people starved to death.
+ In the previous year 5 people entered the kingdom.
+ The population is now 100.
+ We harvested 3000 bushels at 3 bushels per acre.
+ Rats destroyed 200 bushels, leaving 2800 bushels in storage.
+ The city owns 1000 acres of land.
+ Land is currently worth 19 bushels per acre.
+
+The above summary represents the initial state, at the _beginning_ of the first year--that is, when you first take office, and before you do any of the computations below). So, for example, the previous year (under a different ruler) must have started with 95 people; none starved, and 5 entered the kingdom, so as you enter office you rule 100 people.
+
+Here's what your `playGame` method needs to do each year, for up to 10 years:
+
+> Ask the player the following questions. These questions should be asked **in this order.** Do **not** give the player a chance to "back up" and change a previous answer. Each question should be asked in a separate method, and the answer returned as the value of the method, as specified below:
+>
+> `int askHowManyAcresToBuy(int price, int bushels)`
+>
+> Asks the player how many acres of land to buy, and returns that number. You must have enough grain to pay for your purchase.
+>
+> `
+> int askHowManyAcresToSell(int acresOwned)`
+>
+> Asks the player how many acres of land to sell, and returns that number. You can't sell more than you have.
+> Do not ask this question if the player is buying land; it doesn't make sense to do both in one turn.
+>
+> `
+> int askHowMuchGrainToFeedPeople(int bushels)`
+>
+> Ask the player how much grain to feed people, and returns that number. You can't feed them more grain than you have. You **can** feed them more than they need to survive.
+>
+> `
+> int askHowManyAcresToPlant(int acresOwned, int population, int bushels)`
+>
+> Ask the player how many acres to plant with grain, and returns that number. You must have enough acres, enough grain, and enough people to do the planting. Any grain left over goes into storage for next year.
+>
+> For each question, do "sanity checking"; that is, test whether the answer is possible (you have enough grain, you have enough people to do the planting etc.), and keep asking until you get a possible value. (For example, `O Great Hammurabi, surely you jest! We have only 3415 bushels left!`)
+>
+> Then the method needs to determine:
+>
+> 1. If there is a plague, and how many people die from it.
+> 2. How many people starved.
+> 3. How many people came to the city.
+> 4. How good the harvest is.
+> 5. If you have a problem with rats, and how much grain they eat.
+> 6. How much land costs (for deciding what to do next).
+>
+> These can all be local variables of your `playGame` method.
+>
+> Use the following methods, **in this order,** to make the necessary calculations:
+>
+> `int plagueDeaths(int population)`
+>
+> Each year, there is a 15% chance of a horrible plague. When this happens, half your people die. Return the number of plague deaths (possibly zero).
+>
+> `
+> int starvationDeaths(int population, int bushelsFedToPeople)`
+>
+> Each person needs 20 bushels of grain to survive. If you feed them more than this, they are happy, but the grain is still gone. You don't get any benefit from having happy subjects. Return the number of deaths from starvation (possibly zero).
+>
+> `
+> boolean uprising(int population, int howManyPeopleStarved)`
+>
+> Return `true` if more than 45% of the people starve. (This will cause you to be immediately thrown out of office, ending the game.)
+>
+> `
+> int immigrants(int population, int acresOwned, int grainInStorage)`
+>
+> Nobody will come to the city if people are starving (so don't call this method). If everyone is well fed, compute how many people come to the city as: `(20 * _number of acres you have_ + _amount of grain you have in storage_) / (100 * _population_) + 1`.
+>
+> `
+> int harvest(int acres, int bushelsUsedAsSeed)`
+>
+> Choose a random integer between 1 and 6, inclusive. Each acre that was planted with seed will yield this many bushels of grain. (Example: if you planted 50 acres, and your number is 3, you harvest 150 bushels of grain). Return the number of bushels harvested.
+>
+> `
+> int grainEatenByRats(int bushels)`
+>
+> There is a 40% chance that you will have a rat infestation. When this happens, rats will eat somewhere between 10% and 30% of your grain. Return the amount of grain eaten by rats (possibly zero).
+>
+> `
+> int newCostOfLand()`
+>
+> The price of land is random, and ranges from 17 to 23 bushels per acre. Return the new price for the next set of decisions the player has to make. (The player will need this information in order to buy or sell land.)
+
+Do these computations, _in this order,_ for each of ten years. Each computation should be done in a separate method, and none of these methods should read anything or print anything. Since most methods change the amount of grain available, you will need to keep this information in a variable so it is available to the next method that needs it.
+
+When the computations are finished, call a method `printSummary` to print the summary for the year. This method will take several parameters.
+
+When the game ends, use a method `finalSummary` to print out a final summary, and to tell the player how good a job he/she did. I'll leave the details up to you, but the usual evaluation is based on how many people starved, and how many acres per person you end up with.
+
+Your `playGame` method will be quite long, but very straightforward; it does very little but call other methods.
+
+All the required arithmetic in this program should be **integer**. You do not need doubles.
+
+### Urgent!
+
+> It is **strongly** suggest that you first get the *simplest possible version of the program running* and tested out (that is, leave out things like rats, plagues, and immigration), then add these things one at a time to a _working_ program, **testing as you go**.
+
+### Things you need to know:
+
+#### Random numbers
+
+To get a random number generator, you first need to import `java.util.Random` (or `java.util.*`). Then, you can create a random number generator with a statement such as:
+
+> `static Random rand = new Random();`
+
+To get a new random number in the range `0..n-1`, where `n` is an `int`, call `rand.nextInt(n)`. To get a new random number in the range `min..max`, use the expression `rand.nextInt(max - min + 1) + min`. You can use the `rand` method in statements such as
+
+> `myNewNumber = rand.nextInt(5);
+> if (rand.nextInt(100) < 15) { ... }`
+
+To do something that happens `p` percent of the time, use
+
+> `if (rand.nextInt(100) < p) { _...do something..._ }`
+
+#### Getting input
+
+To get a number from the player, add this method to your program:
+
+```java
+ /**
+ * Prints the given message (which should ask the user for some integral
+ * quantity), and returns the number entered by the user. If the user's
+ * response isn't an integer, the question is repeated until the user
+ * does give a integer response.
+ *
+ * @param message The request to present to the user.
+ * @return The user's numeric response.
+ */
+ int getNumber(String message) {
+ while (true) {
+ System.out.print(message);
+ try {
+ return scanner.nextInt();
+ }
+ catch (InputMismatchException e) {
+ System.out.println("\"" + scanner.next() + "\" isn't a number!");
+ }
+ }
+ }
+```
+
+Here is an example of how you can use this method:
+
+> `sell = getNumber("O great Hammurabi, how many acres shall you sell?");`
+
+### Structure of the solution
+
+* Project name: `Hammurabi`
+* Package name: `hammurabi`
+* Class names and method signatures:
+ * `class Hammurabi`
+ * `public static void main(String[] args)`
+ * Numerous other methods, as described above.
+
+The above are requirements. **The methods that do calculations**, not input/output, **will be tested by the test methods in the test class**, so be sure to get the spelling, capitalization, and number and types of arguments correct (argument _names_ are irrelevant). You may have additional methods if you wish.
+
+### Yo! Test it!
+
+You'll see there is a Test File (HammurabiTest.java) you need to be able to run against your code to prove your solution works. Use It!!
+
+But realize that you'll have to structure your solution so that app classes are in one source direstory and your test files is in another. Study your other labs to figure out what to do.
+
+### Credits
+
+Adapted from: CIT 591 Assignment 3: Hammurabi, Fall 2010, David Matuszek (this guy is a Rock Star)
+
diff --git a/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/pom.xml b/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/pom.xml
new file mode 100644
index 0000000..d789654
--- /dev/null
+++ b/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/pom.xml
@@ -0,0 +1,25 @@
+
+
+ 4.0.0
+
+ io.zipcoder
+ MicroLabs-Loops
+ 1.0-SNAPSHOT
+
+
+
+
+ junit
+ junit
+ 4.13.2
+
+
+
+
+
+ 1.8
+ 1.8
+
+
\ No newline at end of file
diff --git a/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/.gitignore b/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/.gitignore
new file mode 100644
index 0000000..a1c2a23
--- /dev/null
+++ b/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/.gitignore
@@ -0,0 +1,23 @@
+# Compiled class file
+*.class
+
+# Log file
+*.log
+
+# BlueJ files
+*.ctxt
+
+# Mobile Tools for Java (J2ME)
+.mtj.tmp/
+
+# Package Files #
+*.jar
+*.war
+*.nar
+*.ear
+*.zip
+*.tar.gz
+*.rar
+
+# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
+hs_err_pid*
diff --git a/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/LICENSE b/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/LICENSE
new file mode 100644
index 0000000..22474e4
--- /dev/null
+++ b/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2022 Zip Code Wilmington Core
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/README.md b/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/README.md
new file mode 100644
index 0000000..e4672c9
--- /dev/null
+++ b/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/README.md
@@ -0,0 +1,228 @@
+# hamurabi
+an ancient (in more ways than one) computer game (text)
+
+## General idea of the lab
+
+*Hammurabi* is a very old computer game (like about as old as Kris). Your job is to bring it into the 21st century by writing it in Java.
+
+Here are the standard instructions for the game:
+
+> **Congratulations, you are the newest ruler of ancient Sumer, elected for a ten year term of office. Your duties are to dispense food, direct farming, and buy and sell land as needed to support your people. Watch out for rat infestiations and the plague! Grain is the general currency, measured in bushels. The following will help you in your decisions:**
+>
+> * **Each person needs at least 20 bushels of grain per year to survive**
+> * **Each person can farm at most 10 acres of land**
+> * **It takes 2 bushels of grain to farm an acre of land**
+> * **The market price for land fluctuates yearly**
+>
+> **Rule wisely and you will be showered with appreciation at the end of your term. Rule poorly and you will be kicked out of office!**
+
+### Maven
+
+There is NO `pom.xml` file in this repo. You need to add that. Use `vscode` or `IntelliJ` to make sure your project is a Maven project with a POM file.
+
+### Details
+
+Define a single class named `Hammurabi`. Use the following skeleton (but leave out the `//` comments):
+
+```java
+package hammurabi; // package declaration
+import java.util.Random; // imports go here
+import java.util.Scanner;
+
+public class Hammurabi { // must save in a file named Hammurabi.java
+ Random rand = new Random(); // this is an instance variable
+ Scanner scanner = new Scanner(System.in);
+
+ public static void main(String\[\] args) { // required in every Java program
+ new Hammurabi().playGame();
+ }
+
+ void playGame() {
+ // declare local variables here: grain, population, etc.
+ // statements go after the declations
+ }
+
+ //other methods go here
+}
+```
+
+### Playing the game
+
+Here is what you start the game with:
+
+* 100 people
+* 2800 bushels of grain in storage
+* 1000 acres of land
+* Land value is 19 bushels/acre
+
+
+Each year, print out a summary similar to the following:
+
+ O great Hammurabi!
+ You are in year 1 of your ten year rule.
+ In the previous year 0 people starved to death.
+ In the previous year 5 people entered the kingdom.
+ The population is now 100.
+ We harvested 3000 bushels at 3 bushels per acre.
+ Rats destroyed 200 bushels, leaving 2800 bushels in storage.
+ The city owns 1000 acres of land.
+ Land is currently worth 19 bushels per acre.
+
+The above summary represents the initial state, at the _beginning_ of the first year--that is, when you first take office, and before you do any of the computations below). So, for example, the previous year (under a different ruler) must have started with 95 people; none starved, and 5 entered the kingdom, so as you enter office you rule 100 people.
+
+Here's what your `playGame` method needs to do each year, for up to 10 years:
+
+> Ask the player the following questions. These questions should be asked **in this order.** Do **not** give the player a chance to "back up" and change a previous answer. Each question should be asked in a separate method, and the answer returned as the value of the method, as specified below:
+>
+> `int askHowManyAcresToBuy(int price, int bushels)`
+>
+> Asks the player how many acres of land to buy, and returns that number. You must have enough grain to pay for your purchase.
+>
+> `
+> int askHowManyAcresToSell(int acresOwned)`
+>
+> Asks the player how many acres of land to sell, and returns that number. You can't sell more than you have.
+> Do not ask this question if the player is buying land; it doesn't make sense to do both in one turn.
+>
+> `
+> int askHowMuchGrainToFeedPeople(int bushels)`
+>
+> Ask the player how much grain to feed people, and returns that number. You can't feed them more grain than you have. You **can** feed them more than they need to survive.
+>
+> `
+> int askHowManyAcresToPlant(int acresOwned, int population, int bushels)`
+>
+> Ask the player how many acres to plant with grain, and returns that number. You must have enough acres, enough grain, and enough people to do the planting. Any grain left over goes into storage for next year.
+>
+> For each question, do "sanity checking"; that is, test whether the answer is possible (you have enough grain, you have enough people to do the planting etc.), and keep asking until you get a possible value. (For example, `O Great Hammurabi, surely you jest! We have only 3415 bushels left!`)
+>
+> Then the method needs to determine:
+>
+> 1. If there is a plague, and how many people die from it.
+> 2. How many people starved.
+> 3. How many people came to the city.
+> 4. How good the harvest is.
+> 5. If you have a problem with rats, and how much grain they eat.
+> 6. How much land costs (for deciding what to do next).
+>
+> These can all be local variables of your `playGame` method.
+>
+> Use the following methods, **in this order,** to make the necessary calculations:
+>
+> `int plagueDeaths(int population)`
+>
+> Each year, there is a 15% chance of a horrible plague. When this happens, half your people die. Return the number of plague deaths (possibly zero).
+>
+> `
+> int starvationDeaths(int population, int bushelsFedToPeople)`
+>
+> Each person needs 20 bushels of grain to survive. If you feed them more than this, they are happy, but the grain is still gone. You don't get any benefit from having happy subjects. Return the number of deaths from starvation (possibly zero).
+>
+> `
+> boolean uprising(int population, int howManyPeopleStarved)`
+>
+> Return `true` if more than 45% of the people starve. (This will cause you to be immediately thrown out of office, ending the game.)
+>
+> `
+> int immigrants(int population, int acresOwned, int grainInStorage)`
+>
+> Nobody will come to the city if people are starving (so don't call this method). If everyone is well fed, compute how many people come to the city as: `(20 * _number of acres you have_ + _amount of grain you have in storage_) / (100 * _population_) + 1`.
+>
+> `
+> int harvest(int acres, int bushelsUsedAsSeed)`
+>
+> Choose a random integer between 1 and 6, inclusive. Each acre that was planted with seed will yield this many bushels of grain. (Example: if you planted 50 acres, and your number is 3, you harvest 150 bushels of grain). Return the number of bushels harvested.
+>
+> `
+> int grainEatenByRats(int bushels)`
+>
+> There is a 40% chance that you will have a rat infestation. When this happens, rats will eat somewhere between 10% and 30% of your grain. Return the amount of grain eaten by rats (possibly zero).
+>
+> `
+> int newCostOfLand()`
+>
+> The price of land is random, and ranges from 17 to 23 bushels per acre. Return the new price for the next set of decisions the player has to make. (The player will need this information in order to buy or sell land.)
+
+Do these computations, _in this order,_ for each of ten years. Each computation should be done in a separate method, and none of these methods should read anything or print anything. Since most methods change the amount of grain available, you will need to keep this information in a variable so it is available to the next method that needs it.
+
+When the computations are finished, call a method `printSummary` to print the summary for the year. This method will take several parameters.
+
+When the game ends, use a method `finalSummary` to print out a final summary, and to tell the player how good a job he/she did. I'll leave the details up to you, but the usual evaluation is based on how many people starved, and how many acres per person you end up with.
+
+Your `playGame` method will be quite long, but very straightforward; it does very little but call other methods.
+
+All the required arithmetic in this program should be **integer**. You do not need doubles.
+
+### Urgent!
+
+> It is **strongly** suggest that you first get the *simplest possible version of the program running* and tested out (that is, leave out things like rats, plagues, and immigration), then add these things one at a time to a _working_ program, **testing as you go**.
+
+### Things you need to know:
+
+#### Random numbers
+
+To get a random number generator, you first need to import `java.util.Random` (or `java.util.*`). Then, you can create a random number generator with a statement such as:
+
+> `static Random rand = new Random();`
+
+To get a new random number in the range `0..n-1`, where `n` is an `int`, call `rand.nextInt(n)`. To get a new random number in the range `min..max`, use the expression `rand.nextInt(max - min + 1) + min`. You can use the `rand` method in statements such as
+
+> `myNewNumber = rand.nextInt(5);
+> if (rand.nextInt(100) < 15) { ... }`
+
+To do something that happens `p` percent of the time, use
+
+> `if (rand.nextInt(100) < p) { _...do something..._ }`
+
+#### Getting input
+
+To get a number from the player, add this method to your program:
+
+```java
+ /**
+ * Prints the given message (which should ask the user for some integral
+ * quantity), and returns the number entered by the user. If the user's
+ * response isn't an integer, the question is repeated until the user
+ * does give a integer response.
+ *
+ * @param message The request to present to the user.
+ * @return The user's numeric response.
+ */
+ int getNumber(String message) {
+ while (true) {
+ System.out.print(message);
+ try {
+ return scanner.nextInt();
+ }
+ catch (InputMismatchException e) {
+ System.out.println("\"" + scanner.next() + "\" isn't a number!");
+ }
+ }
+ }
+```
+
+Here is an example of how you can use this method:
+
+> `sell = getNumber("O great Hammurabi, how many acres shall you sell?");`
+
+### Structure of the solution
+
+* Project name: `Hammurabi`
+* Package name: `hammurabi`
+* Class names and method signatures:
+ * `class Hammurabi`
+ * `public static void main(String[] args)`
+ * Numerous other methods, as described above.
+
+The above are requirements. **The methods that do calculations**, not input/output, **will be tested by the test methods in the test class**, so be sure to get the spelling, capitalization, and number and types of arguments correct (argument _names_ are irrelevant). You may have additional methods if you wish.
+
+### Yo! Test it!
+
+You'll see there is a Test File (HammurabiTest.java) you need to be able to run against your code to prove your solution works. Use It!!
+
+But realize that you'll have to structure your solution so that app classes are in one source direstory and your test files is in another. Study your other labs to figure out what to do.
+
+### Credits
+
+Adapted from: CIT 591 Assignment 3: Hammurabi, Fall 2010, David Matuszek (this guy is a Rock Star)
+
diff --git a/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/pom.xml b/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/pom.xml
new file mode 100644
index 0000000..d789654
--- /dev/null
+++ b/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/pom.xml
@@ -0,0 +1,25 @@
+
+
+ 4.0.0
+
+ io.zipcoder
+ MicroLabs-Loops
+ 1.0-SNAPSHOT
+
+
+
+
+ junit
+ junit
+ 4.13.2
+
+
+
+
+
+ 1.8
+ 1.8
+
+
\ No newline at end of file
diff --git a/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/.gitignore b/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/.gitignore
new file mode 100644
index 0000000..a1c2a23
--- /dev/null
+++ b/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/.gitignore
@@ -0,0 +1,23 @@
+# Compiled class file
+*.class
+
+# Log file
+*.log
+
+# BlueJ files
+*.ctxt
+
+# Mobile Tools for Java (J2ME)
+.mtj.tmp/
+
+# Package Files #
+*.jar
+*.war
+*.nar
+*.ear
+*.zip
+*.tar.gz
+*.rar
+
+# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
+hs_err_pid*
diff --git a/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/LICENSE b/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/LICENSE
new file mode 100644
index 0000000..22474e4
--- /dev/null
+++ b/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2022 Zip Code Wilmington Core
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/README.md b/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/README.md
new file mode 100644
index 0000000..e4672c9
--- /dev/null
+++ b/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/README.md
@@ -0,0 +1,228 @@
+# hamurabi
+an ancient (in more ways than one) computer game (text)
+
+## General idea of the lab
+
+*Hammurabi* is a very old computer game (like about as old as Kris). Your job is to bring it into the 21st century by writing it in Java.
+
+Here are the standard instructions for the game:
+
+> **Congratulations, you are the newest ruler of ancient Sumer, elected for a ten year term of office. Your duties are to dispense food, direct farming, and buy and sell land as needed to support your people. Watch out for rat infestiations and the plague! Grain is the general currency, measured in bushels. The following will help you in your decisions:**
+>
+> * **Each person needs at least 20 bushels of grain per year to survive**
+> * **Each person can farm at most 10 acres of land**
+> * **It takes 2 bushels of grain to farm an acre of land**
+> * **The market price for land fluctuates yearly**
+>
+> **Rule wisely and you will be showered with appreciation at the end of your term. Rule poorly and you will be kicked out of office!**
+
+### Maven
+
+There is NO `pom.xml` file in this repo. You need to add that. Use `vscode` or `IntelliJ` to make sure your project is a Maven project with a POM file.
+
+### Details
+
+Define a single class named `Hammurabi`. Use the following skeleton (but leave out the `//` comments):
+
+```java
+package hammurabi; // package declaration
+import java.util.Random; // imports go here
+import java.util.Scanner;
+
+public class Hammurabi { // must save in a file named Hammurabi.java
+ Random rand = new Random(); // this is an instance variable
+ Scanner scanner = new Scanner(System.in);
+
+ public static void main(String\[\] args) { // required in every Java program
+ new Hammurabi().playGame();
+ }
+
+ void playGame() {
+ // declare local variables here: grain, population, etc.
+ // statements go after the declations
+ }
+
+ //other methods go here
+}
+```
+
+### Playing the game
+
+Here is what you start the game with:
+
+* 100 people
+* 2800 bushels of grain in storage
+* 1000 acres of land
+* Land value is 19 bushels/acre
+
+
+Each year, print out a summary similar to the following:
+
+ O great Hammurabi!
+ You are in year 1 of your ten year rule.
+ In the previous year 0 people starved to death.
+ In the previous year 5 people entered the kingdom.
+ The population is now 100.
+ We harvested 3000 bushels at 3 bushels per acre.
+ Rats destroyed 200 bushels, leaving 2800 bushels in storage.
+ The city owns 1000 acres of land.
+ Land is currently worth 19 bushels per acre.
+
+The above summary represents the initial state, at the _beginning_ of the first year--that is, when you first take office, and before you do any of the computations below). So, for example, the previous year (under a different ruler) must have started with 95 people; none starved, and 5 entered the kingdom, so as you enter office you rule 100 people.
+
+Here's what your `playGame` method needs to do each year, for up to 10 years:
+
+> Ask the player the following questions. These questions should be asked **in this order.** Do **not** give the player a chance to "back up" and change a previous answer. Each question should be asked in a separate method, and the answer returned as the value of the method, as specified below:
+>
+> `int askHowManyAcresToBuy(int price, int bushels)`
+>
+> Asks the player how many acres of land to buy, and returns that number. You must have enough grain to pay for your purchase.
+>
+> `
+> int askHowManyAcresToSell(int acresOwned)`
+>
+> Asks the player how many acres of land to sell, and returns that number. You can't sell more than you have.
+> Do not ask this question if the player is buying land; it doesn't make sense to do both in one turn.
+>
+> `
+> int askHowMuchGrainToFeedPeople(int bushels)`
+>
+> Ask the player how much grain to feed people, and returns that number. You can't feed them more grain than you have. You **can** feed them more than they need to survive.
+>
+> `
+> int askHowManyAcresToPlant(int acresOwned, int population, int bushels)`
+>
+> Ask the player how many acres to plant with grain, and returns that number. You must have enough acres, enough grain, and enough people to do the planting. Any grain left over goes into storage for next year.
+>
+> For each question, do "sanity checking"; that is, test whether the answer is possible (you have enough grain, you have enough people to do the planting etc.), and keep asking until you get a possible value. (For example, `O Great Hammurabi, surely you jest! We have only 3415 bushels left!`)
+>
+> Then the method needs to determine:
+>
+> 1. If there is a plague, and how many people die from it.
+> 2. How many people starved.
+> 3. How many people came to the city.
+> 4. How good the harvest is.
+> 5. If you have a problem with rats, and how much grain they eat.
+> 6. How much land costs (for deciding what to do next).
+>
+> These can all be local variables of your `playGame` method.
+>
+> Use the following methods, **in this order,** to make the necessary calculations:
+>
+> `int plagueDeaths(int population)`
+>
+> Each year, there is a 15% chance of a horrible plague. When this happens, half your people die. Return the number of plague deaths (possibly zero).
+>
+> `
+> int starvationDeaths(int population, int bushelsFedToPeople)`
+>
+> Each person needs 20 bushels of grain to survive. If you feed them more than this, they are happy, but the grain is still gone. You don't get any benefit from having happy subjects. Return the number of deaths from starvation (possibly zero).
+>
+> `
+> boolean uprising(int population, int howManyPeopleStarved)`
+>
+> Return `true` if more than 45% of the people starve. (This will cause you to be immediately thrown out of office, ending the game.)
+>
+> `
+> int immigrants(int population, int acresOwned, int grainInStorage)`
+>
+> Nobody will come to the city if people are starving (so don't call this method). If everyone is well fed, compute how many people come to the city as: `(20 * _number of acres you have_ + _amount of grain you have in storage_) / (100 * _population_) + 1`.
+>
+> `
+> int harvest(int acres, int bushelsUsedAsSeed)`
+>
+> Choose a random integer between 1 and 6, inclusive. Each acre that was planted with seed will yield this many bushels of grain. (Example: if you planted 50 acres, and your number is 3, you harvest 150 bushels of grain). Return the number of bushels harvested.
+>
+> `
+> int grainEatenByRats(int bushels)`
+>
+> There is a 40% chance that you will have a rat infestation. When this happens, rats will eat somewhere between 10% and 30% of your grain. Return the amount of grain eaten by rats (possibly zero).
+>
+> `
+> int newCostOfLand()`
+>
+> The price of land is random, and ranges from 17 to 23 bushels per acre. Return the new price for the next set of decisions the player has to make. (The player will need this information in order to buy or sell land.)
+
+Do these computations, _in this order,_ for each of ten years. Each computation should be done in a separate method, and none of these methods should read anything or print anything. Since most methods change the amount of grain available, you will need to keep this information in a variable so it is available to the next method that needs it.
+
+When the computations are finished, call a method `printSummary` to print the summary for the year. This method will take several parameters.
+
+When the game ends, use a method `finalSummary` to print out a final summary, and to tell the player how good a job he/she did. I'll leave the details up to you, but the usual evaluation is based on how many people starved, and how many acres per person you end up with.
+
+Your `playGame` method will be quite long, but very straightforward; it does very little but call other methods.
+
+All the required arithmetic in this program should be **integer**. You do not need doubles.
+
+### Urgent!
+
+> It is **strongly** suggest that you first get the *simplest possible version of the program running* and tested out (that is, leave out things like rats, plagues, and immigration), then add these things one at a time to a _working_ program, **testing as you go**.
+
+### Things you need to know:
+
+#### Random numbers
+
+To get a random number generator, you first need to import `java.util.Random` (or `java.util.*`). Then, you can create a random number generator with a statement such as:
+
+> `static Random rand = new Random();`
+
+To get a new random number in the range `0..n-1`, where `n` is an `int`, call `rand.nextInt(n)`. To get a new random number in the range `min..max`, use the expression `rand.nextInt(max - min + 1) + min`. You can use the `rand` method in statements such as
+
+> `myNewNumber = rand.nextInt(5);
+> if (rand.nextInt(100) < 15) { ... }`
+
+To do something that happens `p` percent of the time, use
+
+> `if (rand.nextInt(100) < p) { _...do something..._ }`
+
+#### Getting input
+
+To get a number from the player, add this method to your program:
+
+```java
+ /**
+ * Prints the given message (which should ask the user for some integral
+ * quantity), and returns the number entered by the user. If the user's
+ * response isn't an integer, the question is repeated until the user
+ * does give a integer response.
+ *
+ * @param message The request to present to the user.
+ * @return The user's numeric response.
+ */
+ int getNumber(String message) {
+ while (true) {
+ System.out.print(message);
+ try {
+ return scanner.nextInt();
+ }
+ catch (InputMismatchException e) {
+ System.out.println("\"" + scanner.next() + "\" isn't a number!");
+ }
+ }
+ }
+```
+
+Here is an example of how you can use this method:
+
+> `sell = getNumber("O great Hammurabi, how many acres shall you sell?");`
+
+### Structure of the solution
+
+* Project name: `Hammurabi`
+* Package name: `hammurabi`
+* Class names and method signatures:
+ * `class Hammurabi`
+ * `public static void main(String[] args)`
+ * Numerous other methods, as described above.
+
+The above are requirements. **The methods that do calculations**, not input/output, **will be tested by the test methods in the test class**, so be sure to get the spelling, capitalization, and number and types of arguments correct (argument _names_ are irrelevant). You may have additional methods if you wish.
+
+### Yo! Test it!
+
+You'll see there is a Test File (HammurabiTest.java) you need to be able to run against your code to prove your solution works. Use It!!
+
+But realize that you'll have to structure your solution so that app classes are in one source direstory and your test files is in another. Study your other labs to figure out what to do.
+
+### Credits
+
+Adapted from: CIT 591 Assignment 3: Hammurabi, Fall 2010, David Matuszek (this guy is a Rock Star)
+
diff --git a/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/pom.xml b/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/pom.xml
new file mode 100644
index 0000000..d789654
--- /dev/null
+++ b/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/target/classes/pom.xml
@@ -0,0 +1,25 @@
+
+
+ 4.0.0
+
+ io.zipcoder
+ MicroLabs-Loops
+ 1.0-SNAPSHOT
+
+
+
+
+ junit
+ junit
+ 4.13.2
+
+
+
+
+
+ 1.8
+ 1.8
+
+
\ No newline at end of file