cage-challenge-4
cage-challenge-4 copied to clipboard
Make TernaryEnum values work in Boolean contexts
There are a few places where TernaryEnums are used in a Boolean context. Currently these are badly broken. This allows red agents to get a ton of Impact points incorrectly. If you meant for users of TernaryEnum to explicitly compare, __bool__
should raise an exception.