We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a4deb33 commit 48a5cdbCopy full SHA for 48a5cdb
player/src/sc/player2020/logic/Logic.java
@@ -50,7 +50,7 @@ public void onRequestAction() {
50
long startTime = System.currentTimeMillis();
51
log.info("Es wurde ein Zug angefordert.");
52
List<Move> possibleMoves = GameRuleLogic.getPossibleMoves(gameState);
53
- sendAction(possibleMoves.get((int) (Math.random() * possibleMoves.size())));
+ sendAction(possibleMoves.isEmpty() ? null : possibleMoves.get((int) (Math.random() * possibleMoves.size())));
54
}
55
56
/**
0 commit comments