Exemplo n.º 1
0
 public void actionPerformed(ActionEvent e) {
   int i = dance.getBeat(beatCount);
   if (i > 0) beat[i].play();
   students.makeNextStep();
   beatCount++;
 }
Exemplo n.º 2
0
 public void play(Dance dance) {
   this.dance = dance;
   clock = new Timer(dance.getTempo(), this);
   clock.start();
   beatCount = 0;
 }