A classic example of an object is a playing card.There are numerous games that utilize a deck of 52 playing cards; consider the game called Set instead. The object of the game is to identify “sets” of 3 cards from an array of 12 cards.
Each card has fourfeatures:
1.Symbols -oval, squiggle, or diamond
2.Color -Red, green, or purple
3.Number -one, two or three
4.Shading -filled, open, or striped. A “set” consists of 3 cards in which each of the card's features, looked at one-by-one, are the same on each card or different on each card. All features must satisfy this rule.

As an example, consider the following 3 cards --•2 red filled squiggles •2 red striped squiggles •2 red open squiggles These cards form a set because:
1.They all feature squiggles
2.They are all red
3.They all have 2 symbols on them
4.One of them is filled, one is striped, and one is open.
Now consider the following 3 cards --•2 red filled squiggles •2 red striped squiggles•2 green open squiggles.
These cards do not form a set because two of the cards are red and one is green.

Now consider the following 3 cards --•2 red filled squiggles •1 green striped oval •3 purple open diamondsIs this a set? Yes Why? Because all of the features on the cards are different.

Create a program that will solve the Daily Set puzzle (see https://www.setgame.com/set/puzzlefor more details).Your program shouldimplement a command line (text-based interface) capable of handling the following commands:

exit –exits the program

load<file>as <puzzle>-reads a file containing a list of cards and stores them in the puzzle named puzzle. This command will create a new puzzle if necessary.

load<file>-parses the contents of the file as if they were entered from the command line

display–displays the list of created

puzzlesdisplay<puzzle>–displays the cards stored in the puzzle named puzzle

new<puzzle>-creates an empty puzzle named puzzle

remove <puzzle>-Removes the specified puzzlefrom the list.

remove <card>from <puzzle>-Removes the specified card from the puzzle named puzzle.

add<card> to<puzzle>-Inserts the specified card into the puzzle name puzzle.

solve<puzzle>-solves the specified puzzle and displays its solution.

solve<card1> <card2>-displays the card required to form a set with card1and card2.

test<card1> <card2><card3>-displays whether card1, card2, and card3 form a set.

Note: <file>and <puzzle>are strings but will not contain spaces. All <card>entries are 4 characters long and have the following format:[number][color][shading][shape]Where [number]= {1,2,3}, [color]= {G,P,R}, [shading]= {F,O,S}, [shape]= {D,O,S}.This means that the card showing 2 red filled ovals would be represented as 2RFO and the cardshowing 1 green striped squiggle would be represented as 1GSS.

Recommended Answers

All 3 Replies

Dead link for me: "The page you requested does not exist. For your convenience, a search was performed using the query set puzzlefor."

Also, this sounds like you are searching for others to write this for you. If so, fix your link and provide what you are paying.
If this is you wanting to write such, show your code so far and share what stopped you.
If this is homework, then show even less code and focus on what stopped you.

yes I do can you please help me

please I need help I only have two sets

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.