The.
This commit is contained in:
@@ -370,6 +370,7 @@ class Game extends World {
|
||||
|
||||
// Attempt to add the nth dot option to the incomplete guess.
|
||||
Game addDot(int choice) {
|
||||
System.out.println("tying to ");
|
||||
return new Game(
|
||||
this.conf,
|
||||
this.solution,
|
||||
@@ -430,7 +431,7 @@ class Game extends World {
|
||||
return new RectangleImage(
|
||||
this.solution.getW(),
|
||||
2 * Dot.r,
|
||||
OutlineMode.SOLID,
|
||||
OutlineMode.OUTLINE,
|
||||
Color.BLACK
|
||||
);
|
||||
}
|
||||
@@ -514,10 +515,15 @@ class ConsIncompleteGuess implements ILoGuess {
|
||||
}
|
||||
|
||||
public ILoGuess addToIncomplete(Dot dot, int limit) {
|
||||
System.out.println("Here");
|
||||
return new ConsIncompleteGuess(
|
||||
this.guessSoFar.tryAppend(dot, limit),
|
||||
new IncompleteGuess(new ConsDot(dot, new MtDot())),
|
||||
this.nxt
|
||||
);
|
||||
// return new ConsIncompleteGuess(
|
||||
// this.guessSoFar.tryAppend(dot, limit),
|
||||
// this.nxt
|
||||
// );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -539,12 +545,15 @@ class ConsPlaceholderGuess implements ILoGuess {
|
||||
|
||||
// Fill a list with n placeholders.
|
||||
static ILoGuess mkN(int n) {
|
||||
if (n == 0) return new MtGuess();
|
||||
if (n == 0) return new ConsIncompleteGuess(
|
||||
new IncompleteGuess(new MtDot()),
|
||||
new MtGuess()
|
||||
);
|
||||
return new ConsPlaceholderGuess(mkN(n - 1));
|
||||
}
|
||||
|
||||
public ILoGuess addToIncomplete(Dot dot, int limit) {
|
||||
return this.nxt.addToIncomplete(dot, limit);
|
||||
return new ConsPlaceholderGuess(this.nxt.addToIncomplete(dot, limit));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user