Пример #1
0
  public static void makeBugs(ActorWorld world, int n) {

    for (int i = 0; i < n; i++) {

      Bug coloredBug = new Bug();

      world.add(coloredBug);

      int x = coloredBug.getLocation().getCol();
      int y = coloredBug.getLocation().getRow();

      coloredBug.setColor(new Color(25 * y, 0, 25 * x));
    }
  }
Пример #2
0
  public static void colorBug(Bug bug) {

    bug.getLocation();
    bug.setColor(new Color(148, 0, 211));
  }