#include "Context.h" Context::Context(Station* stations, const int stationCount, const unsigned long delta, DFRobotDFPlayerMini* dfPlayer) { this->stations = stations; this->stationCount = stationCount; this->delta = delta; this->dfPlayer = dfPlayer; } int Context::getStationIndex(const Station* station) const { for (int i = 0; i < stationCount; ++i) { if (&stations[i] == station) { return i; } } return -1; }