コード例 #1
0
ファイル: Element.cs プロジェクト: heneryville/MineDefine
        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;
        }
コード例 #2
0
ファイル: WallPlan.cs プロジェクト: heneryville/MineDefine
 public WallPlan(Dimension dim)
 {
     _dim = dim;
 }
コード例 #3
0
ファイル: ParserTest.cs プロジェクト: heneryville/MineDefine
 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);
 }
コード例 #4
0
 public TriangularPrismPlan(Dimension dim)
 {
     _dim = dim;
 }
コード例 #5
0
 public BuildStatement(BuildShape shape, Dimension dimension, Location location)
 {
     Shape = shape;
     Dimension = dimension;
     Location = location;
 }
コード例 #6
0
 public BuildByStatements(BuildShape shape, Dimension dimension, Location location, IEnumerable<IStatement> statements)
     : base(shape, dimension, location)
 {
     Statements = ImmutableList.CreateRange(statements);
 }
コード例 #7
0
 public BuildByIdentifier(BuildShape shape, Dimension dimension, Location location, string identifier)
     : base(shape, dimension, location)
 {
     Identifier = identifier;
 }