Little refactor, additional logs for CheckPlayableState error;

This commit is contained in:
Oleg Agafonov 2021-08-28 12:09:22 +04:00
parent 7b298f84a7
commit 2efdb464fc
5 changed files with 12 additions and 9 deletions

View file

@ -2609,6 +2609,10 @@ public class HumanPlayer extends PlayerImpl {
private boolean gameInCheckPlayableState(Game game, boolean ignoreWarning) {
if (game.inCheckPlayableState()) {
if (!ignoreWarning) {
logger.warn(String.format("Current stack: %d - %s",
game.getStack().size(),
game.getStack().stream().map(Object::toString).collect(Collectors.joining(", "))
));
logger.warn("Player interaction in checkPlayableState", new Throwable());
}
return true;