46 protected static Pattern trampolinePattern = Pattern |
46 protected static Pattern trampolinePattern = Pattern |
47 .compile("(?s).*?Trampoline ([A-I]) targets ([1-9]).*"); |
47 .compile("(?s).*?Trampoline ([A-I]) targets ([1-9]).*"); |
48 protected static String firstTrampolineRegexp = "(?s).*?Trampoline ([A-I]) targets ([1-9])"; |
48 protected static String firstTrampolineRegexp = "(?s).*?Trampoline ([A-I]) targets ([1-9])"; |
49 |
49 |
50 public Mine(String text) { |
50 public Mine(String text) { |
51 fromText(text); |
51 this(text, null); |
52 if (findCells(OpenLambdaLift).size() != 0) |
52 if (findCells(OpenLambdaLift).size() != 0) |
53 throw new RuntimeException("Detected OpenLambdaLift in new map!"); |
53 throw new RuntimeException("Detected OpenLambdaLift in new map!"); |
54 if (findCells(MiningRobot).size() != 1) |
54 if (findCells(MiningRobot).size() != 1) |
55 throw new RuntimeException("New map does not contain a robot!"); |
55 throw new RuntimeException("New map does not contain a robot!"); |
56 if (findCells(ClosedLambdaLift).size() != 1) |
56 if (findCells(ClosedLambdaLift).size() != 1) |
57 throw new RuntimeException("New map does not contain a ClosedLambdaLift!"); |
57 throw new RuntimeException("New map does not contain a ClosedLambdaLift!"); |
|
58 } |
|
59 |
|
60 protected Mine(String text, Object obj) { |
|
61 fromText(text); |
58 lambdasAndHighOrderRocksStartCount = findCells(Lambda).size() + findCells(CellContent.HighOrderRock).size(); |
62 lambdasAndHighOrderRocksStartCount = findCells(Lambda).size() + findCells(CellContent.HighOrderRock).size(); |
59 } |
63 } |
60 |
64 |
61 @Override |
65 @Override |
62 public String toText() { |
66 public String toText() { |