private void nextGeneration(){
  trip.signalAll();
  count=parties;
  generation=new Generation();
}

private void nextGeneration ( ) { trip . signalAll ( ) ; count = parties ; generation = new Generation ( ) ; }
updates state on barrier trip and wakes up everyone . called only while holding lock .
