rails.game.specific._1825
Class DoubleHeadingModifier

java.lang.Object
  extended by rails.game.specific._1825.DoubleHeadingModifier
All Implemented Interfaces:
RevenueDynamicModifier

public class DoubleHeadingModifier
extends java.lang.Object
implements RevenueDynamicModifier

1825 modifiers: Trains have to start and end in a major station Allows two 2-trains to run as a 3-train (double heading)


Constructor Summary
DoubleHeadingModifier()
           
 
Method Summary
 void adjustOptimalRun(java.util.List<RevenueTrainRun> optimalRuns)
          allows to adjust the run list of the optimal train run output
 int evaluationValue(java.util.List<RevenueTrainRun> runs, boolean optimalRuns)
          - checks if runs start and end at major stations - allows doubleheading
 int predictionValue()
          the prediction value itself is zero, as the add value stems from the train above
 boolean prepareModifier(RevenueAdapter revenueAdapter)
          after the setup of the revenueAdapter, but before the actual calculation if return is false => deactivate
 java.lang.String prettyPrint(RevenueAdapter adapter)
          returns the results as pretty prints
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DoubleHeadingModifier

public DoubleHeadingModifier()
Method Detail

prepareModifier

public boolean prepareModifier(RevenueAdapter revenueAdapter)
Description copied from interface: RevenueDynamicModifier
after the setup of the revenueAdapter, but before the actual calculation if return is false => deactivate

Specified by:
prepareModifier in interface RevenueDynamicModifier

predictionValue

public int predictionValue()
the prediction value itself is zero, as the add value stems from the train above

Specified by:
predictionValue in interface RevenueDynamicModifier

evaluationValue

public int evaluationValue(java.util.List<RevenueTrainRun> runs,
                           boolean optimalRuns)
- checks if runs start and end at major stations - allows doubleheading

Specified by:
evaluationValue in interface RevenueDynamicModifier

adjustOptimalRun

public void adjustOptimalRun(java.util.List<RevenueTrainRun> optimalRuns)
Description copied from interface: RevenueDynamicModifier
allows to adjust the run list of the optimal train run output

Specified by:
adjustOptimalRun in interface RevenueDynamicModifier

prettyPrint

public java.lang.String prettyPrint(RevenueAdapter adapter)
Description copied from interface: RevenueDynamicModifier
returns the results as pretty prints

Specified by:
prettyPrint in interface RevenueDynamicModifier