Represents a set of three cards in the game of Set. A valid Set consists of exactly three cards, where for each attribute (shape, color, number, and shading), the values must either all be the same or all be different across the three cards.
Value parameters
cards
The sequence of three Card objects that make up the set.
Attributes
Constructor
Creates a Set with a specified sequence of three cards. Ensures the sequence contains exactly three cards.
Checks if the three cards in the set form a valid Set. A valid Set is formed when, for each attribute (shape, color, number, shading), the values are either all the same or all different across the three cards.
Checks if the three cards in the set form a valid Set. A valid Set is formed when, for each attribute (shape, color, number, shading), the values are either all the same or all different across the three cards.
Attributes
Returns
true if the cards form a valid Set, false otherwise.