         }
     }
     
+    func calculateStartAndEndPointsForWinningLineThroughPositions(positions: [GameBoard.Position], inRect rect: CGRect) -> (CGPoint, CGPoint) {
+        let
+        winningRects = calculateCellRectsWithPositions(positions, inRect: rect),
+        startRect    = winningRects.first!,
+        endRect      = winningRects.last!,
+        orientation  = winningLineOrientationForStartRect(startRect, endRect: endRect),
+        startPoint   = startPointForRect(startRect, winningLineOrientation: orientation),
+        endPoint     = endPointForRect(endRect, winningLineOrientation: orientation)
+        return (startPoint, endPoint)
+    }
+    
     func calculateCellRectsWithPositions(positions: [GameBoard.Position], inRect rect: CGRect) -> [CGRect] {
         return positions
             .map { calculateCellRectAtRow($0.row, column: $0.column, inRect: rect) }

        }
    }
    
    func drawWinningLineFromStartPoint(startPoint: CGPoint, toEndPoint endPoint: CGPoint) {
        context.strokeLineFrom(startPoint, to: endPoint, color: Color.winningLine, width: Thickness.winningLine, lineCap: .Round)
    }
}

        drawGridLinesInRects(gridLineRects)
        
        if let winningPositions = winningPositions {
            let (startPoint, endPoint) = calculateStartAndEndPointsForWinningLineThroughPositions(winningPositions, inRect: platformRect)
            drawWinningLineFrom(startPoint, to: endPoint)
        }
    }
}
