         drawGridLinesInRects(gridLineRects)
         
         if let winningPositions = winningPositions {
-            let
-            winningRects = calculateCellRectsWithPositions(winningPositions, inRect: platformRect),
-            startRect    = winningRects.first!,
-            endRect      = winningRects.last!,
-            orientation  = winningLineOrientationForStartRect(startRect, endRect: endRect),
-            startPoint   = startPointForRect(startRect, winningLineOrientation: orientation),
-            endPoint     = endPointForRect(endRect, winningLineOrientation: orientation)
-            
-            drawWinningLineFromStartPoint(startPoint, toEndPoint: endPoint)
+            let (startPoint, endPoint) = calculateStartAndEndPointsForWinningLineThroughPositions(winningPositions, inRect: platformRect)
+            drawWinningLineFrom(startPoint, to: endPoint)
         }
     }
 }

        }
    }
    
    func calculateCellRectsWithPositions(positions: [GameBoard.Position], inRect rect: CGRect) -> [CGRect] {
        return positions
            .map { calculateCellRectAtRow($0.row, column: $0.column, inRect: rect) }

        }
    }
    
    func drawWinningLineFrom(from: CGPoint, to: CGPoint) {
        context.strokeLineFrom(from, to: to, color: Color.winningLine, width: Thickness.winningLine, lineCap: .Round)
    }
}
