     switch @mode
       when Mode.MIRROR
         spawnA = spawnB = Math.floor(Math.random() * max) + min
-      when Mode.FLIPPED_MIRROR
+      when Mode.FLIPPED
         spawnA = Math.floor(Math.random() * max) + min
         spawnB = @stage.height - spawnA
       when Mode.VARIANCE

  VARIANCE:2
}

class MonsterSpawner extends Actor
  constructor: (x, y) ->
    super(x, y)
    @spawnSpeed = 2000
    @spawnTime = 0
    @mode = Mode.MIRROR

  _update: (step) =>
    @spawnTime += step
    if @spawnTime >= @spawnSpeed
      @spawnTime -= @spawnSpeed
      @spawnMonsters()

  spawnMonsters: () ->
    min = 15
    max = @stage.height - min * 2

    spawnA = 0
    spawnB = 0


    @stage.addActor(new Monster(@stage.width/2 + 15, spawnA, 0, '#FF0000'))
    @stage.addActor(new Monster(@stage.width/2 - 15,
      spawnB, MathHelpers.toRadians(180), '#0000FF'))

  # Choose a new mode
  # From all modes, pick a new one and assign @node
  updateMode: () =>
    modes = [Mode.MIRROR, Mode.FLIPPED, Mode.VARIANCE]
    modes.splice(@mode, 1)
    index = Math.floor(Math.random() * modes.length)
    @mode = modes[index]