He said that for even number of times, or something like that, it will end up in the to Queue at the end.
I knew that my code was closer, but you said it wasn't replacing like it should.
I had like 8 .pro files, which I had to make them into .txt files so they could open for you guys.
I could only post some of them.
My loop would have worked, though you said it would have not replaced stuff like it should have.
The case of it being in the to Queue is a valid possibility. It does alter so that I'm reading originally putting it into to from the from queue. Then on the second iteration, I'm putting it into the from queue from the to queue. Then the third iteration I'm putting it into the to queue from the from queue, while changing stuff like before.
So if it comes across
the left side
It adds F+F-F, one char at a time.
If it comes across a +, -, or one of those bracket things, it just adds that symbol.
So for iteration 1, if it comes across
it adds F+F-F for every F it finds, I believe, could be wrong.
Here's what it says exactly:
Many of the above files for turtle commands have been generated algorithmically. This is done by using “productions”. A production is like a Math equation, with a left side and a right side. An example of a production is:
F = F+F-F
where ‘F’, ‘+’, ‘-‘ are simply symbols (you are not performing any addition or subtraction). No two productions have the same symbol on their left side. A starting sequence of symbols is provided to you, say “++F--”. One can expand this sequence by substituting for every “F” the right side of the above production. Thus after one iteration, the sequence “++F--” becomes “++F+F-F--“. In the second iteration, one can again expand the result of the previous iteration, thus making the resulting sequence longer and longer with every iteration. When a set number of iterations is reached, the resulting sequence is converted into turtle commands. Keep in mind that there may be many productions, each with a different symbol on its left side. The starting sequence may also contain many symbols. Symbols in the sequence that are not on the left side of any production are left untouched (for example, the symbols ‘+’ and ‘-‘ above).
Thanks for the help so far. I really appreciate it. Also, I should add that I had to turn it in, though it worked pretty well.