Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
edit on week-04
  • Loading branch information
yuk23003 committed Feb 10, 2024
1 parent ba9f97a commit 4d27152
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions week-04/js/main.js
Expand Up @@ -5,18 +5,29 @@ import { Alert, Confirm, Prompt, Prompt2, Prompt3, Prompt4 } from "./game-framew

// 'Welcome to the perfume room. Explore and select your type.'


let name;

// Modify the text for the introduction
await Alert('\'Top Note\' is your first room. Top notes, sometimes referred to as headnotes, form the top layer of a fragrance. In other words, top notes are the scents you detect first after spraying a perfume. These play a role in setting first impressions and shaping a fragrance\’s story. Top notes usually evaporate quickly, lingering around for only the first five to fifteen minutes. Their main purpose is to give off an initial scent and then transition smoothly into the next part of the fragrance. As a result, top notes generally consist of lighter and smaller molecules. Some common top notes include citrus scents – like lemon, orange, and bergamot – as well as light floral scents like lavender and rose. Basil and anise are also commonly used as top notes.')
if (await Alert('\'Top Note\' is your first room. Top notes, sometimes referred to as headnotes, form the top layer of a fragrance. In other words, top notes are the scents you detect first after spraying a perfume. These play a role in setting first impressions and shaping a fragrance\’s story. Top notes usually evaporate quickly, lingering around for only the first five to fifteen minutes. Their main purpose is to give off an initial scent and then transition smoothly into the next part of the fragrance. As a result, top notes generally consist of lighter and smaller molecules. Some common top notes include citrus scents – like lemon, orange, and bergamot – as well as light floral scents like lavender and rose. Basil and anise are also commonly used as top notes.')) {
} else {
await Alert('That\'s too bad. Maybe next time.')
window.location.reload()
}

await Alert('\'Heart Note\' is your second room. As the name suggests, heart notes make up the “heart” of the fragrance. Their function is to retain some of the top notes’ aroma while also introducing new scents to deepen the experience. Sometimes referred to as middle notes, the heart notes also serve as a buffer for the base notes, which may not smell as pleasant on their own. Because they make up around 70 percent of the total scent, heart notes usually last longer than top notes. Heart notes appear as the top notes start to fade and remain evident for the full life of the fragrance. Heart notes include full-bodied, aromatic floral oils like jasmine, geranium, neroli and ylang-ylang, as well as cinnamon, pepper, pine, lemongrass, black pepper and cardamom.')

await Alert('\'Base Note\' is your last room. Along with middle notes, base notes in perfume form the foundation of the fragrance. They help boost the lighter notes while adding more depth and resonance. Since they form the perfume’s foundation, base notes are very rich, heavy and long-lasting fragrance notes. They kick in after about 30 minutes and work together with the middle notes to create the fragrance’s scent. Since base notes sink into your skin, their scent lingers the longest and can last for six hours or more. Popular base notes include vanilla, amber, musk, patchouli, moss and woody notes like sandalwood and cedarwood.')

let name = await Prompt("What is your name?")
if(await Alert('\'Heart Note\' is your second room. As the name suggests, heart notes make up the “heart” of the fragrance. Their function is to retain some of the top notes’ aroma while also introducing new scents to deepen the experience. Sometimes referred to as middle notes, the heart notes also serve as a buffer for the base notes, which may not smell as pleasant on their own. Because they make up around 70 percent of the total scent, heart notes usually last longer than top notes. Heart notes appear as the top notes start to fade and remain evident for the full life of the fragrance. Heart notes include full-bodied, aromatic floral oils like jasmine, geranium, neroli and ylang-ylang, as well as cinnamon, pepper, pine, lemongrass, black pepper and cardamom.')
) {} else {
await Alert('That\'s too bad. Maybe next time.')
window.location.reload()
}
if(await Alert('\'Base Note\' is your last room. Along with middle notes, base notes in perfume form the foundation of the fragrance. They help boost the lighter notes while adding more depth and resonance. Since they form the perfume’s foundation, base notes are very rich, heavy and long-lasting fragrance notes. They kick in after about 30 minutes and work together with the middle notes to create the fragrance’s scent. Since base notes sink into your skin, their scent lingers the longest and can last for six hours or more. Popular base notes include vanilla, amber, musk, patchouli, moss and woody notes like sandalwood and cedarwood.')) {
name = await Prompt("What is your name?")
} else {
await Alert('That\'s too bad. Maybe next time.')
window.location.reload()
}

// Level 1
if(await Confirm(`Hi ${name}. Do you want to find your scent?`)) {
await Alert('Great! Let\'s get started.')
} else {
Expand Down

0 comments on commit 4d27152

Please sign in to comment.