Mood Chance

So we will use the Mood Chance to Control if your pet is Happy, Hungry or Dead

Forever
    if Happy = true
        mood chance = random number between 0 and 501
        If mood chance <=1
            Happy = false
            Hungry =true
            Else If mood change >1 AND <=50
                Happy = False
                Hungry = False
                Unhappy = Unhappy - 20
                Else
                    Happy = True
                    Hungry = False

//notice that for Happy a positive value is true but for hungry
    a positive  value  is False
Forever
    Hungry = True AND Unhappy Timer = 0
        then dead = TRUE
    if Dead = True
        show dead face
        pause 6000 ms
        set game over
    

Last updated