From d4362cdf910fe1b996644f72950e98227b5bf6d8 Mon Sep 17 00:00:00 2001 From: Nathan Date: Mon, 24 Jun 2024 10:40:13 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Update:=20SelectPlayerView=20for=20?= =?UTF-8?q?create=20players?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DouShouQi_App/Views/Player/SelectPlayerView.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/DouShouQi_App/DouShouQi_App/Views/Player/SelectPlayerView.swift b/DouShouQi_App/DouShouQi_App/Views/Player/SelectPlayerView.swift index 6beeec4..ada17c2 100644 --- a/DouShouQi_App/DouShouQi_App/Views/Player/SelectPlayerView.swift +++ b/DouShouQi_App/DouShouQi_App/Views/Player/SelectPlayerView.swift @@ -7,6 +7,7 @@ import SwiftUI import SpriteKit +import DouShouQiModel struct SelectPlayerView: View { @@ -26,7 +27,7 @@ struct SelectPlayerView: View { HStack { VStack(alignment: .trailing) { - MainMenuButton(text: "Start", destination: GameView(), sound: "TitleScreenButtonSound", horizontalAlignment: .trailing, topLeftCorner: 10, bottomLeftCorner: 10) + MainMenuButton(text: "Start", destination: GameView(gameVM: PlayingGameVM(withRules: ClassicRules(), andPlayer1: HumanPlayer(withName: player1.player.name, andId: .player1)!, andPlayer2: HumanPlayer(withName: player2.player.name, andId: .player2)!)!), sound: "TitleScreenButtonSound", horizontalAlignment: .trailing, topLeftCorner: 10, bottomLeftCorner: 10) MainMenuButton(text: "Settings", destination: ContentView(), sound: "TitleScreenButtonSound", horizontalAlignment: .trailing, topLeftCorner: 10, bottomLeftCorner: 10) } }