> For the complete documentation index, see [llms.txt](https://computational-thinking-in-room11.gitbook.io/room-112-dhs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://computational-thinking-in-room11.gitbook.io/room-112-dhs/software-development/micro-pets/feeding-and-loving.md).

# Feeding & Playing

```
Button A Pressed
    if  Hungry = True
        set Happy = True
        show a "food" icon (or a check mark)
        set Hungry = False
        Else  If Hungry = False
            Unhappy Timer = Unhappy Timer + 50
            show an X
```

```
Button B Pressed
    Bothered = random number between 1 and 3
    //This is a new variable that you should set to 2 when starts
    If bothered = 1
        Unhappy  Timer = Unhappy Timer - 50
        Show a angry face
        Else
            Unhappy Timer = Unhappy Timer  + 10
            Show a Heart
```
