cage-challenge-4 icon indicating copy to clipboard operation
cage-challenge-4 copied to clipboard

Make TernaryEnum values work in Boolean contexts

Open benjaminy opened this issue 9 months ago • 0 comments

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.

benjaminy avatar May 21 '24 15:05 benjaminy