This commit is contained in:
Stephan Richter
2020-11-05 18:56:51 +01:00
parent 0ef617aa34
commit 86f685219c
4 changed files with 16 additions and 6 deletions

View File

@@ -589,6 +589,7 @@ public class Train extends BaseClass implements Comparable<Train> {
public void showTrace() {
int remainingLength = length();
if (remainingLength<1) remainingLength=1;
for (int i=0; i<trace.size(); i++) {
Tile tile = trace.get(i);
if (remainingLength>0) {
@@ -605,4 +606,9 @@ public class Train extends BaseClass implements Comparable<Train> {
public void dropTrace() {
while (!trace.isEmpty()) trace.removeFirst().set(null);
}
public void removeFromTrace(Tile tile) {
trace.remove(tile);
}
}