+_ = require 'underscore'
+
 # Internal: The current state of an active hammersport match.
 #
 class State

      target: null
      output: (line) -> lines.push line

    for uid, move in chosenMove
      attacker = @challengerMap[uid]
      for target in @challengers
        if target isnt attacker

      @match.endRound msg, @choices
    else
      @match.intermediateAttack msg

  roundTimeout: (msg) ->
    for c in @match.challengers
      unless @choices[c.id()]?
        @choices[c.id()] = _.random @moveMap[c.id()].length - 1

    @match.endRound msg, @choices

# Public: An active match of hammersport. Implemented as a state machine that maps *commands* to
# *actions* that mutate the Match or Challengers.
