dip.order
Class NJudgeOrderParser

java.lang.Object
  extended bydip.order.NJudgeOrderParser

public class NJudgeOrderParser
extends java.lang.Object

Parses nJudge-format orders into Orders and Results

This handles all 3 phases (Movement, Retreat, and Adjustment).

Please note that knowledge of the phase is required prior to processing; for example, Retreat orders are used intead of Move orders when the phase is PhaseType.RETREAT. Similarly, since adjustment orders are in a format quite different from Movement or Retreat phase orders, a similar hint PhaseType.ADJUSTMENT is required.

Not all nJudge orders have a 1:1 mapping with jDip orders. For example, jDip waive orders currently require a Province; nJudge orders do not. Unusable waived builds and unusable pending builds, as well as waived builds, are not converted to orders but are denoted specifically in the returned NJudgeOrder. An informative text Result describes this.

Note that DISLOGDGED order results do not have valid retreat locations set. This cannot be done until further processing occurs.


Nested Class Summary
static class NJudgeOrderParser.NJudgeOrder
          Class that holds an Order and Text Results
 
Constructor Summary
NJudgeOrderParser()
          Create an NJudgeOrderParser
 
Method Summary
 NJudgeOrderParser.NJudgeOrder parse(Map map, OrderFactory orderFactory, Phase.PhaseType phaseType, java.lang.String line)
          Parse a single line order.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NJudgeOrderParser

public NJudgeOrderParser()
Create an NJudgeOrderParser

Method Detail

parse

public NJudgeOrderParser.NJudgeOrder parse(Map map,
                                           OrderFactory orderFactory,
                                           Phase.PhaseType phaseType,
                                           java.lang.String line)
                                    throws OrderException
Parse a single line order.

Null arguments are not permitted, except for phaseType. If phaseType is Phase.PhaseType.RETREAT, "Move" format orders will be made into Retreat orders, and convoyed moves will be disallowed.

Throws:
OrderException


Copyright 2002-2004 Zachary DelProposto / jDip Development Team. All Rights Reserved.