 
   # TODO: Check chain-breeding.
   eggMoves = []
-  loopLearnsets forGeneration, SpeciesData, FormeData, pokemon, (learnset) ->
+  looper (learnset) ->
     return  if !learnset['egg']
     for moveName of learnset['egg']
       continue  if moveName in eggMoves || moveName not in leftoverMoves

# Returns an array of moves that this Pokemon can learn for a given generation.
self.learnableMoves = (pokemon, forGeneration) ->

self.checkMoveset = (SpeciesData, FormeData, pokemon, forGeneration, moves) ->
  leftoverMoves = []
  for move in moves
    if !self.checkMove(SpeciesData, FormeData, pokemon, forGeneration, move)
      leftoverMoves.push(move)

  # This Pokemon can learn all moves through level-up, tutoring, or machines.
  return true  if leftoverMoves.length == 0

  standardGroups = [ "level-up", "tutor", "machine", "egg" ]


# Loop through the learnsets for this pokemon and all prevolutions.
# This takes all available generations into count.
loopLearnsets = (SpeciesData, FormeData, pokemon, forGeneration, iterator) ->
  minimumGeneration = getMinimumGeneration(forGeneration)
  [name, formeName] = [pokemon.name, pokemon.forme]
  # Loop through formes
