} else if (game.getState() != GameState.LOBBY) {
return error(ErrorCode.ALREADY_STARTED);
} else {
try {
final String value = request.getParameter(AjaxRequest.GAME_OPTIONS);
final GameOptions options = GameOptions.deserialize(value);
final String oldPassword = game.getPassword();
game.updateGameSettings(options);
// only broadcast an update if the password state has changed, because it needs to change
// the text on the join button and the sort order