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

import SwiftUI
import DouShouQiModel

struct History: View {
    
    var listGame:[Game] = try! [Game(withRules: VerySimpleRules(), andPlayer1: Player(withName: "Player 1 ", andId: .player1)!, andPlayer2: Player(withName: "Player 2 ", andId: .player2)!)]
    
    var body: some View {
            VStack(){
                EnteteHistory()
                NavigationStack {
                    List(listGame, id: \.board){ game in
                        DetailGameHistory(game: game)
                    }
                }
            }
        }
}

struct History_Previews: PreviewProvider {
    static var previews: some View {
        History()
    }
}
