---
# System prepended metadata

title: Data Model of My Life

---

# Data Model of My Life

```javascript

let name = "Rainy Duan";
let blood = 500;
let isIncognito = true;
 
// Rainy is a normal student by day and a bloodthirsty vampire by night.
 
getTime(); // <<< 8:59pm
 
// When she finishes eating normal dinner, she turns into a vampire. 
 
name = "Raincula";
blood = blood + 100; // 600
isIncognito = false;
 
let preyBob = {
  isAlive: true,
  hasWerewolfThreat: false,
  difficultyLevel: 0,
  bloodType: ["a","ab","b","o"]
}
 
// She finds out whether her prey is alive. If alive and there are no werewolf threats, then the difficulty level is low. Then, she will proceeed to suckBlood. 
// She checks prey's preyability three times in a evening.
//She only preys on Bobs.

let numChecked = 0;
 
function checkPreyable(prey) { 
  // if the prey is alive and no werewolfThreat,
  // then Rainy will hunt.
  // else Rainy will leave.
  numChecked++;
}
 
function suckBlood() {
  if blood > preyBob.difficultyLevel
  and
    hasWerewolfThreat: false;
  then
    preyBob.alive = false;
    prey.difficultyLevel = 0;
    if bloodType = "a";
    then 
      blood = blood + 50;
    if bloodType = "ab";
    then 
      blood = blood + 100;
    if bloodType = "b";
    then 
      blood = blood + 300;
    if bloodType = "o";
    then 
      blood = blood + 10;
  else
    preyBob.alive = true;
    prey.difficultyLevel = 100;
    blood = blood - 500;
    
}

// Rainy will lose a lot of blood from hunger.

 
checkPreyable(preyBob); // First check, the prey is alive and no werewolfTHreat.
checkPreyable(preyBob); // Second check, the prey is alive and no werewolfTHreat.
// It appears that Rainy can finally feast tonight. But not so fast! 
 
preyBob.isAlive = true;
preyBob.hasWerewolfThreat = true;
preyBob.difficultyLevel = 100;

 
// get random Bob from usa.Bobs
// set to "scared"
// get random werewolf from twilight.werewolves
// set to "angry"

 
checkPreyable(preyBob); // The prey is alive but there is werewolfThreat!!!
 
// Rainy loses 500 blood and faints from hunger (see suckBlood algorithm).
 
hungerComa();
 
// Rainy passes out from lack of blood and slowly becomes human to regain blood. 

