On 2015-05-28, Skybuck Flying <skybuck2...@hotmail.com> wrote: > I tried logic below... but funny enough it failed, now I feel like a > noob lol and share this funny little fail logic with you. > > Can you improve/fix the logic ?
> # while DesiredResult==True: > # Desired truth table for BotWaitForCooldown and CooldownDetected > # BotWaitForCooldown: CooldownDetected: Desired Result: > # False False True > # False True False > # True False True > # True True True > # desired/suiting logic: > # (BotWaitForCooldown or ((not BotWaitForCooldown) and CooldownDetected)) I don't see why you think that's the desired logic, since it doesn't match your truth table or your test. > def TestLogic( BotWaitForCooldown, CooldownDetected ): > return BotWaitForCooldown or ((not BotWaitForCooldown) and CooldownDetected) > # this logic is flawed, please improve logic. def TestLogic( BotWaitForCooldown, CooldownDetected ): return not ((not BotWaitForCooldown) and CooldownDetected) works for me... -- Grant Edwards grant.b.edwards Yow! Alright, you!! at Imitate a WOUNDED SEAL gmail.com pleading for a PARKING SPACE!! -- https://mail.python.org/mailman/listinfo/python-list