SwiftUI's ForEach is designed for immutable data. However, you're modifying player.cards inside the Button action. If players is an array of structs, mutating a player within the ForEach won't work because structs are value types.