Test framework: simplified AI logic and tests, added usage comments. Devs recommendations:

* in card's code use player.isComputer instead player.isHuman (it help to split Human/AI logic and test both by unit tests);
* usage example: AI hint to skip or auto-calculate choices instead call of real choose dialogs;
* unit tests for Human logic: call normal commands;
* unit tests for AI logic: call aiXXX commands;
This commit is contained in:
Oleg Agafonov 2021-03-07 22:51:58 +04:00
parent 00c7b3753c
commit 2906f86324
22 changed files with 106 additions and 47 deletions

View file

@ -1418,7 +1418,7 @@ public abstract class GameImpl implements Game, Serializable {
+ ex.getMessage());
}
Player activePlayer = this.getPlayer(getActivePlayerId());
if (activePlayer != null && !activePlayer.isTestMode()) {
if (activePlayer != null && !activePlayer.isTestsMode()) {
errorContinueCounter++;
continue;
} else {