/
plato
/
RaceProject
Обзор
Документация
Войти
/
plato
/
RaceProject
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
lib/include/Race.h
35 строк
712 B
Evanivan
feat: program almost done
09 дек 2025, 22:04
09 дек 2025, 22:04
e9ce965
Код
Авторство
О чём код?
// Race.h #ifndef RACE_H #define RACE_H #include "AbstractVehicle.h" #include <vector> #include <memory> class Race { public: enum class Type { GROUND, AIR, MIXED }; private: Type type; double distance; std::vector<std::shared_ptr<Vehicle>> vehicles; public: Race(Type t, double dist); bool registerVehicle(std::shared_ptr<Vehicle> vehicle); std::vector<std::pair<std::string, double>> startRace() const; Type getType() const; double getDistance() const; int getVehicleCount() const; const std::vector<std::shared_ptr<Vehicle>>& getVehicles() const; static std::string typeToString(Type type); }; #endif // RACE_H