# Blake Danzig - Pokémon Detective
## *Data of My Life*
<style>
.ui-infobar,#doc.markdown-body{max-width: 1100px;}
</style>
```:javascript=
let blake = {
callMe: "Blake Danzig",
partner: "Pikachu",
job: "Pokémon Detective",
jurisdiction: "Ryme City";
isOnTheJob: false,
currentCase: undefined,
shotsOfEspressoToday: 0;
/* In Ryme City, Detective Blake Danzig and her esteemed Pokémon partner,
Detective Pikachu investigate (& hopefully solve) crimes against Pokémon.
*/
let partsOfDaY =
[
"Before Work",
"Planning at the Precinct",
"Investigating the Crime Scene",
"Coffee Stop",
"Investigating the Suspects",
"Debrief at the Precinct",
"Outside of Work Fun";
];
let currentIndex = 0;
let currentPart = partOfDay[currentIndex]
//Blake wakes up....
currentPart = partOfDay[0]
currentPart = "Before Work"
/*Blake and Pikachu head down the to prescint.
On their walk to work, they stop at "Charmanders HOT Coffe and Bagles"*/
function orderEspresso(shotsOfEspressoToday){
if (shotsOfEspressoToday > 8){
let numOfEsperessoShots = 2
}
else
{
let numOfEspressoShots = 4
};
alert(`Can I please get ${numOfEspressoShots} shots of espresso?`);
return shotsOfEspressoToday += numOfEspressoShots;
}
//blake.shotsOfEspressoToday = 4
//They continute their walk to the station.
/*Thanks to the The Ryme City Police depeartment and their system for organizing Cases,
Blake and Pikachu can spend less time on paper work and more time solving mysteries.*/
let activeCases = [[meowthPokénappings, fireTypeArsen],[pokémartRobbery]]
let highPriorityCases = activeCases[0]
let lowPriorityCases = activeCases[1]
function prioritize(Case.priorityIsHigh, Case.isSceneInvestigated){
if(priorityIsHigh = true && isSceneInvestigated = false ){
highPriorityCases.unshift(Case.caseName);
} /* high priority cases, with crime scenes that still need examination move to the top of list */
else if (priorityIsHigh = true && isSceneInvestigated = true){
highPriorityCases.push(Case.caseName);
} //Other new high priorirty cases go to bottom of the highPriorityCases list
else{
lowPriorityCases.push(Case.caseName) //all low-priorirty cases get pushed to the bottom of the pile
};
}
//When Blake and Pikachu get to precinct in the morning, they check to see if they have any active cases //
currentIndex++ //returns 1
//currentPart = partsOfDaY[1]
currentPart = "Planning at the Precinct";
if((highPriorirtyCases.length < 1) && (lowPriorityCases.length < 1)){
return "Time to play! Pika!";
} //Then which case will they work on today 🤔//
else if(highPriorirtyCases.length >= 1){
return highPriorirtyCases[0];
}
else {
return lowPriorityCases[0];
}/*They start from the top of the High Piriority list
and make their way down, through the low prioriry list*/
//No playtime for Blake and Pikachu today...
blake.callMe = "Detective Danzig";
blake.partner = "Detective Pikachu";
blake.isOnTheJob = true;
blake.currentCase = "meowthPokénappings"
//The police chief knocks on the door of their office. She hands them a new case....(add it to the list 😑)
onyxArtHeist = {
caseName: "Onxy Art Heist",
priorityIsHigh: true,
crime: "Robbers used an Onxy to dig underneath Ryme City Museum and steal valuable paintings"
crimeLocation: "Ryme City Museum",
clues: ["fingerprint on wall", "red getaway van"],
suspects: [
teamRocket{
name: "Team Rocket"
locations {
home: undefined,
work: "125 Nefarious Ct.",
hangout: "The Purple Mongoose";
}
whySuspect: "history of Pokemon related heists",
completedInterview: false;
recordOfViolentCrimes: false;
},
hansGruber{
name: "Hans Gruber"
locations{
home: "67 Littel Germany Way",
work: undefined,
hangout: "Nakatomi Plaza lobby bar";
}
completedInterview: false;
recordOfViolentCrimes: true;
whySuspect: "fingerprint match"
}
],
suspectsInterviewed:[],
numSuspectsInterviewed: 0,
isClosed: false,
isSceneInvestigated = true;
}
prioritize(onyxArtHeist);
//They put it at the bottom of their High-Priorirty Case list and get started on their current case.//
//They open up the Meowth Pokénappings case file 📁//
meowthPokénappings = {
caseName: "meowthPokénappings"
priorityIsHigh: true,
crime: "15 Meowths with payday attack have gone missing",
crimeLocation: "700 Jin Kuwata Blvd",
clues: [],
suspects: [],
suspectsInterviewed:[],
numSuspectsInterviewed: 0,
isClosed: false,
isSceneInvestigated = false
};
console.log(meowthPokénappings.suspects.length) // prints 0
//Detective Pikachu points to the "0" - They've got no suspects.
//They head to the scene of the crime for more clues...
currentIndex++ //returns 2
//currentPart = partsOfDaY[2]
currentPart = "Investigate the Crime Scene";
function goToScene(crimeLocation, partner){
//detectives get into car
alert (`${partner}, enter ${crimeLocation} into waze.`)
//follow Waze directions from precinct to crime location
}
goToScene("707 Jin Kuwata Blvd", "Detective Pikachu");
//Pikachu gets an alert - "Detective Pikachu, enter 707 Jin Kuwata Blvd into Waze"
//They arrive at the scene....
//To begin their INVESTIGATION, They collect evidence and speak to witnesses to gather list of possible suspects.//
function DNA(){
let cluesWithDNA = []
function findClues(){
//collect DNA evidence
cluesWithDNA.push(evidenceWithDNA)
}
let extractedDNA = []
for(let i=0; i < cluesWithDNA.length; i++){
//extract DNA from evidence;
let DNAstrand = extracted piece of DNA;
extractedDNA.push(DNAstrand);
i++;
};
let suspectsFromDNA = []
for(let i=0; i < extractedDNA.length, i++){
if(extractedDNA[i] === databaseDNA){
suspectsFromDNA.push(nameFromDatabae);
i++;
}
else{
i++
};
return suspectsFromDNA
};
function checkSurveillance{
//watch surveillance through our advanced facial recgonition software//
let suspectsFromSurveillance = [];
do {
suspectsFromSurveillance.push(personInVideo)
} while(videoMinutesRemaining > 0);
}; //identify each person in the video
function witnessStatements(){
//interview witnessess//
let namesMentioned = []
namesMentioned.push(suspectsIdentifiedByWitnesses)
//when a witness names as possible suspect - push name to the namesMentioned array
return namesMentioned;
};
//They do this for the current case...
function investigateCrimeScene(meowthPokénappings){
let newSuspects = []; //Holds all suspect names to add to our suspect list
let suspectsDNA = DNA(); //Store names collected while scaning DNA evidence//
DNA(); //run DNA scan//
newSuspects.push(suspectsDNA); //Add the names to the end of our list(array) of newSuspects//
let statementNames = witnessStatment() //Create variable to store suspects collected while getting witness statements//
witnessStatement(); //Get witness statements and return names of possible suspects mentioned
newSuspects.push(statementNames); //Add the names to the end of our list(array) of newSuspects//
let surveillanceNames = checkSurveillance(); //Create variable to store names collected during surveillance//
checkSurveillance(); //Theycheck the surveillance footage for any possible suspects
newSuspects.push(surveillanceNames) //Add the names to the end of our list(array) of newSuspects//
meowthPokénappings.suspects.push(newSuspects); //Add all suspects from our compiled list to the case's "suspects" array (value of suspects property)//
}
//They take their updated suspect list and leave the scene...
meowthPokénappings.isSceneInvestigated = true;
meowthPokénappings.suspects = ["Team Rocket", "Scrooge McDuck", "Mr.Krabs", "Malfoy"];
meowthPokénappings.clues = ["fingerPrint on door matching Malfoy", "blue sports car seen by witness"]
//They stop at MoacheyPoké Café to refule...
currentIndex++ //returns 3
//currentPart = partsOfDaY[3]
currentPart = "Coffee Stop";
orderEspresso(shotsOfEspressoToday) // They order their espresso and shotsOfEspressoToday increases.
//shotsOfEspressoToday = 8
//They drink there espresso and update their suspect dossier.
//The detectives run the names of the suspects for additional info on their laptop
/* building out each suspect from a name "string",
to an object that groups all information about each suspect*/
currentIndex++ //returns 4
//currentPart = partsOfDaY[4]
currentPart = "Investigating the Suspects";
function suspect{
name: "suspectName"
locations{
home: "home address",
work: "work address",
hangout: "frequent hangout address"
}
completedInterview: false,
recordOfViolentCrimes: false,
whySuspect: "why they are suspect";
}
//They thank the burista and head out to investigate the first suspect//
suspectsIndex = 0
suspectInterviewingNow = suspects[suspectsIndex]
findSuspect(suspects[suspectsIndex]){
function atLocation(suspect){
if (suspectIsPresent = true){
if (suspectIsHuman = true){
//Detective Danzig interviews suspect}
else{
//Detective Pikachu interveiws Pokémon suspect
};
meowthPokénappings.suspects._suspect.completedInterview = true;
meowthPokénappings.numSuspectsInterviewed ++1;
meowthPokénappings.suspectsInterviewed.push(meowthPokénappings.suspects._suspect.name);
return suspectsIndex++;
}
else {
//if someone else is present..{
//probe them to find out other places you might be able to find suspect
this.suspect.locations.newLocation = "New Location";
} //add property:value pair for new location to location object for this suspect
}
//visit work
atLocation(suspect);
//visit other locations
atLocation(suspect);
}
if(meowthPokénappings.numSuspectsInterviewed ==== meowthPokénappings.suspects.length){
//go back to station
}else{
//move to next suspect
}
//after completing all suspect interviews they can for the day, Detective Danzig and Detective Pikachu head back to the station.
currentIndex++ //returns 5
//currentPart = partsOfDaY[5]
currentPart = "Debrief at the Precinct";
//they view the case with all its updated information on the smartBoard.
//if meowthPokénappings.suspects.recordOfViolentCrimes == true, then suspect object appears with border: solid, 5px, red;
//after debriefing Detective Danzig and Pikachu leave the station.....
currentIndex++ //returns 6
//currentPart = partsOfDaY[6]
currentPart = "Outside of Work Fun";
callMe = "Blake Danzig";
partner = "Pikachu";
isOnTheJob = false;
if(shotsOfEspressoToday < 7){
//Blake and Pikachu grab a dinner ex. slice of pizza
}
else{
//Blake and Pikachu meet up with some for a fun night out
}
//since Blake and Pikachu had more than 7 shots of espresso today they go out to a PokéBrewery with some friends.