1.1 --- a/icfp-model/src/main/java/ru/bosony/model/mine/Mine.java Mon Jul 16 18:59:13 2012 +0400
1.2 +++ b/icfp-model/src/main/java/ru/bosony/model/mine/Mine.java Tue Jul 17 21:38:39 2012 +0400
1.3 @@ -48,13 +48,17 @@
1.4 protected static String firstTrampolineRegexp = "(?s).*?Trampoline ([A-I]) targets ([1-9])";
1.5
1.6 public Mine(String text) {
1.7 - fromText(text);
1.8 + this(text, null);
1.9 if (findCells(OpenLambdaLift).size() != 0)
1.10 throw new RuntimeException("Detected OpenLambdaLift in new map!");
1.11 if (findCells(MiningRobot).size() != 1)
1.12 throw new RuntimeException("New map does not contain a robot!");
1.13 if (findCells(ClosedLambdaLift).size() != 1)
1.14 throw new RuntimeException("New map does not contain a ClosedLambdaLift!");
1.15 + }
1.16 +
1.17 + protected Mine(String text, Object obj) {
1.18 + fromText(text);
1.19 lambdasAndHighOrderRocksStartCount = findCells(Lambda).size() + findCells(CellContent.HighOrderRock).size();
1.20 }
1.21
1.22 @@ -310,8 +314,8 @@
1.23 }
1.24
1.25 @Override
1.26 - public Mine clone() throws CloneNotSupportedException {
1.27 - return new Mine(toText());
1.28 + public Mine clone() {
1.29 + return new Mine(toText(), null);
1.30 }
1.31
1.32 }