Skip to content

Commit

Permalink
Release v2.2.0 - Puns feature added, save as .cowsim feature completed
Browse files Browse the repository at this point in the history
  • Loading branch information
soda committed Sep 30, 2018
2 parents cc1c36c + 2ad4671 commit 3f20690
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ Versions will be named what best describes the features added, or the next veget
## Version mistakes
v1.2.2 - Oops, accidentally commited multiple times. Source code does not match .jar.
v2.0.0 - Oops, accidentally commited multiple times.
v2.2.0 - Oops, accidentally commited multiple times. Also comitted v2.2.1 before commiting v2.2.0, then decided to merge the two... Very confusing, eh?
19 changes: 11 additions & 8 deletions src/runner/CowSim.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,15 @@ public class CowSim {
public static final int pointsPerMilk = 2;
public static final int pointsPerMilkSell = 5;
public static final int pointsPerCowBuy = 20;


public Font trackerFont;

public int cowPunNum = 0;
public String[] cowPuns = new String[]{"Your cow-op will thrive until\n the cows come home!", "Manure great!", "Manure admira-bull!", "You've got some knock-cowt skills!", "Your cow-op will thrive for-heifer!"}; // List of cow puns
public String[] cowPuns = new String[] { "Your cow-op will thrive until\n the cows come home!", "Manure great!",
"Manure admira-bull!", "You've got some knock-cowt skills!", "Your cow-op will thrive for-heifer!" }; // List
// of
// cow
// puns

public boolean showPuns = false;
public boolean gameWon = false; // If "You won" pop-up has shown yet
Expand All @@ -69,7 +72,7 @@ public class CowSim {

static String ENlaunchTypeDialog = "Do you want to create a new game (NEW) or import a game (OPEN)?";
static String ENlaunchAddressDialog = "Type in your game address.";

static String ENshowPunsDialog = "Show cow puns when cows are bought?";

static String ENsavingGame0 = "Saving game...\n Your current game address is: ";
Expand Down Expand Up @@ -130,7 +133,7 @@ public class CowSim {
Icon gameImportFileImg;
static String releasesSeeImgname = "releases-see.png";
Icon releasesSeeImg;

static String milkImgname = "milk.png";
Icon milkImg;
static String milkSellAllImgname = "sell-milk-all.png";
Expand Down Expand Up @@ -386,7 +389,7 @@ public void setupGUI(CowSim simulator, GameWindow ui) {
ui04.setIcon(farmpointsImg);
ui04.setFont(trackerFont);
ui04.setToolTipText(ENfarmpoints);

JButton ui10 = new JButton(milkSellAllImg);
ui10.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
Expand Down Expand Up @@ -597,7 +600,7 @@ public void startGame(GameWindow frame) {
if (JOptionPane.showConfirmDialog(null, ENshowPunsDialog, null, JOptionPane.YES_NO_OPTION) == 0) {
showPuns = true;
}

frameRate.start();
}

Expand Down Expand Up @@ -663,7 +666,7 @@ public void printAddress(GameWindow frame) {
location.renameTo(new File(location.getParent() + "/" + location.getName() + ".cowsim"));
}
} catch (Exception e) {

}
}
}
Expand Down

0 comments on commit 3f20690

Please sign in to comment.