 
   getSessions: -> @rawData.sessions
 
-  getSpellKeyToTeamMap: -> @spellKeyToTeamMap
-
-  getPlayerTeams: -> _.pluck @rawData.sessions, 'team'
-
   setWorld: (@world) ->
-
-  generateSpellKeyToSourceMap: ->
-    # TODO: we always now only have hero-placeholder/plan vs. hero-placeholder-1/plan on humans vs. ogres, always just have to retranspile for Esper, and never need to transpile for NPCs or other methods, so we can get rid of almost all of this stuff.
-    playerTeams = _.pluck @rawData.sessions, 'team'
-    spellKeyToSourceMap = {}
-    for session in @rawData.sessions
-      teamSpells = session.teamSpells[session.team]
-      allTeams = _.keys session.teamSpells
-      for team in allTeams
-        for spell in session.teamSpells[team]
-          @spellKeyToTeamMap[spell] = team
-      teamCode = {}
-
-      for thangName, thangSpells of session.submittedCode
-        for spellName, spell of thangSpells
-          fullSpellName = [thangName, spellName].join '/'
-          if _.contains(teamSpells, fullSpellName)
-            teamCode[fullSpellName] = LZString.decompressFromUTF16 spell
-
-      _.merge spellKeyToSourceMap, teamCode
-
-    spellKeyToSourceMap

    catch error
      console.log "Failed to form task results:", error
      return @cleanupAndSimulateAnotherTask()
    console.log 'Processing results:', taskResults
    humanSessionRank = taskResults.sessions[0].metrics.rank
    ogreSessionRank = taskResults.sessions[1].metrics.rank
    if @options.headlessClient and @options.simulateOnlyOneGame

      return 1

  generateSpellsObject: ->
    spells = {}
    for {hero, team} in [{hero: 'Hero Placeholder', team: 'humans'}, {hero: 'Hero Placeholder 1', team: 'ogres'}]
      sessionInfo = _.filter(@task.getSessions(), {team: team})[0]
      fullSpellName = _.string.slugify(hero) + '/plan'
      submittedCodeLanguage = sessionInfo?.submittedCodeLanguage ? 'javascript'
      submittedCode = LZString.decompressFromUTF16 sessionInfo?.submittedCode?[_.string.slugify(hero)]?.plan ? ''
      aether = new Aether createAetherOptions functionName: 'plan', codeLanguage: submittedCodeLanguage, skipProtectAPI: false
      try
        aether.transpile submittedCode
      catch e
        console.log "Couldn't transpile #{fullSpellName}:\n#{submittedCode}\n", e
        aether.transpile ''
      spells[fullSpellName] = name: 'plan', team: team, thang: {thang: {id: hero}, aether: aether}
    spells


class SimulationTask
  constructor: (@rawData) ->

  getLevelName: ->
    levelName = @rawData.sessions?[0]?.levelID
