improved victory detection, renamed all bdds to match semantics