I have been thinking for a long time and I still can’t figure out why Inform is so fussy about truth states. Why aren’t they interchangeable with conditions? Why are they different at all, or at least, why isn’t a condition considered a sort of “description of truth states”?
I’ve adapted Dannii’s “Simple Unit Tests” in my test suite for Kerkerkruip, but I’ve hacked away at it quite a bit. Just now I finally eliminated the “to assert (C - a condition)” phrase - it was just too much trouble.
Inform is very weird about using a condition as a phrase parameter:
Dannii basically hacked this by writing the assert phrase in I6, but I was never happy with that solution. I have now replaced it with “To assert (failure report - a text) based on (result - a truth state)”. This works fine, but it means my code is littered with “whether or nots”…
assert "summoned creature shouldn't oppose undead player" based on whether or not the summoned creature does not oppose the player;
assert "summoned creature should oppose drakul" based on whether or not the summoned creature opposes drakul;
The phrasing is particularly awkward when multiple negatives are involved. If any clever person can help me figure out how to reword this phrase, I’d be very grateful!
fail based on whether or not the blessed grenade is not off-stage within 100 attempts;
I keep coming back and trying to think of clever ways to make these phrases less of a mouthful… no luck. Any ideas?