# Doodle: Data of My Life
##### MSTU5003 003 Tiffany Zhu
---
```javascript=1
let name = "Tifftaz";
let energy = 100;
let pokeball = 5;
let pokemonCaught = false;
// Tifftaz is a 10-year-old aspiring Pokemon trainer.
// In order to become a Pokemon master,
// she needs to catch as many Pokemons as she can using Pokeballs.
// On Route 1, a wild Pikachu appeared.
let pokemon = {
name = "Pikachu",
type = "electric",
level = 5,
}
// She definitely wants to catch this Pikachu as her first partner.
catchPokemon();// Tada -- Pikachu, getto daze!
let pokeballUsed = 1;
currentEnergy = energy - 10;
currentPokeball = pokeball - pokeballUsed;
pokemonCaught = true;
// Now, Pikachu becomes her partner and is able to fight.
function fightPokemon(wildPokemon){
// if the Pokemon is a wild Pokemon
// then the Pikachu will fight.
// else Tifftaz can choose to catch the pokemon or run away.
catchPokemon ();
runAway ();
}
function levelUp (){
// if Pikachu wins a battle, or Tifftaz caught a Pokemon
// then the Pikachu will level up.
// else nothing will happen.
level++;
}
// Tifftaz keeps running on route 1, a wild Pidgey appeared.
let wildPokemon = {
name = "Pidgey",
type = ["Flying", "Normal"]
level = 3,
}
fightPokemon (wildPokemon); //Pikachu used "Nuzzle", that is super effective to Pidgey!
levelUp ("Pikachu"); //Pikachu levelled up to 6.
// Tifftaz keeps running on route 1, a wild Pidgey appeared again.
fightPokemon ("Pidgey"); // Tifftaz is able to catch Pidgey this time.
catchPokemon(); // Tada -- Pidgey, getto daze!
levelUp ("Pikachu"); //Pikachu levelled up to 7.
pokeballUsed = 1;
currentEnergy = currentEnergy - 10;
currentPokeball = currentPokeball - pokeballUsed;
pokemonCaught = true;
// Now, Pidgey becomes her partner and is able to fight.
goOnJourney();
//Tifftaz keeps going on her journey to become a Pokemon master as she catches more Pokemons using Pokeballs.
```