diff options
| author | MegaMech <MegaMech@users.noreply.github.com> | 2025-12-07 21:00:06 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-07 21:00:06 -0700 |
| commit | dbae0c3aca33a022e8c1d511fe521407375057b2 (patch) | |
| tree | 889ebe9e5c03261d92304545c5beae13892831f2 /src/engine/Cup.cpp | |
| parent | 04ca19a9757752676450364e998d6af0d90e73ef (diff) | |
Name ScreenContext, Refactor Course class to Track (#583)
* Rename Screen Contexts
* typedef ScreenContext struct
* Fix Compile
* Rename Course.cpp to Track.cpp
* Refactor Course to Track
* A few renames
* General Cleanup
* More Rename
* More names
* Move TrackSections struct to Track.h
---------
Co-authored-by: MegaMech <7255464+MegaMech@users.noreply.github.com>
Diffstat (limited to 'src/engine/Cup.cpp')
| -rw-r--r-- | src/engine/Cup.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/engine/Cup.cpp b/src/engine/Cup.cpp index 36e192723..0bbaff851 100644 --- a/src/engine/Cup.cpp +++ b/src/engine/Cup.cpp @@ -1,7 +1,7 @@ #include "Cup.h" -#include "courses/Course.h" +#include "tracks/Track.h" -Cup::Cup(std::string id, const char* name, std::vector<std::shared_ptr<Course>> courses) { +Cup::Cup(std::string id, const char* name, std::vector<std::shared_ptr<Track>> courses) { Id = id; Name = name; Courses = courses; @@ -23,14 +23,14 @@ void Cup::Previous() { } } -void Cup::SetCourse(size_t position) { +void Cup::SetTrack(size_t position) { if ((position < 0) || (position >= Courses.size())) { - throw std::invalid_argument("Invalid course index."); + throw std::invalid_argument("Invalid track index."); } CursorPosition = position; } -std::shared_ptr<Course> Cup::GetCourse() { +std::shared_ptr<Track> Cup::GetTrack() { return Courses[CursorPosition]; } |
