From 5927ffe5134b03d4c8fdd08874833e79ffb663f1 Mon Sep 17 00:00:00 2001 From: knewjade Date: Thu, 4 Jun 2020 20:35:33 +0900 Subject: [PATCH] Fix #3: a warning is displayed when more pieces is inputted than necessary. --- src/main/java/entry/path/PathEntryPoint.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/main/java/entry/path/PathEntryPoint.java b/src/main/java/entry/path/PathEntryPoint.java index b715375f..67a5cf45 100644 --- a/src/main/java/entry/path/PathEntryPoint.java +++ b/src/main/java/entry/path/PathEntryPoint.java @@ -151,7 +151,16 @@ else if (!field.isEmpty(x, y)) output("# Enumerate pieces"); boolean isUsingHold = settings.isUsingHold(); int piecesDepth = generator.getDepth(); - output("Piece pop count = " + (isUsingHold && maxDepth < piecesDepth ? maxDepth + 1 : maxDepth)); + int popCount = isUsingHold && maxDepth < piecesDepth ? maxDepth + 1 : maxDepth; + output("Piece pop count = " + popCount); + if (popCount < piecesDepth) { + output(); + output("####################################################################"); + output("WARNING: more pieces is inputted than necessary."); + output(" so redundant results may be obtained."); + output("####################################################################"); + output(); + } output();