michaeljb / 18xx.games

Other
0 stars 0 forks source link

Better logging when steps are skipped #47

Closed michaeljb closed 1 year ago

michaeljb commented 2 years ago

Explain why steps are skipped. From a slack discussion:

requester: now if you could make the “skips” code in general tell you WHY it’s skipping stuff, that would be awesomer

me: yeah, in "general" it's just an indication that the engine found no legal actions for that Step, explaining those would have to be a case-by-case basis I guess there's a few easy ones

[23:50] UP skips run routes

could become

[23:50] UP skips run routes (no train)

requester: yeah, and tokens when you’re out it’s the weird cases which are likely game-specific where I end up having to guess and dig into rules where it really matters the most “why won’t it let me X?” shouldn’t be ambiguous when X is a normal action