Please note, this blog entry is from a previous course. You might want to check out the current one.

Make the Set game a two player game. There’s no need to go overboard here. Think of a simple UI and a straightforward implementation that make sense.

In storyboard dublicate the set-game view controller, add a now image for the tab bar and remove the cheat button (we did not add a penalty for cheating in task #2 and it would be unfair for the two player game 😉 ) – and of course link it to the tab view contorller:cs193p – assignment #4 extra task #3 – two-player view controllerContinue reading “cs193p – Assignment #4 Extra Task #3”

Please note, this blog entry is from a previous course. You might want to check out the current one.

Knowing how to find Sets in the remaining cards also would allow you to let the user cheat. Have a button that will show them a Set (if available). It’s up to you how you want to show it, but maybe some little indicator (a star or something) on each of the 3 cards?

Please note, this blog entry is from a previous course. You might want to check out the current one.

You could add better score-keeping to the Set part of this application if you can figure out an algorithm for calculating whether a Set exists in the current cards in play. Then you can penalize the user not only for mismatches, but for clicking the “deal 3 more cards” button if he or she missed a Set. You’d also know when the game was “over” (because the user would click on “deal 3 more cards” and there would be no more cards in the deck and no more Sets to choose).

The game model needs a new public method returning matching cards. For this task a method returning a boolean result would be sufficient, but we will use the same method for the next task:

Please note, this blog entry is from a previous course. You might want to check out the current one.

Use a UIDynamicAnimator to allow the cards in either game to be gathered up into a pile via a pinch gesture. Once gathered, the stack of gathered cards must be able to be moved around (via a pan gesture). Tapping on the stack will return the cards to their normal positions (animated, of course) unharmed.

Start by adding a pan and a pinch to the grid views of both game view controllers in storyboard and link them to actions in the generic game-view-controller class.

Add a new property to the game-view-controller class, which will store the current animations:

Please note, this blog entry is from a previous course. You might want to check out the current one.

The movement of the elements inside your UI that occur in response to device rotation must be animated (Autolayout already animates any changes it makes for you, but any other layout changes that you do in code must be animated by you).

Please note, this blog entry is from a previous course. You might want to check out the current one.

The game must work properly (and look good) in both Landscape and Portrait orientations on both the iPhone 4 and the iPhone 5. Use Autolayout as much as possible to make this work. Positioning the cards themselves will require some additional work (although you are probably already doing this work for some of the Required Tasks above). None of your code should be specific to any given screen width or height or orientation (i.e. no “if landscape then” or “if width/height … then” code). The bottom line of this task is that your MVCs’ Views should look good in any reasonably-sized bounds rectangle.

Go to storyboard make sure, all views in all controllers are where they should be (aligned with blue lines etc…), and add constraints using “reset to suggested constraints”:cs193p – assignment #4 task #8 – set suggested constraintsContinue reading “cs193p – Assignment #4 Task #8”