Simple Tamagotchi example made with TypeScript - school project at JavaScript2 course (2022)
When creating a Tamagotchi, give it a name and an animal type.
It has points for hunger and happiness, the minimum value is 0 and the maximum 10, both starting at 5.
The hunger value slowly increases, when it reaches 10 - the Tamagotchi dies.
The happiness value slowly decreases, when it reaches 0 - the Tamagotchi dies.
You can feed the Tamagotchi to reduce the hunger value.
You can play with Tamagotchi to increase the happiness value.