Ejemplo n.º 1
0
        public BuildInstruction(BuildShape shape, Dimension dimension, Location location, IElement toBuild)
        {
            _shape = shape;
            _dimension = dimension;
            _toBuild = toBuild;

            Width = dimension.Width*toBuild.Width;
            Depth = dimension.Depth*toBuild.Depth;
            Height = dimension.Height*toBuild.Height;

            Location = location;
        }
Ejemplo n.º 2
0
 public WallPlan(Dimension dim)
 {
     _dim = dim;
 }
Ejemplo n.º 3
0
 public void ItParsesBuildStatements(string input,BuildShape shape , Dimension dim, Location loc, string element)
 {
     var tokens = new MineDefineLexer(new MemoryStream(Encoding.UTF8.GetBytes(input))).Lex();
     var build = (BuildByIdentifier)new MineDefineParser(tokens).Parse().Statements.Single();
     Assert.AreEqual(shape, build.Shape);
     Assert.AreEqual(dim, build.Dimension);
     Assert.AreEqual(loc, build.Location);
     Assert.AreEqual(element, build.Identifier);
 }
Ejemplo n.º 4
0
 public TriangularPrismPlan(Dimension dim)
 {
     _dim = dim;
 }
Ejemplo n.º 5
0
 public BuildStatement(BuildShape shape, Dimension dimension, Location location)
 {
     Shape = shape;
     Dimension = dimension;
     Location = location;
 }
Ejemplo n.º 6
0
 public BuildByStatements(BuildShape shape, Dimension dimension, Location location, IEnumerable<IStatement> statements)
     : base(shape, dimension, location)
 {
     Statements = ImmutableList.CreateRange(statements);
 }
Ejemplo n.º 7
0
 public BuildByIdentifier(BuildShape shape, Dimension dimension, Location location, string identifier)
     : base(shape, dimension, location)
 {
     Identifier = identifier;
 }