mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
Refactor: Fix Spelling of userRequestingRollback (#9307)
This commit is contained in:
parent
f760649f4d
commit
de9fcfc7ee
1 changed files with 7 additions and 7 deletions
|
@ -80,7 +80,7 @@ public class GameController implements GameCallback {
|
||||||
private boolean useTimeout = true;
|
private boolean useTimeout = true;
|
||||||
private final GameOptions gameOptions;
|
private final GameOptions gameOptions;
|
||||||
|
|
||||||
private UUID userReqestingRollback;
|
private UUID userRequestingRollback;
|
||||||
private int turnsToRollback;
|
private int turnsToRollback;
|
||||||
private int requestsOpen;
|
private int requestsOpen;
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ public class GameController implements GameCallback {
|
||||||
gameSessionId = UUID.randomUUID();
|
gameSessionId = UUID.randomUUID();
|
||||||
this.userPlayerMap = userPlayerMap;
|
this.userPlayerMap = userPlayerMap;
|
||||||
chatId = managerFactory.chatManager().createChatSession("Game " + game.getId());
|
chatId = managerFactory.chatManager().createChatSession("Game " + game.getId());
|
||||||
this.userReqestingRollback = null;
|
this.userRequestingRollback = null;
|
||||||
this.game = game;
|
this.game = game;
|
||||||
this.game.setSaveGame(managerFactory.configSettings().isSaveGameActivated());
|
this.game.setSaveGame(managerFactory.configSettings().isSaveGameActivated());
|
||||||
this.tableId = tableId;
|
this.tableId = tableId;
|
||||||
|
@ -508,7 +508,7 @@ public class GameController implements GameCallback {
|
||||||
turnsToRollback = -1;
|
turnsToRollback = -1;
|
||||||
requestsOpen = -1;
|
requestsOpen = -1;
|
||||||
} else {
|
} else {
|
||||||
userReqestingRollback = userId;
|
userRequestingRollback = userId;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Player player = game.getPlayer(playerId);
|
Player player = game.getPlayer(playerId);
|
||||||
|
@ -528,12 +528,12 @@ public class GameController implements GameCallback {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ADD_PERMISSION_TO_ROLLBACK_TURN:
|
case ADD_PERMISSION_TO_ROLLBACK_TURN:
|
||||||
if (userReqestingRollback != null && requestsOpen > 0 && !userId.equals(userReqestingRollback)) {
|
if (userRequestingRollback != null && requestsOpen > 0 && !userId.equals(userRequestingRollback)) {
|
||||||
requestsOpen--;
|
requestsOpen--;
|
||||||
if (requestsOpen == 0) {
|
if (requestsOpen == 0) {
|
||||||
game.rollbackTurns(turnsToRollback);
|
game.rollbackTurns(turnsToRollback);
|
||||||
turnsToRollback = -1;
|
turnsToRollback = -1;
|
||||||
userReqestingRollback = null;
|
userRequestingRollback = null;
|
||||||
requestsOpen = -1;
|
requestsOpen = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -544,9 +544,9 @@ public class GameController implements GameCallback {
|
||||||
if (playerId != null) {
|
if (playerId != null) {
|
||||||
Player player = game.getPlayer(playerId);
|
Player player = game.getPlayer(playerId);
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
if (userReqestingRollback != null && requestsOpen > 0 && !userId.equals(userReqestingRollback)) {
|
if (userRequestingRollback != null && requestsOpen > 0 && !userId.equals(userRequestingRollback)) {
|
||||||
turnsToRollback = -1;
|
turnsToRollback = -1;
|
||||||
userReqestingRollback = null;
|
userRequestingRollback = null;
|
||||||
requestsOpen = -1;
|
requestsOpen = -1;
|
||||||
game.informPlayers("Rollback request denied by " + player.getLogName());
|
game.informPlayers("Rollback request denied by " + player.getLogName());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue