 
 class GameOfLifeScreenSaverView: ScreenSaverView {
     
-    private static let cellSize: Int = 50
+    private static let targetCellSize: CGFloat = 50.0
     
     private static let frameRate = 60.0
     private static let transitionTime = 2.75

    override func draw(_ dirtyRect: NSRect) {
        super.draw(dirtyRect)
        
        let horizontalOffset = (self.frame.width - CGFloat(self.game.width * GameOfLifeScreenSaverView.cellSize)) / 2.0
        let verticalOffset = (self.frame.height - CGFloat(self.game.height * GameOfLifeScreenSaverView.cellSize)) / 2.0
        
        self.game.mapCells { x, y, cell in
            let cellRect = NSRect(
                x: CGFloat(x * GameOfLifeScreenSaverView.cellSize) + horizontalOffset,
                y: CGFloat(y * GameOfLifeScreenSaverView.cellSize) + verticalOffset,
                width: CGFloat(GameOfLifeScreenSaverView.cellSize),
                height: CGFloat(GameOfLifeScreenSaverView.cellSize)
            )

            let cellColor = self.color(forCell: cell)

    }

    override init?(frame: NSRect, isPreview: Bool) {
        let gameWidth = Int(frame.width / GameOfLifeScreenSaverView.targetCellSize)
        self.cellSize = frame.width / CGFloat(gameWidth)
        let gameHeight = Int(frame.height / self.cellSize)

        self.game = GameOfLife(width: gameWidth, height: gameHeight)
        self.game.randomizeCells()
        self.game.step()
        
