 
       $scope.sharks.push(new Shark(x, y, velX, velY))
 
-  setInterval($scope.spawnShark, 1000/$scope.sharksPerSecond)
 
+  # Keep track of whether the left and right arrow keys are down
   $scope.keyevent = ($event) ->
     keydown = $event.type is 'keydown'
     switch $event.which


  $scope.raft = new Raft($scope.raftHitPoints)
  $scope.sharks = []

  $scope.dt = 0
  $scope.last = timestamp()

        $scope.update()
      $scope.last = now


  $scope.startLoop = ->
    $scope.frame()
    requestAnimationFrame($scope.startLoop)

  requestAnimationFrame($scope.startLoop)


  $scope.spawnShark = ->
    # Small chance to spawn a fast shark heading for the raft
