//
//  HistoricVM.swift
//  DouShouQi_App
//
//  Created by Rémi REGNAULT on 29/05/2024.
//

import Foundation
import SwiftUI
import DouShouQiModel

class HistoricVM: ObservableObject {
    // Properties
    public var gameVMs: [GameVM]
    
    // Init
    init() {
        gameVMs = []
        do {
            let game = try Game(withRules: VerySimpleRules(), andPlayer1: HumanPlayer(withName: "Rémi", andId: .player1)!, andPlayer2: HumanPlayer(withName: "Nathan", andId: .player2)!)
            gameVMs.append(GameVM(withGame: game))
        } catch {
            // Do nothing
        }
    }
}
