var strategy = new strategy(); strategy.initiate("preexplication", "condition"); while (!strategy.complete) { strategy.plannextstep("withdraw from", "start afresh"); } var negotiation = new negotiation(); negotiation.conductunderthetabletalks("army", callback => { if (callback.success) console.writeline("negotiations successful, conditions met for a positive outcome, starting afresh under fair terms."); });