public static void main(String[] args) {

        List<Rider> riders = new ArrayList<Rider>();

        riders.add(new Rider(75));
        riders.add(new Rider(170));
        riders.add(new Rider(230));
        riders.add(new Rider(5));

        List<Raceable> raceables = new ArrayList<Raceable>();

        for (Rider rider : riders) {
            raceables.add(AnimalFactory.getInstance().createAnimal(rider));
        }

        Rider unKnownRider = new Rider(-1);

        Raceable unKnownRaceable = AnimalFactory.getInstance().createAnimal(unKnownRider);
        raceables.add(unKnownRaceable);
        if (unKnownRaceable instanceof AbstractRaceAnimal) {
            AbstractRaceAnimal abstractRaceAnimal = (AbstractRaceAnimal) unKnownRaceable;
            if (riders.size() > 3) {
                abstractRaceAnimal.setRaceBefavior(new SimpleRaceAdapter() {
                    @Override
                    public int run() {
                        return 2 * super.run();
                    }

                    @Override
                    public int getTotalDistance() {
                        return Integer.MAX_VALUE;
                    }
                });
            } else {
                abstractRaceAnimal.setRaceBefavior(new SimpleRaceAdapter());
            }
        }

        int round = 10;
        for (int i = 0; i < round; i++) {
            for (Raceable raceable : raceables) {
                raceable.run();
            }
        }

        int winnerIndex = 0;
        int maxDistance = 0;

        for (int i = 0; i < raceables.size(); i++) {
            Raceable raceable = raceables.get(i);
            if (maxDistance < raceable.getTotalDistance()) {
                winnerIndex = i;
            }
        }

        Raceable winnerRaceable = raceables.get(winnerIndex);

        winnerRaceable.sayYa();

    }