Example #1
0
 public void run() {
   for (int i = 1; i <= Card.WINNING_MAX; i++) {
     card.winning(i);
     canvas.repaint(new PaintBox(card.getX(), card.getY(), 32, 32));
     canvas.sleep(50);
   }
 }
Example #2
0
 public void run() {
   redMover.init();
   blueMover.init();
   for (int i = 1; i <= max; i++) {
     PaintBox box = new PaintBox();
     box.add(redMover.getX(), redMover.getY(), 32, 32);
     box.add(blueMover.getX(), blueMover.getY(), 32, 32);
     redMover.move(i, max);
     blueMover.move(i, max);
     box.add(redMover.getX(), redMover.getY(), 32, 32);
     box.add(blueMover.getX(), blueMover.getY(), 32, 32);
     canvas.repaint(box);
     canvas.sleep(8);
   }
 }