> 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.md).

# Micro:Pets

![](https://2507214486-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LpUPSf3tCxHePJxNjfg%2F-LtkLcMZbDtJNZi5uYQ9%2F-LtkPLtjb8ns6Oz4pAPz%2Fimage.png?alt=media\&token=14471bf2-e66d-4b7e-8e65-0a09142c021e)

Tamagotchi is a key chain sized virtual pet simulation game. The goal is to keep the pet alive by feeding it when it is hungry and healing it when it is sick.

We are going to make a simplified version where your animal can become hungry or tired.  You will take care of the animal by hitting the A or the B buttons

```
Variables we will need to Start
    Happy = true
    Hungry = false
    Dead = false
    Unhappy timer  = 100
    Eye Movement State = 0
    Mood Controller =500
    
```

Eye Movement:  When  the pet  is happy we want his eyes to occasionally glance left or right.

```
Forever
    Eye Movement Chance = random  number between 0  and 100
    //I am going to abbreviate this as EMC
    
    If EMC <= 10
        set Eye Movement State = 2
        Else If EMC  > 10 AND <=20 
            set Eye Movement State = 1
            Else
                set Eye Movement State = 0
                
    
```

![](https://2507214486-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LpUPSf3tCxHePJxNjfg%2F-LtkRIAvYMPcVjc9-MmN%2F-LtkRNjs8jNfBpsuTzrh%2Fimage.png?alt=media\&token=a2194504-814e-4d00-9a90-49ddc7d576aa)

This entire assignment was based on curriculum found at <https://makecode.microbit.org/courses/csintro/making/project> and <https://static1.squarespace.com/static/533a5f1be4b00bb34469c085/t/5ae6f3c00e2e72dfd92a15dd/1525085122048/Tamagotchi.pdf>
