public UserActionAttachment waitForUserActionAction(final boolean firstRun,final IUserActionDelegate iUserActionsDelegate){
  m_firstRun=firstRun;
  m_validUserActions=new ArrayList<>(iUserActionsDelegate.getValidActions());
  Collections.sort(m_validUserActions,new UserActionComparator(getCurrentPlayer(),getData()));
  if (m_validUserActions.isEmpty()) {
    return null;
  }
 else {
    if (m_firstRun) {
      ClipPlayer.play(SoundPath.CLIP_PHASE_USER_ACTIONS,getCurrentPlayer());
    }
    SwingUtilities.invokeLater(null);
  }
  waitForRelease();
  return m_choice;
}

public UserActionAttachment waitForUserActionAction ( final boolean firstRun , final IUserActionDelegate iUserActionsDelegate ) { m_firstRun = firstRun ; m_validUserActions = new ArrayList < > ( iUserActionsDelegate . getValidActions ( ) ) ; Collections . sort ( m_validUserActions , new UserActionComparator ( getCurrentPlayer ( ) , getData ( ) ) ) ; if ( m_validUserActions . isEmpty ( ) ) { return null ; } else { if ( m_firstRun ) { ClipPlayer . play ( SoundPath . CLIP_PHASE_USER_ACTIONS , getCurrentPlayer ( ) ) ; } SwingUtilities . invokeLater ( null ) ; } waitForRelease ( ) ; return m_choice ; }
waits till someone calls release ( ) and then returns the action chosen
