|
|
@ -93,13 +93,11 @@ public abstract class Block extends StretchableTile implements Comparable<Block> |
|
|
|
|
|
|
|
|
|
|
|
public WaitTime setMax(Direction dir,int max) { |
|
|
|
public WaitTime setMax(Direction dir,int max) { |
|
|
|
get(dir).max = max; |
|
|
|
get(dir).max = max; |
|
|
|
if (get(dir).min > max) setMin(dir,max); |
|
|
|
|
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public WaitTime setMin(Direction dir,int min) { |
|
|
|
public WaitTime setMin(Direction dir,int min) { |
|
|
|
get(dir).min = min; |
|
|
|
get(dir).min = min; |
|
|
|
if (get(dir).max > min) setMax(dir,min); |
|
|
|
|
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -112,6 +110,11 @@ public abstract class Block extends StretchableTile implements Comparable<Block> |
|
|
|
public String toString() { |
|
|
|
public String toString() { |
|
|
|
return "WaitTime("+tag+", "+dirs+")"; |
|
|
|
return "WaitTime("+tag+", "+dirs+")"; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void validate() { |
|
|
|
|
|
|
|
for (Entry<Direction, Range> entry: dirs.entrySet()) entry.getValue().validate(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -376,6 +379,7 @@ public abstract class Block extends StretchableTile implements Comparable<Block> |
|
|
|
} else wt.setMax(dir, Integer.parseInt(val)); |
|
|
|
} else wt.setMax(dir, Integer.parseInt(val)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
for (WaitTime wt: waitTimes) wt.validate(); |
|
|
|
|
|
|
|
|
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|