//
//  DetailGameHistory.swift
//  ArkitDoushiQi
//
//  Created by Enzo JOLYS on 22/05/2024.
//

import SwiftUI
import DouShouQiModel

struct DetailGameHistory: View {
    
    let game:Game
    
    var body: some View {
            ZStack(){
                Color.red
                Color.gray
                HStack(){
                    Text(game.players[.player1]?.name ?? "Inconnu")
                    Text(" VS ")
                    Text(game.players[.player2]?.name ?? "Inconnu")
                    Spacer()
                }
            }
        }
}

struct DetailGameHistory_Previews: PreviewProvider {
    static var previews: some View {
        DetailGameHistory(game: try! Game(withRules: VerySimpleRules(), andPlayer1: Player(withName: "Player 1 ", andId: .player1)!, andPlayer2: Player(withName: "Player 2 ", andId: .player2)!))
    }
}
