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

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