aboutsummaryrefslogtreecommitdiff
path: root/go/client/startMenu.go
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2025-08-06 15:20:15 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2025-08-06 15:20:43 +0200
commita0345c11f8035b300330e6b7c59a654c1e1e231d (patch)
tree9dab905deb708b3c7a2675ee7a95d6d43087b286 /go/client/startMenu.go
parent0cff8c7704187224053a068a1b3a6c166ddfdd6d (diff)
downloadmuhqs-game-a0345c11f8035b300330e6b7c59a654c1e1e231d.tar.gz
muhqs-game-a0345c11f8035b300330e6b7c59a654c1e1e231d.zip
add more challenges
Diffstat (limited to 'go/client/startMenu.go')
-rw-r--r--go/client/startMenu.go17
1 files changed, 2 insertions, 15 deletions
diff --git a/go/client/startMenu.go b/go/client/startMenu.go
index 2c3225b9..aef43ab0 100644
--- a/go/client/startMenu.go
+++ b/go/client/startMenu.go
@@ -137,11 +137,9 @@ func (m *startMenu) build() {
deckInput.Y+deckInput.Height+4*START_BUTTON_HEIGHT,
START_BUTTON_WIDTH,
START_BUTTON_HEIGHT,
- "Challenge",
+ "Challenges",
func(*ui.SimpleButton) {
- m.playerName = playerInput.Text()
- s := game.NewRandomChallenge(m.playerName)
- m.startChallenge(s)
+ activities.PushActivity(NewChallengesMenu(m.app, playerInput.Text()))
}))
}
@@ -189,14 +187,3 @@ func (m *startMenu) startGame() {
activities.PushActivity(g.Start())
}
-
-func (m *startMenu) startChallenge(state game.State) {
- g := newGame(m.app, state)
-
- g.initMapUi()
- p := state.PlayerByName(m.playerName)
- g.activePlayerId = p.Id
- g.initPlayerUi(p)
-
- activities.PushActivity(g.Start())
-}