import Testing @testable import SoliCards @Suite("Klondike Rules Tests") struct KlondikeRulesTests { let rules = KlondikeRules() @Test("Deal creates correct tableau layout") func dealLayout() { let deck = Deck.standard() let snapshot = rules.deal(deck: deck) // 7 tableaus with 1,2,3,4,5,6,7 cards #expect(snapshot.tableaus.count == 7) for i in 0..<7 { #expect(snapshot.tableaus[i].count == i + 1) // Top card face-up #expect(snapshot.tableaus[i].last!.isFaceUp) // All others face-down for j in 0.. GameSnapshot { GameSnapshot( tableaus: Array(repeating: [], count: 7), foundations: [[], [], [], []], stock: [], waste: [], freeCells: [], moves: 0, score: 0 ) } }