cs193p – Project #3 Assignment #3 Task #3

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

Add a new button to your calculator’s user-interface which, when touched, segues to a new MVC (that you will have to write) which graphs the program in the CalculatorBrain at the time the button was touched using the memory location M as the independent variable. For example, if the CalculatorBrain contains sin(M), you’d draw a sine wave. Subsequent input to the Calculator must have no effect on the graph (until the graphing button is touched again).

Currently we have not really space left to add another button. For now add the graph button in the top left corner – maybe we move it in the extra tasks later on – and add some sensible autolayout constraints.

cs193p - Project #3 Assignment #3 Task #3 - Graph Button
cs193p – Project #3 Assignment #3 Task #3 – Graph Button

Continue reading “cs193p – Project #3 Assignment #3 Task #3”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

cs193p – Project #3 Assignment #3 Task #2

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

Rename the ViewController class you’ve been working on in Assignments 1 and 2 to be CalculatorViewController.

Rename the filename, by selecting the filename and clicking one additional time:

cs193p - Project #3 Assignment #3 Task #2 - Rename Filename
cs193p – Project #3 Assignment #3 Task #2 – Rename Filename

Continue reading “cs193p – Project #3 Assignment #3 Task #2”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

cs193p – Project #3 Assignment #3 Task #1

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

You must begin this assignment with your Assignment 2 code, not with any in-class demo code that has been posted. Learning to create new MVCs and segues requires experiencing it, not copy/pasting it or editing an existing storyboard that already has segues in it.

… cross my heart …

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

cs193p – Assignment #3 Extra Task #4

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

Add yet another tab for some “settings” in the game (match bonuses, etc.).

Create new model handling the game settings (like we did already for game results). Its public interface consists of our game settings:

@property (nonatomic) int matchBonus;
@property (nonatomic) int mismatchPenalty;
@property (nonatomic) int flipCost;

Continue reading “cs193p – Assignment #3 Extra Task #4”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

cs193p – Assignment #3 Extra Task #3

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

Include the ability to sort the scores shown in the Extra Credit above by last played, score or game duration.

Adjust the layout and add three buttons:

cs193p – assignment #3 extra task #3 – sorting
cs193p – assignment #3 extra task #3 – sorting

Continue reading “cs193p – Assignment #3 Extra Task #3”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

cs193p – Assignment #3 Extra Task #2

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

Add another tab to track the user’s high scores. You will want to use NSUserDefaults to store the high scores permanently. The tab might want to show information like the time the game was played and the game’s duration. It must also be clear which scores were Playing Card matching games and which scores were Set card matching games. Use attributes to highlight certain information (shortest game, highest score, etc.).

Let’s introduce a new model – which we actually borrow from last years course – which manages game results.

Its public interface needs a class method which returns an array of all available game scores, properties to hold the start time (date), the end time (date), the duration of the game, the score, and type of the game (set or playing cards). Finally it needs two helper methods which we will use to sort the game results by score and duration.
Continue reading “cs193p – Assignment #3 Extra Task #2”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

cs193p – Assignment #3 Extra Task #1

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

Create appropriate icons for your two tabs. The icons are 30×30 and are pure alpha channels (i.e. they are a “cutout”). Search the documentation for more on how to create icons like that and set them.

Create the icons using your favorite graphic program, add them to your image assets and choose them as tab bar icons:

cs193p – assignment #3 extra task #1 – tab bar icons
cs193p – assignment #3 extra task #1 – tab bar icons

The complete code is available on github.

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail