             .takeUntil(Observable.combineLatest(winner$, tie$))
             .subscribe()
         
+        let gameEnd$ = Observable.combineLatest(winner$, tie$)
+            .subscribe(
+                onNext: { x in
+                    print("game over!")
+            }
+        )
         
+        // MARK: Render
         // perform a render of the entire new game state
         // explicitly discard any return values by using `_`
         _ = gameState$

                    .take(1)]
        })
        
        // game state
        let gameState$ = Observable.merge(clicks$)
            .scan(defaultGameState, accumulator: { (prevState: GameState, move: (uiElement: UIButton, position: Position)) -> GameState in

    override func viewDidLoad() {
        super.viewDidLoad()
        
        // MARK: Setup
        self.cells = [
            Cell(uiElement: pieceTL, position: Position(x: 0, y: 0)),
            Cell(uiElement: pieceTC, position: Position(x: 1, y: 0)),
