Skip to content

Swift version of Stanford's cs193p Matchismo: MVVM, unit tests, UIDynamics and UICollectionView

Notifications You must be signed in to change notification settings

mr-v/Matchismo-Swift

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Matchismo

A Swift version of a Matchismo game from Stanford's cs193p course "Developing iOS 7 Apps for iPhone and iPad" (2013/2014).

Requires Xcode 6.1 to build.

Idea

Use applications functionality from lectures/assignments as a set of requirements, but don't follow class design from lectures. Differences in approach to code design and implementation:

  • design without insight into how application will change during next lecture (e.g. avoid creating inheritance hierarchies prematurely)
  • use MVVM-like view-model adapter between game logic and UI
  • keep view controllers light
  • develop game's logic and view-model in a TDD manner
  • take advantage of Swift language features, including:
    • enums
    • structs
    • generics
  • use UICollectionView for cards' layout
    • to switch between layouts - pinch-in/out
    • custom layouts features:
      • scales collection view items to fit all on screen
      • UIDynamics driven layout for gathering cards in a stack and moving them around

Tags

Each set of requirements is tagged (milestones: lectures, assignments)

Credits

  • PlayingCardView.swift - code from lectures converted to Swift
  • playing card images - taken from cs193p's SuperCard project

About

Swift version of Stanford's cs193p Matchismo: MVVM, unit tests, UIDynamics and UICollectionView

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages