コード例 #1
0
ファイル: JumperRunner.java プロジェクト: Tazmere/APCS-HW
 public static void main(String[] args) {
   ActorWorld world = new ActorWorld();
   Jumper alice = new Jumper();
   alice.setColor(Color.ORANGE);
   world.add(new Location(5, 5), alice);
   world.show();
 }
コード例 #2
0
 /**
  * Adds two different Jumpers to a world, one with its color changed to Orange
  *
  * @param args
  */
 public static void main(String[] args) {
   ActorWorld world = new ActorWorld();
   Jumper alpha = new Jumper();
   alpha.setColor(Color.ORANGE);
   Jumper beta = new Jumper();
   world.add(new Location(7, 8), alpha);
   world.add(new Location(5, 5), beta);
   world.show();
 }