<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\small
\begin{algorithmic}[1]
  \Procedure{OnRunState()}{}
  \If {state = spawned}
      \State postContactReportRequest() \Comment{For Contact Manager} \label{alg_cmgr}
      \State state $\gets$ noroster
  \ElsIf {state = noroster}
      \If {roster.received = true}
        \State state $\gets$ roster
      \EndIf
  \ElsIf {state = roster}
    \State postBidToTeam(). \label{alg_postbid}
    \State state $\gets$ bidding
  \ElsIf {state = bidding}
    \If {allbids.received = true}
        \If {our\_bid $&gt;$ highest\_other\_bid}
            \State postBidWonFlags()
            \State state $\gets$ bidwon
        \Else
            \State postBidLostFlags()
            \State state $\gets$ bidlost
        \EndIf
    \EndIf
  \EndIf
  
  \If {state = bidwon or state = bidlost}
    \State initiateBehaviorCompletion()
  \EndIf
\EndProcedure
\end{algorithmic}
\normalsize

</pre></body></html>