Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Compound Condition

From Groundhog Learning
Revision as of 15:53, 21 October 2025 by Groundhog (talk | contribs) (Updated via bot)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

A condition that combines two or more simple conditions.

Details

Allow program to make decisions based on multiple criteria at once.

AND Condition

🤖 Pseudocode

if hasEnoughMoney AND hasInventorySpace # true if both conditions are true
    player can buy the item

OR Condition

🤖 Pseudocode

if hasShield OR isInvincible   # true if either condition is true
    player don't take damage

NOT Condition

🤖 Pseudocode

if NOT doorIsLocked     # true if condition is false
    player can enter

Related Concepts

Related Actions