ai_bridgelist.cpp

Go to the documentation of this file.
00001 /* $Id: ai_bridgelist.cpp 15490 2009-02-14 21:17:35Z yexo $ */
00002 
00005 #include "ai_bridgelist.hpp"
00006 #include "ai_bridge.hpp"
00007 #include "../../bridge.h"
00008 #include "../../date_func.h"
00009 
00010 AIBridgeList::AIBridgeList()
00011 {
00012   for (byte j = 0; j < MAX_BRIDGES; j++) {
00013     if (AIBridge::IsValidBridge(j)) this->AddItem(j);
00014   }
00015 }
00016 
00017 AIBridgeList_Length::AIBridgeList_Length(uint length)
00018 {
00019   for (byte j = 0; j < MAX_BRIDGES; j++) {
00020     if (AIBridge::IsValidBridge(j)) {
00021       if (length >= (uint)AIBridge::GetMinLength(j) && length <= (uint)AIBridge::GetMaxLength(j)) this->AddItem(j);
00022     }
00023   }
00024 }

Generated on Mon Dec 14 20:59:57 2009 for OpenTTD by  doxygen 1.5.6