Skip to content

removed number rounds selection in create game #45

Merged
merged 1 commit into from
Apr 10, 2026
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,8 @@ public void onReady(
GameMode mode,
String playerName,
String gamePin,
int totalRounds,
JoinCreateView view
) {
numRounds = totalRounds;
view.setLoadingState(true);

LobbyService lobbyService = new LobbyService(game.getFirebaseGateway());
Expand All @@ -65,7 +63,7 @@ public void onReady(
lobbyService.createSession(
playerName,
gamePin,
totalRounds,
numRounds,
new LobbyService.CreateSessionCallback() {
@Override
public void onSuccess(SessionCreationResult result) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import group07.beatbattle.model.services.LobbyService;
import group07.beatbattle.ui.components.BackButton;
import group07.beatbattle.ui.components.JoinCreateButton;
import group07.beatbattle.ui.components.RoundSelector;
import group07.beatbattle.ui.dialog.AlertDialogs;
import group07.beatbattle.ui.style.InputFieldStyles;

Expand All @@ -41,7 +40,6 @@ public class JoinCreateView extends ScreenAdapter {
private Label statusLabel;
private Label gameCodeLabel;
private JoinCreateButton readyButton;
private final RoundSelector roundSelector;

private String generatedGamePin = "";

Expand All @@ -68,7 +66,6 @@ public JoinCreateView(BeatBattle game, GameMode mode, LobbyController controller

readyButton = new JoinCreateButton(Strings.readyToPlay(), game.getMontserratFont());
BackButton backButton = new BackButton(Strings.back(), game.getMontserratFont());
roundSelector = new RoundSelector(game.getMontserratFont());

readyButton.addListener(new ChangeListener() {
@Override
Expand All @@ -81,7 +78,6 @@ public void changed(ChangeEvent event, Actor actor) {
mode,
playerNameField.getText(),
gamePinValue,
roundSelector.getSelectedRounds(),
JoinCreateView.this
);
}
Expand All @@ -97,9 +93,6 @@ public void changed(ChangeEvent event, Actor actor) {
root.add(title).padBottom(80).row();
root.add(codeComponent).width(fieldWidth).height(FIELD_HEIGHT).padBottom(40).row();
root.add(playerNameField).width(fieldWidth).height(FIELD_HEIGHT).padBottom(50).row();
if (mode == GameMode.CREATE) {
root.add(roundSelector.getActor()).width(fieldWidth).padBottom(40).row();
}
root.add(readyButton).width(readyButtonWidth).height(READY_BUTTON_HEIGHT).padBottom(30).row();
root.add(backButton).width(backButtonWidth).height(BACK_BUTTON_HEIGHT);

Expand Down
Loading