The task looks simple enough, but for whatever reason it is not working and I don't know why?
As far as I can see I do what they ask. There is a game field initialized in the main, horses added to horses and speed and distance set correctly. I tried it with adding the horses to the existing list, to a new list to the game object. Initializing game object with gethorses(), horses, without. Nothing is passing the validation.
![]()

package com.codegym.task.task21.task2113;
public class Horse {
String name;
double speed, distance;
public Horse(String name, double speed, double distance){
this.name = name;
this.speed = speed;
this.distance = distance;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public double getSpeed() {
return speed;
}
public void setSpeed(double speed) {
this.speed = speed;
}
public double getDistance() {
return distance;
}
public void setDistance(double distance) {
this.distance = distance;
}
}