rubidium@9820: /* $Id$ */ rubidium@9820: truebrain@9833: /** @file ai_bridgelist.cpp Implementation of AIBridgeList and friends. */ rubidium@9820: truebrain@9792: #include "ai_bridgelist.hpp" truebrain@9792: #include "../../bridge.h" truebrain@9792: #include "../../date_func.h" truebrain@9792: truebrain@9792: AIBridgeList::AIBridgeList() truebrain@9792: { truebrain@9792: /* Add all bridges, no matter if they are available or not */ truebrain@9792: for (byte j = 0; j < MAX_BRIDGES; j++) truebrain@9792: if (::GetBridgeSpec(j)->avail_year <= _cur_year) truebrain@9792: this->AddItem(j); truebrain@9792: } truebrain@9792: truebrain@9792: AIBridgeList_Length::AIBridgeList_Length(uint length) truebrain@9792: { truebrain@9792: for (byte j = 0; j < MAX_BRIDGES; j++) truebrain@9792: if (::GetBridgeSpec(j)->avail_year <= _cur_year) truebrain@9792: if (length >= ::GetBridgeSpec(j)->min_length && length <= ::GetBridgeSpec(j)->max_length) truebrain@9792: this->AddItem(j); truebrain@9792: }