I'm sure it's something small but I'm not seeing it. The output on itelliJ is right..... Please help!!
package com.codegym.task.task21.task2113;
import java.util.ArrayList;
import java.util.List;
public class Hippodrome {
private List<Horse> horses = new ArrayList<Horse>();
public static Hippodrome game;
public static void main(String[] args) throws InterruptedException {
List<Horse> horses = new ArrayList<>();
game = new Hippodrome(horses);
horses.add(new Horse("Slevin", 3, 0));
horses.add(new Horse("Lucky", 3, 0));
horses.add(new Horse("Homer", 3, 0));
game.run();
}
public Hippodrome() {
}
public Hippodrome(List<Horse> horses) {
this.horses = horses;
}
public List<Horse> getHorses() {
return horses;
}
public void run() throws InterruptedException {
for (int i = 0; i < 100; i++) {
move();
print();
Thread.sleep(200);
}
}
public void move() {
for (Horse horse : horses) {
horse.move();
}
}
public void print() {
for (Horse horse : horses) {
horse.print();
}
for (int i = 0; i < 10; i++) {
System.out.println();
}
}
}