@IvenBach Two comments regarding your expression tree. First, I get the impression that this algorithm cannot handle multi-digit numbers. Second, your approach is a but unstructured since you have just one expression type for all kinds of syntax. Usually, you would have one for each, implementing a common interface.
In my solution, I have an IntegerContext, a BinaryOperationContext and a ParenthesisedExpressionContext. The only common members are rather generic; Type, StartIndex, StopIndex, TokenStream and GetText.
Of the common members, only the type is really relevant to the problem. (TypeScript does not have proper runtime types.)
Since the problem is an evaluation problem, I could have added a common Value member, but decided against it to keep evaluation and parsing completely separated.
In hindsight, the coupling would have made things a bit more streamlined.
I needed to get a/any expression tree solution that worked. I spent too much time failing and not getting and progress made otherwise.
Most of the time it feels my efforts to progress are orthogonal to where I want to go and I make minimal for a while till I start getting right and understanding.
I'm a little (very little) concerned that it's sometimes not taking the intended path to a destination, for example west outer entrance to north outer exit seems to use the inner track on some parts of the way
Things like West Entrance Outer to North Exit Inner looks a bit funny, but when thinking about it, it actually works as intended
@Vogel612 Yes, I've been thinking of that too. The only benefit of the current way is that probably if there are multiple trains going at once, it can take care of that.
mumble mumble, do you really have to fix power and stuff in sandbox too? Can't I just make all these ghosts be placed directly, without having to order robots to do it?