Class TrainBuilder

    • Method Detail

      • build

        public boolean build​(Train train)
        Build rules:
        1. Need at least one location in route to build train
        2. Select only locos and cars that the train can service
        3. If required, add caboose or car with FRED to train
        4. When departing staging find a track matching train requirements
        5. All cars and locos on one track must leave staging
        6. Optionally block cars from staging
        7. Route cars with home divisions
        8. Route cars with custom loads or final destinations.
        9. Service locations based on train direction, location car types, roads and loads.
        10. Ignore track direction when train is a local (serves one location)
        train - the train that is to be built
        True if successful.