   values: null
   year: 2015
   initialNumCranes: null
+  carryingCapacity: 1000
   numCranes: null
   percentageEggsToTake: null
   captiveEggSurvival: null

  
  drawChart: ->
    @chart.render()
   
  updatePopulation: (year) ->
    numPairs = @numCranes / 2
    numEggs = numPairs * @clutchSize
    captive_babies = numEggs * @percentageEggsToTake * @captiveEggSurvival
    #console.log(captive_babies)
    wild_babies = numEggs * (1-@percentageEggsToTake) * @wildEggSurvival
    @numCranes = @numCranes * (1-@overallMortalityRate) + captive_babies + wild_babies
    if @numCranes <= 0
      @numCranes = 0
    # console.log(@numCranes)
    return(@numCranes)


    @extendData()
    @drawChart()
    @runNumber = @runNumber + 1
    @notDone = @runNumber < 100
    console.log("Run number #{@runNumber}")
    setTimeout(@tick, @tickLength) if @isRunning and @notDone

