acceptReply method

void acceptReply()

A deferred reply enters history only after its receiver accepts it. Cancelling an unaccepted reply preserves the previously completed turns.

Implementation

void acceptReply() {
  _open();
  final candidate = _candidate;
  if (candidate == null) throw StateError('No reply awaits acceptance');
  _history
    ..clear()
    ..addAll(candidate);
  _candidate = null;
  _turns++;
}