diff --git a/Herd.java b/Herd.java index 6647d5a..4f96b8f 100755 --- a/Herd.java +++ b/Herd.java @@ -94,6 +94,9 @@ //check both parents present if (parents[0] == null) return "You haven't selected a bull!"; if (parents[1] == null) return "You haven't selected a cow!"; + //check previous offspring + if (offspring[0] != null || offspring[1] != null) + return "You still have calves from the last round of breeding!"; //check age difference (max 3 generations) if (Math.abs(parents[0].getGeneration() - parents[1].getGeneration()) > 3) return "The age difference between the parents is too great!"; diff --git a/Herd.java b/Herd.java index 6647d5a..4f96b8f 100755 --- a/Herd.java +++ b/Herd.java @@ -94,6 +94,9 @@ //check both parents present if (parents[0] == null) return "You haven't selected a bull!"; if (parents[1] == null) return "You haven't selected a cow!"; + //check previous offspring + if (offspring[0] != null || offspring[1] != null) + return "You still have calves from the last round of breeding!"; //check age difference (max 3 generations) if (Math.abs(parents[0].getGeneration() - parents[1].getGeneration()) > 3) return "The age difference between the parents is too great!"; diff --git a/README.md b/README.md index ddf2f06..9eb5517 100755 --- a/README.md +++ b/README.md @@ -1,8 +1,23 @@ # MooBreeder -*(c) 2018 Daniel Vedder, Amano Christian School* - -*Licensed under the terms of the MIT license.* - MooBreeder is a simple cow breeding game, designed to illustrate the fundamentals of selective breeding to KS3 pupils in biology class. + +## Installation + +Java JRE 7 or higher has to be installed. MooBreeder itself does not +have to be installed. Simply double-click the executable JAR file to +start the game. + +If you are interested in the source code, you will find the current +version at . + +## Playing + +Once you have started the game, click on the `Help` menu to read the +instructions. + +--- + +*© 2018 Daniel Vedder, Amano Christian School* +*Licensed under the terms of the MIT license.*