Exemple #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;
        }
Exemple #2
0
 public WallPlan(Dimension dim)
 {
     _dim = dim;
 }
Exemple #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);
 }
 public TriangularPrismPlan(Dimension dim)
 {
     _dim = dim;
 }
 public BuildStatement(BuildShape shape, Dimension dimension, Location location)
 {
     Shape = shape;
     Dimension = dimension;
     Location = location;
 }
 public BuildByStatements(BuildShape shape, Dimension dimension, Location location, IEnumerable<IStatement> statements)
     : base(shape, dimension, location)
 {
     Statements = ImmutableList.CreateRange(statements);
 }
 public BuildByIdentifier(BuildShape shape, Dimension dimension, Location location, string identifier)
     : base(shape, dimension, location)
 {
     Identifier = identifier;
 }