Assignment 4

Tic Tac Toe

Due Dates


Create Your Repository


In this assignment, you will create a tic tac toe game. The game should be designed for two players to play against each other on a single device. You will use UIGestureRecognizer, UIView animations, CALayer, UIBezierPath, and optionally, CABasicAnimation.

Project Setup

Initial User Interface

Grid View

TIP: Your nine views do not need to be subviews of the grid view.

X’s and O’s

TIP: User interaction is NOT enabled by default on labels and image views, so you will need to enable it.

Initial Layout
Initial Layout

Instructions View

Instructions View
Instructions View

Game Play

Start of a Turn

During a Turn

frame1.intersects(frame2) // returns a boolean

End of a Turn

Game End

Declare a Winner or Tie

Declaring a winner
Declaring a winner

Clear the Board

Grid Model

let grid: Grid = Grid()

TIP: Remember that "Grid" is not the same as "GridView". Model and view are represented by different classes, both of which are managed by the controller.

Extra Credit (10%)

Extra Credit
Extra Credit

App Icon