---
# System prepended metadata

title: Data of Yuni's Life

---

Day of Yuni Doodle Project 


# Data of Yuni's Life

---

```:javascript=

let name = "Yuni Cao";
let energy = 20;
let online = false;

 
// Hey this is Yuni, a graduate student in Communication and Education program in TC columbia University. 
 
Noonafter(); // <<< 12am
 
// Yuni sleeps so late everyday, so she wakes up at about 12pm everyday, count a day from 12am for Yuni.
 online=true;
 
// Today is a great day, Yuni just weak up and decided to go out to get some food first and walk a while.
let stomachstorage=0;
let goformeal=true;

let placeformeal={
    open:true;
    restaurants:["bakery","japanesefood","koreanfood","chinesefood","americafood" ]
}

function eat(placeformeal){
    if placeformeal.open=true and stomachstorage <=3
    then
        stomachstorage +=1;
        energy+=80;
    else
        goformeal=false;
}

 eat(placeformeal); //Yuni went out and had her food! She got the energy she needs for a day!
 
//dance and homework are the main part of Yuni's life, recently she has a lot of things to do!
 
let dance={
    shoulddance:true,
    dancenum=2,
    dance:["popstars", "whistle"]
}

let homework = {
  Havehw: true,
  workburden: 3,
  homeworks: ["coding","appdesign","musicedutech"]
}
 
// Everyday Yuni will do her homework, she took three main courses for 22 fall semester.
 
 
function dohomework(homeworks) {
  //select the homework to do 
  // When applying this function to homework, if the homework was functioned, namely finised, the workburens will reduce 1, and the homework name for that will be deleted from the homeworks dictionary.
  //
  if workburden>0
    then
    homework.wokrburden-=1;
    energy-=20;
   else
    Havehw=false;
}

dohomework(homeworks); // Yuni did her homework and feel really happy to get all things done.


//except from homework time, she will squeez some time to practice dance work with her friends.

//Yuni always has appointment with dance friends at about 7pm, so she needs to check if she can finish her work before 7pm to see whether she can go out for dance.

let havetimefordance=false;

function checktime(time){
    if time<7
    then 
        havetimefordance=true;
    else
        havetimefordance=false;
}
 
//Oh yeah, today Yuni has time to practice dance with her friends!


//normally, there will be 4 girls practicing one dance, however, today there is a girl encountered some trouble that she didn't come. Thus there will be only 3 girls practicing.

let girlsfordancenum=4;
let girlcantattendnum=1;
let candance=true;

function girlcannotattend(girlcantattendnum){
    girlsfordancenum -= girlcantattendnum;
}

girlcannotattend(girlcantattendnum);//check the number of girls for practicing

function checkifpracticng(girlsfordancenum){
    if girlsfordancenum>1
    then 
    candance=true;
    else
    candance=false;
}

checkifpracticng(girlsfordancenum)// check if today can practice dance.

//This is the practice dance function!
let dancepracticetime=0;
 
function practicedance(dance){
    //when this practice dance function, the song chosen for practice will be applied and the number of dance, namely dancenum, for practice will be reduced 1. 
    if dancenum>0 and havetimefordance=true and candance=true
    then
    dance.dancenum-=1；
    energy-=30;
    dancepracticehour+=2;
    stomachstorage -=3;
    else
    dance.shoulddance=false;
}

practicedance(dance); // Yuni practiced dance!

//after dance it's late at 9pm, she should go back home and grab some food to eat

nighttime();//>=9pm

function grabsnack(snack){
    energy += 20;
    stomachstorage +=1;
}

grabsnack();//Yuni got some snacks for her dinner and gained some energy again.

//Late night, Yuni enjoys watching some drama and do homeworks at the meanwhile. 

latenight();//>=11pm;

let dramatype=["chineseancientstory","koreandrama","japanesedrama","USdrama"];
let moodtype=["happy","emotional","energetic","homesick"];
let dramawatching="none";

function watchdrama(moodtype){
    if moodtype==="happy"
     then
    dramawatching="koreandrama";
    energy-=10;
    if moodtype==="emotional"
    then
    dramawatching="japanesedrama";
    energy-=10;
    if moodtype==="energetic"
    then
    dramawatching="USdrama";
    energy-=10;
    if moodtype==="homesick"
    then
    dramawatching="chineseancientstory";
    energy-=10;
    else
    dramawatching="none";
}

//Today Yuni felt pretty happy, thus she watched koreandrama

watchdrama("happy");

//At the meanwhile, Yuni got some homeworks done.
dohomework(homeworks);

//Only till Yuni runs out of all her energy will her go to bed
//Late at 4am, Yuni felt tired and decided to go sleep

let gosleep=false;

function gosleep(energy){
    if energy>0
    then gosleep=false;
    else
    gosleep=true;
    online=false;
}

//Yunirun out of her energy, she went sleep at 4am and enjoyed a sound sleep!
gosleep(0);


    






