GithubHelp home page GithubHelp logo

cs193p's Introduction

codebeat badge Swiftlint

Stanford Engineering CS193p: Developing iOS Apps

This is my very long path through the iOS development course. There are 17 + 3 lectures and 6 problem + 3 reading assignments.

Goals:

  1. Complete this course from cover to cover.
  2. Follow the codestyle.
  3. Get familiar with CI and stuff.
  4. Have fun.

Miniprojects that were created alongside this course:

  1. svg2swift converter - just a useless python tool to convert SVG's path to swift lines.
  2. TBD

Lectures

Lecture Slides Video Progress
1. Overview of iOS ✔️
2. Model View Controller (MVC) ✔️
FL1 Debugging: Xcode Tips & Tricks ✔️
3. Swift ✔️
4. Protocols & Closures ✔️
5. Drawing in iOS
6. Multitouch & Multiple MVCs
7. Multiple MVCs, Timer, Animation
8. Animation
FL2 Github, Source Code Workflow
9. View Controller Lifecycle, Scroll View
10. Multithreading & AutoLayout
FL3 Instruments
11. Drag and Drop, UITableView, & UICollectionView
12. Emoji Art Demo, UITextField
13. Emoji Art Demo, Persistence
14. More about Documents, Demo
15. Alert and Action Sheet, Notifications & KVO, Application Lifecycle
16. Segues - Modal, Popover, Unwind, Embed
17. Core Motion & Camera

Reading Assignments

Reading Name Progress
1. Reading 1: Intro to Swift ✔️
2. Reading 2: More Swift ✔️
3. Reading 3: Finishing off Swift ✔️
4. Additional Reading 4: Updates of swift 5.1 ✔️

Problem Sets

PS Name Progress
1. Assignment 1: Concentration ✔️
2. Assignment 2: Set ✔️
3. Assignment 3: Graphical Set 🕑
4. Assignment 4: Animated Set
5. Assignment 5: Image Gallery
6. Assignment 6: Persistent Image Gallary
7. TBA TBA

Advanced topics

Reading Name Progress
1. iOS SDK Updates 🕑

cs193p's People

Contributors

sencudra avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cs193p's Issues

[PA2] Add new cards generator for replacing matched one

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).

[PA2] Add nice look to the app

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 7 or later device. This means you’ll need to do some simple Autolayout with stack views.

2019 CS193P

There is a possibility to update it to new ios and 2019 classes.

[PA1 Extra] Add icons

Describe the solution you'd like

Iphone (2x, 3x):

  • 20pt: 40x40px, 60x60px
  • 29pt: 58x58px, 87x87px
  • 40pt: 80x80px, 120x120px
  • 60pt: 120x120px, 180x180px

Ipad (1x, 2x):

  • 20pt: 20x20px, 40x40px
  • 29pt: 29x29px, 58x58px
  • 40pt: 40x40px, 80x80px
  • 76pt: 76x76px, 152x152px

[PA2] Deal 12 cards only to start.

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.

[PA1.4] Randomize cards on initialization

Currently the cards in the Model are not randomized (that’s why matching cards end
up always in the same place in our UI). Shuffle the cards in Concentration’s init()
method.

[PA1.7] Add a game score label

Add a game score label to your UI. Score the game by giving 2 points for every match
and penalizing 1 point for every previously seen card that is involved in a mismatch.

[PA1.3] “New Game” button

Requirements:

  • Add a “New Game” button to your UI which ends the current game in progress and
    begins a brand new game.

[PA2] Add match/mismatch indication

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.

[PA2] Add scoring to the game

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.

[PA2 Extra] Add help for user

If you do write an algorithm to detect Sets, you could also add a “cheat” button that a struggling user could use to find a Set!

[PA3] Add gesture support

  1. A tap gesture on a card should select/deselect it.
  2. A swipe down gesture in your game should Deal 3 More Cards.
  3. A rotation gesture cause all of your
    cards to randomly reshuffle.

[PA1 Extra] Change the background and the “card back color” to match the theme.

Change the background and the “card back color” to match the theme.

For example:
Our Halloween theme has a black background and orange card backs. Maybe a
“winter” theme might have blue and white colors. A “construction” theme could be
black and yellow. UIViewController has a property called view which is connected to
the top-level view in the scene (i.e. the view that was black in lecture).

[PA3] Add two-player mode

No need to go overboard here. Maybe just a button for each user that can be used to claim they see a Set on the board, then that player has a certain (fairly short) amount of time to actually choose the Set or the other person gets a turn (with twice as much time to find a Set)? Most Sets found wins. Hitting Deal 3 More Cards on one user’s side might give the other person a medium amount of time to find a Set without penalty if they can’t? Up to you.
You’ll probably need Timer (as mentioned in last week’s extra credit) to do this one.

[PA3] Implement Cards rescaling

Do not “pre-allocate” space for all 81 possible cards. At any given time, cards should
be as large as possible given the screen real estate available to cards and the number of
cards currently in play. In other words, when the game starts (with only 12 cards), the
cards will be pretty big, but as more and more cards appear on screen (due to Deal 3
More Cards), they will have to get smaller and smaller to fit.

[PA1] Finalize the programm

Is your feature request related to a problem?
Code needed to be refactored in terms of protocols and closures.

Describe the solution you'd like

  • Rewrite messy stuff in viewcontroller
  • Rewrite messy stuff in concentration
  • Update git tag

[PA2] Add Disabled state of 3 more cards button

The Deal 3 More Cards button should be disabled if there are:

  • no more cards in the Set deck
  • 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).

[PA2] Add time measurement for the game

Factor “speed of play" into the user’s score. You can find out what time it is (to a fraction of a second) using the Date struct. The faster the user finds Sets, the higher his or her score should be. The penalty for mismatches probably needs to be high to discourage too much guessing.

[PA2] Use special characters for cards

Instead of drawing the Set cards in the classic form (we’ll do that next week), 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.

[PA2 Extra] Add computer to the game

Have a “play against the iPhone” mode. Each time a set is found, start a random-length timer (you’ll have to learn how to use Timer.scheduledTimer(withTimeInterval:repeats:) { } for this which uses a
closure!) after which the iPhone picks a set if the user does not pick one first. See who can get the most sets! Maybe represent the iPhone with an emoji somewhere on the screen (� while the timer is running, then maybe � a couple of seconds before the iPhone makes a turn and � if the iPhone wins or � if not)? As always, be sure to give careful thought to your MVC architecture if you tackle this one.

[PA1.5] Add the concept of a "theme"

Give your game the concept of a “theme”. A theme determines the set of emoji from
which cards are chosen. All emoji in a given theme are related by that theme. See the
Hints for example themes. Your game should have at least 6 different themes and
should choose a random theme each time a new game starts.

[PA1 Extra] Add score dependance from time

You can find out what time it is using the Date struct. Read the documentation to
figure out how it works and then use it to adjust your scoring so that the more quickly
moves are made, the better the user’s score is. You can modify the scoring Required
Task in doing this, but the score must still somehow be dependent on matches being
rewarded and mismatches of previously-seen cards being penalized (in addition to
being time-based). It’s okay if a “good score” is a low number and a “bad score” is a
high number.

[PA2] Allow player to select cards

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).

Hints:-

  • You can show selection using the UIButton’s backgroundColor if you want, but UIKit
    also knows how to put a border around any UIView (including a UIButton) with code
    like this (which would draw a 3 points wide border in blue, for example):
   button.layer.borderWidth = 3.0
   button.layer.borderColor = UIColor.blue.cgColor
  • You can also round the corners of your button if you want using a similar mechanism:
   button.layer.cornerRadius = 8.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.