Все правильно же
package com.javarush.task.task21.task2113;
import java.util.*;
public class Hippodrome {
private List<Horse> horses;
public List<Horse> getHorses() {
return horses;
}
public Hippodrome (List<Horse> horses) {
this.horses = horses;
}
public static Hippodrome game;
public void run() {
for (int i = 0; i < 100; i++) {
move();
print();
try {
Thread.sleep(200);
}catch (InterruptedException e) {
e.printStackTrace();
}
}
}
public void move() {
for (Horse horse : game.horses) {
horse.move();
}
}
public void print() {
}
public static void main(String[] args) {
game = new Hippodrome(new ArrayList<>());
game.horses.add(new Horse("Shyngys", 3, 0));
game.horses.add(new Horse("Azamat", 3, 0));
game.horses.add(new Horse("Baha", 3, 0));
}
}