package main import ( "strings" ) func IsKingdom(Card Card, SplitPile []Card) bool { switch Card.Name { case "Platinum": return false case "Gold": return false case "Silver": return false case "Copper": return false case "Province": return false case "Duchy": return false case "Estate": return false case "Curse": return false } switch Card.Type { case "State": return false case "Hex": return false case "Boon": return false case "Landmark": return false case "Event": return false } if strings.Contains(Card.Type, "Prize") { return false } if strings.Contains(Card.Type, "Ruins") { return false } if strings.Contains(Card.Type, "Shelter") { return false } if strings.Contains(Card.Type, "Heirloom") { return false } if strings.Contains(Card.text, "(This is not in the Supply.)") { return false } if strings.Contains(Card.Type, "Castle") && Card.Name != "Humble Castle" { return false } if IsSplitCardOnBottom(Card, SplitPile) { return false } return true } func IsSplitCardOnBottom(Card Card, SplitPile []Card) bool { for _, v := range SplitPile { names := strings.Split(v.Name, "/") if Card.Name == names[1] { return true } } return false }