Exemple #1
0
        static void Main()
        {
            //testing l-system classes
            Axiom axiom = new Axiom("A");
            LSystemManager lsm = new LSystemManager(axiom);
            lsm.setGenerations(7);
            Console.WriteLine(lsm.getAxiom().getAxiomString()+ " "+ lsm.getGenerations());
            lsm.addRule("A", "AB");
            lsm.addRule("B", "A");
            foreach (Rule rule in lsm.getListOfRules())
            {
                Console.WriteLine(rule.getRule());
            }

            lsm.displayGenerations();

            //sets up gui
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
        }
 public void setAxiom(String inAxiom)
 {
     this.axiom = new Axiom(inAxiom);
 }
 public LSystemManager(Axiom inAxiom)
 {
     this.axiom = inAxiom;
     this.ruleList = new List<Rule>();
     this.stringBuilder = new StringBuilder(axiom.getAxiomString(), 100);
 }
 public LSystemManager()
 {
     this.axiom = new Axiom();
     this.ruleList = new List<Rule>();
     this.stringBuilder = new StringBuilder("", 100);
 }
Exemple #5
0
 public Rule(Axiom inPredecessor, String inSuccessor)
 {
     this.predecessor = inPredecessor.getAxiomString();
     this.successor = inSuccessor;
 }
Exemple #6
0
 public Axiom(Axiom inAxiom)
 {
     this.axiomString = inAxiom.getAxiomString();
 }
Exemple #7
0
 static void Mainaa(string[] args)
 {
     Axiom axiom = new Axiom("A");
     LSystemManager lsm = new LSystemManager(axiom);
     Console.WriteLine(lsm.getAxiom());
 }
 public LSystemManager(Axiom inAxiom)
 {
     this.axiom = inAxiom;
     this.ruleList = new BindingList<Rule>();
     this.stringBuilder = new StringBuilder();
 }