public ConvoyDeploymentConfiguration(ParseBlock Block)
        {
            var attributes = Block.BreakToAttributes <object>(typeof(Attribute));

            UnitGroup         = (UnitGroup)attributes[(int)Attribute.UNIT_GROUP];
            IsStrictConvoy    = (bool)(attributes[(int)Attribute.IS_STRICT_CONVOY] ?? false);
            MovementAutomator = (ConvoyMovementAutomator)attributes[(int)Attribute.MOVEMENT_AUTOMATOR];
            EntryTurn         = (byte)(attributes[(int)Attribute.ENTRY_TURN] ?? (byte)0);

            var m    = (Matcher <Tile>)attributes[(int)Attribute.MATCHER];
            var edge = new TileOnEdge(Direction.ANY);

            if (m == null)
            {
                Matcher = edge;
            }
            else
            {
                Matcher = new CompositeMatcher <Tile>(new Matcher <Tile>[] { edge, m }, Aggregators.AND);
            }
        }
예제 #2
0
 public static string Describe(TileOnEdge Matcher)
 {
     return(string.Format("on {0} edge of the board", ObjectDescriber.Describe(Matcher.Edge)));
 }