mirror of
https://github.com/magefree/mage.git
synced 2025-12-28 06:22:01 -08:00
* Match - Fixed a bug during creation of game info that lets game worker die. Leading to open game workers. Stops staring new games if game thread limit is reached.
This commit is contained in:
parent
1d1bb4e7d0
commit
581df41ae7
3 changed files with 11 additions and 6 deletions
|
|
@ -277,9 +277,15 @@ public abstract class MatchImpl implements Match {
|
|||
StringBuilder playersInfo = new StringBuilder();
|
||||
int counter = 0;
|
||||
|
||||
Player currentPlayer = null;
|
||||
PlayerList playerList = game.getPlayerList();
|
||||
playerList.setCurrent(game.getStartingPlayerId());
|
||||
Player currentPlayer = game.getPlayer(game.getStartingPlayerId());
|
||||
if (game.getStartingPlayerId() != null) {
|
||||
playerList.setCurrent(game.getStartingPlayerId());
|
||||
currentPlayer = game.getPlayer(game.getStartingPlayerId());
|
||||
}
|
||||
if (currentPlayer == null) {
|
||||
currentPlayer = playerList.getCurrent(game);
|
||||
}
|
||||
do {
|
||||
if (counter > 0) {
|
||||
playersInfo.append(" - ");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue