subject

Swift 1. Implement a game of solo (i. e. one player) Set
2. Have room on the screen for at least 24 Set cards. All cards are always face up in Set.
3. Deal 12 cards only to start. They can appear anywhere on screen (i. e. they don't have to be aligned at the top or bottom or anything; they can be scattered to start if you want), but should not overlap.
4. You will also need a "Deal 3 More Cards" button (as per the rules of Set).
5. Allow the user to select cards to try to match as a Set by touching on the cards. It is up to you how you want to show "selection" in your UI. See Hints below for some ideas. Also support "deselection" (but when only 1 or 2 (not 3) cards are currently selected).
6. After 3 cards have been selected, you must indicate whether those 3 cards are a match or a mismatch (per Set rules). You can do this with coloration or however you choose, but it should be clear to the user whether the 3 cards they selected match or not.
7. When any card is chosen and there are already 3 non-matching Set cards selected, deselect those 3 non-matching cards and then select the chosen card.
8. As per the rules of Set, when any card is chosen and there are already 3 matching Set cards selected, replace those 3 matching Set cards with new ones from the deck of 81 Set cards (again, see Set rules for what's in a Set deck). If the deck is empty then matched cards can't be replaced, but they should be hidden in the UI. If the card that was chosen was one of the 3 matching cards, then no card should be selected (since the selected card was either replaced or is no longer visible in the UI).
9. When the Deal 3 More Cards button is pressed either a) replace the selected cards if they are a match or b) add 3 cards to the game.
10. The Deal 3 More Cards button should be disabled if there are a) no more cards in the Set deck or b) no more room in the UI to fit 3 more cards (note that there is always room for 3 more cards if the 3 currently-selected cards are a match since you replace them).
11. Instead of drawing the Set cards in the classic form (we'll do that next assignment), we'll use these three characters β–² ⬀ β—Ό And use attributes in NSAttributedString to draw them appropriately (i. e. colors and shading). That way your cards can just be UIButtons. See the Hints for some suggestions for how to show the various Set cards.
12. Use a method that takes a closure as an argument as a meaningful part of your solution. You cannot use one that was shown in lecture.
13. Use an enum as a meaningful part of your solution.
14. Add a sensible extension to some data structure as a meaningful part of your solution. You cannot use one that was shown in lecture.
15. Your UI should be nicely laid out and look good (at least in portrait mode, preferably in landscape as well, though not required) on any iPhone 8 or later device. This means you'll need to do some simple Autolayout with stack views.
16. Like you did for Concentration, you must have a New Game button and show the Score in the UI. It is up to you how you want to score your Set game. For example, you could give 3 points for a match and -5 for a mismatch and maybe even -1 for a deselection. Perhaps fewer points are scored depending on how many cards are on the table (i. e. how many times Deal 3 More Cards has been touched). Whatever you think best evaluates how well the player is playing.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 13:30
The source manager dialog box allows you to create sources, copy sources created and used in all the documents, modify sources an add bibliographic information to placeholders. true or false
Answers: 2
question
Computers and Technology, 21.06.2019 21:30
You need to write some code that responds to a text change in a jtextfield. how can you do that? create a class that implements the interface actionlistener and override the method textfieldchanged create a class that extends the superclass actionlistener and override the method actionperformed create a class that implements the interface actionlistener and override the method actionperformed create a class that extends the superclass actionlistener and override the method textfieldchanged
Answers: 2
question
Computers and Technology, 22.06.2019 17:30
Rachel completed typing an official document with a word processing program. she wants to make sure that her document has no typographical errors. she also wants all headings to have the same font. which features in a word processing program should she use? rachel should use the feature in a word processing program to find typographical errors. she should apply to have uniform headings.
Answers: 1
question
Computers and Technology, 23.06.2019 09:30
:you areto design the controller for alight that functions both as an ordinary light and also as a motion activated light and alarm. a.if the manual switch s is on, then the light l is on. b.besides the manual switch, there is a motion detector, m1, which activatesthis light.c.if motion is detected but the light is on anyway because s is on, only then a secondoutput a, an alarm, is turned on. d.the disable switch, d, disables the motion activated light and alarmbut leaves manual control operation of the light using switch s.(i)read the problem statement and clearly identify the inputs and outputs for the circuit you are designing. (ii)create the truth table for this system; include the light, alarm, switch, disable, and the motion sensor.(iii)draw a schematic of this system.
Answers: 1
You know the right answer?
Swift 1. Implement a game of solo (i. e. one player) Set
2. Have room on the screen for at le...
Questions
question
French, 21.10.2020 02:01
question
Mathematics, 21.10.2020 02:01
question
Mathematics, 21.10.2020 02:01
question
Mathematics, 21.10.2020 02:01
Questions on the website: 13722362