diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
new file mode 100644
index 000000000..1b01a3149
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -0,0 +1,5 @@
+blank_issues_enabled: true
+contact_links:
+ - name: Report a security vulnerability
+ url: https://contribute.freecodecamp.org/security
+ about: Please report security issues by following our security policy.
diff --git a/.gitignore b/.gitignore
index 72e7e97aa..09376596c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,10 @@
-mongodb-movie-review-db/node_modules
+# Libraries
+node_modules/
-.DS_Store
\ No newline at end of file
+# Parcel projects
+.parcel-cache/
+
+# Build Output
+dist/
+
+.DS_Store
diff --git a/README.md b/README.md
index 787046b9b..2362589e3 100644
--- a/README.md
+++ b/README.md
@@ -1,32 +1,11 @@

-# freeCodeCamp.org's upcoming Curriculum
+# freeCodeCamp.org's Project based Curriculum
-> ### This repository is for discussing new curricula for freeCodeCamp.org
+This repo is for the staff to add lab and workshop prototypes for the new Full Stack Developer Certification.
-### Where can I read more about the new curriculum?
-You can read all about it in [Quincy's announcement](https://www.freecodecamp.org/forum/t/help-us-build-version-7-0-of-the-freecodecamp-curriculum/263546).
+## Where can I read more about the new curriculum?
-### How can I contribute?
-There are many ways to contribute. Check out the [CurriculumExpansion](https://github.com/freeCodeCamp/CurriculumExpansion) repository. The projects are listed as [issues](https://github.com/freeCodeCamp/CurriculumExpansion/issues) where you can join in on the discussion about each one. Projects with a [help wanted](https://github.com/freeCodeCamp/CurriculumExpansion/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) tag are unclaimed, so leave a comment in that issue and mention [`@scissorsneedfoodtoo`](https://github.com/scissorsneedfoodtoo) if you'd like to work on one. We'll also need help reviewing projects that have been broken down into steps and submitted as [pull requests](https://github.com/freeCodeCamp/CurriculumExpansion/pulls).
+Part of this new certification is live in beta. You can find it [here](https://www.freecodecamp.org/learn/full-stack-developer/).
-### Will the UI change?
-Yes, the goal is to move to a single column layout that resembles an actual code editor. You can read more about it in [freeCodeCamp Redesign: Command Line Chic](https://www.freecodecamp.org/forum/t/freecodecamp-redesign-command-line-chic/267917). Since the editor will take up the majority of the screen, things like the HTML preview, console output, and the current test you're working on will appear contextually between lines of code. Here's a rough example of what that might look like: 
-
-### I claimed an [open project](https://github.com/freeCodeCamp/CurriculumExpansion/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22). How should I build the prototype?
-Use your favorite online code editor and post a link in your project's [issue](https://github.com/freeCodeCamp/CurriculumExpansion/issues) when you're finished. [CodePen](https://codepen.io/), [Glitch](https://glitch.com/), [CodeSandbox](https://codesandbox.io/), and [Repl.it](https://repl.it/) are a few popular platforms.
-
-### Can I use Bootstrap/jQuery/Semantic-UI/some-other-framework-or-library to build my project?
-No, contributors should not use any sort of framework or library while building one of the new curriculum projects. The exception is projects where it's required like "Learn React by Building Flappy Bird". Otherwise, stick to plain ol' HTML, CSS, and JavaScript. (Note that this doesn't apply to users, who are free to use whatever frameworks/libraries they want for the Front End Libraries Certification projects.)
-
-### I’m building a project that teaches Express/Node/MongoDB/RESTful APIs. Can I use that?
-We want all of this to work even when people’s browsers are offline, so we won’t have the benefit of running a server or making calls to an API. Instead, contributors should create their own return statements, error messages, and output to mock the functionality of those services. We’ll use regular expressions to test user input. That said, feel free to use these services while working on your prototype – it’ll be easier to see how your project should run.
-
-### I finished a prototype of a project. What's next?
-Start breaking it down step-by-step like [this](https://github.com/freeCodeCamp/CurriculumExpansion/pull/135/files). Since the new UI will include multiple file support, break your project down into separate [HTML](https://github.com/freeCodeCamp/CurriculumExpansion/blob/master/basic-javascript-role-playing-game/index.html), [CSS](https://github.com/freeCodeCamp/CurriculumExpansion/blob/master/basic-javascript-role-playing-game/css/style.css), and [JS](https://github.com/freeCodeCamp/CurriculumExpansion/blob/master/basic-javascript-role-playing-game/index010.js) files. Write your test descriptions in the file around the area users will be focused on during that step. For example, if the user has to add a property named `text` to an object, write your test description in the JS file [near the line](https://github.com/freeCodeCamp/CurriculumExpansion/blob/794cd07d08c8926b39a0241eb075637744552433/basic-javascript-role-playing-game/index300.js#L20) the user will be focused on. Your test descriptions should be [short](https://github.com/freeCodeCamp/CurriculumExpansion/blob/master/basic-javascript-role-playing-game/index050.js#L7), without a lot of explainer text. Every step will test exactly one thing, so don't worry about edge cases. When you are finished, submit a pull request to the [CurriculumExpansion](https://github.com/freeCodeCamp/CurriculumExpansion) repo.
-
-### How will you handle my pull request?
-After you break your project down into steps and submit it as a pull request, reviewers will go through the code and test descriptions in each file. If reviewers notice something that can be changed, they'll leave a comment with some suggestions. Once your project and test descriptions look good, we'll merge your PR!
-
-### My pull request was merged and my project is part of the new curriculum. Is there anything else I can do?
-Absolutely. Please consider working on another [unclaimed project](https://github.com/freeCodeCamp/CurriculumExpansion/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) or helping us review other [submitted projects](https://github.com/freeCodeCamp/CurriculumExpansion/pulls). And stick around -- eventually we'll start writing the actual tests that will run in the browser, so we could use your help implementing those.
+You can read all about it in [Quincy's announcement](https://www.freecodecamp.org/news/freecodecamp-turns-10-major-curriculum-updates/).
diff --git a/express-stock-trading-platform/TODO.md b/back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/TODO.md
similarity index 100%
rename from express-stock-trading-platform/TODO.md
rename to back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/TODO.md
diff --git a/express-stock-trading-platform/server.js b/back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server.js
similarity index 100%
rename from express-stock-trading-platform/server.js
rename to back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server.js
diff --git a/express-stock-trading-platform/server010.js b/back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server010.js
similarity index 100%
rename from express-stock-trading-platform/server010.js
rename to back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server010.js
diff --git a/express-stock-trading-platform/server015.js b/back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server015.js
similarity index 100%
rename from express-stock-trading-platform/server015.js
rename to back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server015.js
diff --git a/express-stock-trading-platform/server020.js b/back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server020.js
similarity index 100%
rename from express-stock-trading-platform/server020.js
rename to back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server020.js
diff --git a/express-stock-trading-platform/server022.js b/back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server022.js
similarity index 100%
rename from express-stock-trading-platform/server022.js
rename to back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server022.js
diff --git a/express-stock-trading-platform/server024.js b/back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server024.js
similarity index 100%
rename from express-stock-trading-platform/server024.js
rename to back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server024.js
diff --git a/express-stock-trading-platform/server030.js b/back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server030.js
similarity index 100%
rename from express-stock-trading-platform/server030.js
rename to back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server030.js
diff --git a/express-stock-trading-platform/server032.js b/back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server032.js
similarity index 100%
rename from express-stock-trading-platform/server032.js
rename to back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server032.js
diff --git a/express-stock-trading-platform/server034.js b/back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server034.js
similarity index 100%
rename from express-stock-trading-platform/server034.js
rename to back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server034.js
diff --git a/express-stock-trading-platform/server036.js b/back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server036.js
similarity index 100%
rename from express-stock-trading-platform/server036.js
rename to back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server036.js
diff --git a/express-stock-trading-platform/server038.js b/back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server038.js
similarity index 100%
rename from express-stock-trading-platform/server038.js
rename to back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server038.js
diff --git a/express-stock-trading-platform/server040.js b/back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server040.js
similarity index 100%
rename from express-stock-trading-platform/server040.js
rename to back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server040.js
diff --git a/express-stock-trading-platform/server042.js b/back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server042.js
similarity index 100%
rename from express-stock-trading-platform/server042.js
rename to back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server042.js
diff --git a/express-stock-trading-platform/server044.js b/back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server044.js
similarity index 100%
rename from express-stock-trading-platform/server044.js
rename to back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server044.js
diff --git a/express-stock-trading-platform/server046.js b/back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server046.js
similarity index 100%
rename from express-stock-trading-platform/server046.js
rename to back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server046.js
diff --git a/express-stock-trading-platform/server050.js b/back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server050.js
similarity index 100%
rename from express-stock-trading-platform/server050.js
rename to back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server050.js
diff --git a/express-stock-trading-platform/server055.js b/back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server055.js
similarity index 100%
rename from express-stock-trading-platform/server055.js
rename to back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server055.js
diff --git a/express-stock-trading-platform/server060.js b/back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server060.js
similarity index 100%
rename from express-stock-trading-platform/server060.js
rename to back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server060.js
diff --git a/express-stock-trading-platform/server070.js b/back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server070.js
similarity index 100%
rename from express-stock-trading-platform/server070.js
rename to back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server070.js
diff --git a/express-stock-trading-platform/server072.js b/back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server072.js
similarity index 100%
rename from express-stock-trading-platform/server072.js
rename to back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server072.js
diff --git a/express-stock-trading-platform/server074.js b/back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server074.js
similarity index 100%
rename from express-stock-trading-platform/server074.js
rename to back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server074.js
diff --git a/express-stock-trading-platform/server080.js b/back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server080.js
similarity index 100%
rename from express-stock-trading-platform/server080.js
rename to back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server080.js
diff --git a/express-stock-trading-platform/server082.js b/back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server082.js
similarity index 100%
rename from express-stock-trading-platform/server082.js
rename to back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server082.js
diff --git a/express-stock-trading-platform/server084.js b/back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server084.js
similarity index 100%
rename from express-stock-trading-platform/server084.js
rename to back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server084.js
diff --git a/express-stock-trading-platform/server086.js b/back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server086.js
similarity index 100%
rename from express-stock-trading-platform/server086.js
rename to back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server086.js
diff --git a/express-stock-trading-platform/server090.js b/back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server090.js
similarity index 100%
rename from express-stock-trading-platform/server090.js
rename to back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server090.js
diff --git a/express-stock-trading-platform/server100.js b/back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server100.js
similarity index 100%
rename from express-stock-trading-platform/server100.js
rename to back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server100.js
diff --git a/express-stock-trading-platform/server110.js b/back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server110.js
similarity index 100%
rename from express-stock-trading-platform/server110.js
rename to back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server110.js
diff --git a/express-stock-trading-platform/server120.js b/back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server120.js
similarity index 100%
rename from express-stock-trading-platform/server120.js
rename to back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server120.js
diff --git a/express-stock-trading-platform/server122.js b/back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server122.js
similarity index 100%
rename from express-stock-trading-platform/server122.js
rename to back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server122.js
diff --git a/express-stock-trading-platform/server124.js b/back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server124.js
similarity index 100%
rename from express-stock-trading-platform/server124.js
rename to back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server124.js
diff --git a/express-stock-trading-platform/server126.js b/back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server126.js
similarity index 100%
rename from express-stock-trading-platform/server126.js
rename to back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server126.js
diff --git a/express-stock-trading-platform/server130.js b/back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server130.js
similarity index 100%
rename from express-stock-trading-platform/server130.js
rename to back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server130.js
diff --git a/express-stock-trading-platform/server132.js b/back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server132.js
similarity index 100%
rename from express-stock-trading-platform/server132.js
rename to back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server132.js
diff --git a/express-stock-trading-platform/server140.js b/back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server140.js
similarity index 100%
rename from express-stock-trading-platform/server140.js
rename to back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server140.js
diff --git a/express-stock-trading-platform/server150.js b/back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server150.js
similarity index 100%
rename from express-stock-trading-platform/server150.js
rename to back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server150.js
diff --git a/express-stock-trading-platform/server160.js b/back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server160.js
similarity index 100%
rename from express-stock-trading-platform/server160.js
rename to back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server160.js
diff --git a/express-stock-trading-platform/server162.js b/back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server162.js
similarity index 100%
rename from express-stock-trading-platform/server162.js
rename to back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server162.js
diff --git a/express-stock-trading-platform/server170.js b/back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server170.js
similarity index 100%
rename from express-stock-trading-platform/server170.js
rename to back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server170.js
diff --git a/express-stock-trading-platform/server172.js b/back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server172.js
similarity index 100%
rename from express-stock-trading-platform/server172.js
rename to back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server172.js
diff --git a/express-stock-trading-platform/server174.js b/back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server174.js
similarity index 100%
rename from express-stock-trading-platform/server174.js
rename to back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server174.js
diff --git a/express-stock-trading-platform/server176.js b/back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server176.js
similarity index 100%
rename from express-stock-trading-platform/server176.js
rename to back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server176.js
diff --git a/express-stock-trading-platform/server180.js b/back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server180.js
similarity index 100%
rename from express-stock-trading-platform/server180.js
rename to back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server180.js
diff --git a/express-stock-trading-platform/server182.js b/back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server182.js
similarity index 100%
rename from express-stock-trading-platform/server182.js
rename to back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server182.js
diff --git a/express-stock-trading-platform/server190.js b/back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server190.js
similarity index 100%
rename from express-stock-trading-platform/server190.js
rename to back-end-development-and-apis/learn-expressjs-by-building-a-stock-trading-platform/server190.js
diff --git a/mongodb-movie-review-db/models/review.js b/back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/models/review.js
similarity index 100%
rename from mongodb-movie-review-db/models/review.js
rename to back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/models/review.js
diff --git a/mongodb-movie-review-db/models/review000.js b/back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/models/review000.js
similarity index 100%
rename from mongodb-movie-review-db/models/review000.js
rename to back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/models/review000.js
diff --git a/mongodb-movie-review-db/models/review010.js b/back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/models/review010.js
similarity index 100%
rename from mongodb-movie-review-db/models/review010.js
rename to back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/models/review010.js
diff --git a/mongodb-movie-review-db/models/review020.js b/back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/models/review020.js
similarity index 100%
rename from mongodb-movie-review-db/models/review020.js
rename to back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/models/review020.js
diff --git a/mongodb-movie-review-db/models/review030.js b/back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/models/review030.js
similarity index 100%
rename from mongodb-movie-review-db/models/review030.js
rename to back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/models/review030.js
diff --git a/mongodb-movie-review-db/models/review040.js b/back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/models/review040.js
similarity index 100%
rename from mongodb-movie-review-db/models/review040.js
rename to back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/models/review040.js
diff --git a/mongodb-movie-review-db/package-lock.json b/back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/package-lock.json
similarity index 100%
rename from mongodb-movie-review-db/package-lock.json
rename to back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/package-lock.json
diff --git a/mongodb-movie-review-db/package.json b/back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/package.json
similarity index 100%
rename from mongodb-movie-review-db/package.json
rename to back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/package.json
diff --git a/mongodb-movie-review-db/server.js b/back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server.js
similarity index 100%
rename from mongodb-movie-review-db/server.js
rename to back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server.js
diff --git a/mongodb-movie-review-db/server000.js b/back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server000.js
similarity index 100%
rename from mongodb-movie-review-db/server000.js
rename to back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server000.js
diff --git a/mongodb-movie-review-db/server010.js b/back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server010.js
similarity index 100%
rename from mongodb-movie-review-db/server010.js
rename to back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server010.js
diff --git a/mongodb-movie-review-db/server020.js b/back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server020.js
similarity index 100%
rename from mongodb-movie-review-db/server020.js
rename to back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server020.js
diff --git a/mongodb-movie-review-db/server030.js b/back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server030.js
similarity index 100%
rename from mongodb-movie-review-db/server030.js
rename to back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server030.js
diff --git a/mongodb-movie-review-db/server040.js b/back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server040.js
similarity index 100%
rename from mongodb-movie-review-db/server040.js
rename to back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server040.js
diff --git a/mongodb-movie-review-db/server050.js b/back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server050.js
similarity index 100%
rename from mongodb-movie-review-db/server050.js
rename to back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server050.js
diff --git a/mongodb-movie-review-db/server060.js b/back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server060.js
similarity index 100%
rename from mongodb-movie-review-db/server060.js
rename to back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server060.js
diff --git a/mongodb-movie-review-db/server070.js b/back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server070.js
similarity index 100%
rename from mongodb-movie-review-db/server070.js
rename to back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server070.js
diff --git a/mongodb-movie-review-db/server080.js b/back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server080.js
similarity index 100%
rename from mongodb-movie-review-db/server080.js
rename to back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server080.js
diff --git a/mongodb-movie-review-db/server090.js b/back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server090.js
similarity index 100%
rename from mongodb-movie-review-db/server090.js
rename to back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server090.js
diff --git a/mongodb-movie-review-db/server100.js b/back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server100.js
similarity index 100%
rename from mongodb-movie-review-db/server100.js
rename to back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server100.js
diff --git a/mongodb-movie-review-db/server110.js b/back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server110.js
similarity index 100%
rename from mongodb-movie-review-db/server110.js
rename to back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server110.js
diff --git a/mongodb-movie-review-db/server120.js b/back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server120.js
similarity index 100%
rename from mongodb-movie-review-db/server120.js
rename to back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server120.js
diff --git a/mongodb-movie-review-db/server130.js b/back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server130.js
similarity index 100%
rename from mongodb-movie-review-db/server130.js
rename to back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server130.js
diff --git a/mongodb-movie-review-db/server140.js b/back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server140.js
similarity index 100%
rename from mongodb-movie-review-db/server140.js
rename to back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server140.js
diff --git a/mongodb-movie-review-db/server150.js b/back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server150.js
similarity index 100%
rename from mongodb-movie-review-db/server150.js
rename to back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server150.js
diff --git a/mongodb-movie-review-db/server160.js b/back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server160.js
similarity index 100%
rename from mongodb-movie-review-db/server160.js
rename to back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server160.js
diff --git a/mongodb-movie-review-db/server170.js b/back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server170.js
similarity index 100%
rename from mongodb-movie-review-db/server170.js
rename to back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server170.js
diff --git a/mongodb-movie-review-db/server175.js b/back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server175.js
similarity index 100%
rename from mongodb-movie-review-db/server175.js
rename to back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server175.js
diff --git a/mongodb-movie-review-db/server180.js b/back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server180.js
similarity index 100%
rename from mongodb-movie-review-db/server180.js
rename to back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server180.js
diff --git a/mongodb-movie-review-db/server190.js b/back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server190.js
similarity index 100%
rename from mongodb-movie-review-db/server190.js
rename to back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server190.js
diff --git a/mongodb-movie-review-db/server195.js b/back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server195.js
similarity index 100%
rename from mongodb-movie-review-db/server195.js
rename to back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server195.js
diff --git a/mongodb-movie-review-db/server200.js b/back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server200.js
similarity index 100%
rename from mongodb-movie-review-db/server200.js
rename to back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server200.js
diff --git a/mongodb-movie-review-db/server210.js b/back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server210.js
similarity index 100%
rename from mongodb-movie-review-db/server210.js
rename to back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server210.js
diff --git a/mongodb-movie-review-db/server220.js b/back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server220.js
similarity index 100%
rename from mongodb-movie-review-db/server220.js
rename to back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server220.js
diff --git a/mongodb-movie-review-db/server230.js b/back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server230.js
similarity index 100%
rename from mongodb-movie-review-db/server230.js
rename to back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server230.js
diff --git a/mongodb-movie-review-db/server240.js b/back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server240.js
similarity index 100%
rename from mongodb-movie-review-db/server240.js
rename to back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server240.js
diff --git a/mongodb-movie-review-db/server250.js b/back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server250.js
similarity index 100%
rename from mongodb-movie-review-db/server250.js
rename to back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server250.js
diff --git a/mongodb-movie-review-db/server260.js b/back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server260.js
similarity index 100%
rename from mongodb-movie-review-db/server260.js
rename to back-end-development-and-apis/learn-mongodb-by-building-a-movie-review-database/server260.js
diff --git a/node-js-web-server/README.md b/back-end-development-and-apis/learn-nodejs-by-building-a-web-server/README.md
similarity index 100%
rename from node-js-web-server/README.md
rename to back-end-development-and-apis/learn-nodejs-by-building-a-web-server/README.md
diff --git a/node-js-web-server/TODO.md b/back-end-development-and-apis/learn-nodejs-by-building-a-web-server/TODO.md
similarity index 100%
rename from node-js-web-server/TODO.md
rename to back-end-development-and-apis/learn-nodejs-by-building-a-web-server/TODO.md
diff --git a/node-js-web-server/package.json b/back-end-development-and-apis/learn-nodejs-by-building-a-web-server/package.json
similarity index 100%
rename from node-js-web-server/package.json
rename to back-end-development-and-apis/learn-nodejs-by-building-a-web-server/package.json
diff --git a/node-js-web-server/public/404.html b/back-end-development-and-apis/learn-nodejs-by-building-a-web-server/public/404.html
similarity index 100%
rename from node-js-web-server/public/404.html
rename to back-end-development-and-apis/learn-nodejs-by-building-a-web-server/public/404.html
diff --git a/node-js-web-server/public/about.html b/back-end-development-and-apis/learn-nodejs-by-building-a-web-server/public/about.html
similarity index 100%
rename from node-js-web-server/public/about.html
rename to back-end-development-and-apis/learn-nodejs-by-building-a-web-server/public/about.html
diff --git a/node-js-web-server/public/forrest1.png b/back-end-development-and-apis/learn-nodejs-by-building-a-web-server/public/forrest1.png
similarity index 100%
rename from node-js-web-server/public/forrest1.png
rename to back-end-development-and-apis/learn-nodejs-by-building-a-web-server/public/forrest1.png
diff --git a/node-js-web-server/public/forrest2.png b/back-end-development-and-apis/learn-nodejs-by-building-a-web-server/public/forrest2.png
similarity index 100%
rename from node-js-web-server/public/forrest2.png
rename to back-end-development-and-apis/learn-nodejs-by-building-a-web-server/public/forrest2.png
diff --git a/node-js-web-server/public/forrest3.png b/back-end-development-and-apis/learn-nodejs-by-building-a-web-server/public/forrest3.png
similarity index 100%
rename from node-js-web-server/public/forrest3.png
rename to back-end-development-and-apis/learn-nodejs-by-building-a-web-server/public/forrest3.png
diff --git a/node-js-web-server/public/index.html b/back-end-development-and-apis/learn-nodejs-by-building-a-web-server/public/index.html
similarity index 100%
rename from node-js-web-server/public/index.html
rename to back-end-development-and-apis/learn-nodejs-by-building-a-web-server/public/index.html
diff --git a/node-js-web-server/public/products.html b/back-end-development-and-apis/learn-nodejs-by-building-a-web-server/public/products.html
similarity index 100%
rename from node-js-web-server/public/products.html
rename to back-end-development-and-apis/learn-nodejs-by-building-a-web-server/public/products.html
diff --git a/node-js-web-server/public/style.css b/back-end-development-and-apis/learn-nodejs-by-building-a-web-server/public/style.css
similarity index 100%
rename from node-js-web-server/public/style.css
rename to back-end-development-and-apis/learn-nodejs-by-building-a-web-server/public/style.css
diff --git a/node-js-web-server/server.js b/back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server.js
similarity index 100%
rename from node-js-web-server/server.js
rename to back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server.js
diff --git a/node-js-web-server/server000.js b/back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server000.js
similarity index 100%
rename from node-js-web-server/server000.js
rename to back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server000.js
diff --git a/node-js-web-server/server010.js b/back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server010.js
similarity index 100%
rename from node-js-web-server/server010.js
rename to back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server010.js
diff --git a/node-js-web-server/server020.js b/back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server020.js
similarity index 100%
rename from node-js-web-server/server020.js
rename to back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server020.js
diff --git a/node-js-web-server/server030.js b/back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server030.js
similarity index 100%
rename from node-js-web-server/server030.js
rename to back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server030.js
diff --git a/node-js-web-server/server040.js b/back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server040.js
similarity index 100%
rename from node-js-web-server/server040.js
rename to back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server040.js
diff --git a/node-js-web-server/server050.js b/back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server050.js
similarity index 100%
rename from node-js-web-server/server050.js
rename to back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server050.js
diff --git a/node-js-web-server/server060.js b/back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server060.js
similarity index 100%
rename from node-js-web-server/server060.js
rename to back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server060.js
diff --git a/node-js-web-server/server070.js b/back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server070.js
similarity index 100%
rename from node-js-web-server/server070.js
rename to back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server070.js
diff --git a/node-js-web-server/server080.js b/back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server080.js
similarity index 100%
rename from node-js-web-server/server080.js
rename to back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server080.js
diff --git a/node-js-web-server/server081.js b/back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server081.js
similarity index 100%
rename from node-js-web-server/server081.js
rename to back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server081.js
diff --git a/node-js-web-server/server090.js b/back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server090.js
similarity index 100%
rename from node-js-web-server/server090.js
rename to back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server090.js
diff --git a/node-js-web-server/server100.js b/back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server100.js
similarity index 100%
rename from node-js-web-server/server100.js
rename to back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server100.js
diff --git a/node-js-web-server/server110.js b/back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server110.js
similarity index 100%
rename from node-js-web-server/server110.js
rename to back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server110.js
diff --git a/node-js-web-server/server111.js b/back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server111.js
similarity index 100%
rename from node-js-web-server/server111.js
rename to back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server111.js
diff --git a/node-js-web-server/server120.js b/back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server120.js
similarity index 100%
rename from node-js-web-server/server120.js
rename to back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server120.js
diff --git a/node-js-web-server/server130.js b/back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server130.js
similarity index 100%
rename from node-js-web-server/server130.js
rename to back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server130.js
diff --git a/node-js-web-server/server140.js b/back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server140.js
similarity index 100%
rename from node-js-web-server/server140.js
rename to back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server140.js
diff --git a/node-js-web-server/server150.js b/back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server150.js
similarity index 100%
rename from node-js-web-server/server150.js
rename to back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server150.js
diff --git a/node-js-web-server/server160.js b/back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server160.js
similarity index 100%
rename from node-js-web-server/server160.js
rename to back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server160.js
diff --git a/node-js-web-server/server170.js b/back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server170.js
similarity index 100%
rename from node-js-web-server/server170.js
rename to back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server170.js
diff --git a/node-js-web-server/server180.js b/back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server180.js
similarity index 100%
rename from node-js-web-server/server180.js
rename to back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server180.js
diff --git a/node-js-web-server/server190.js b/back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server190.js
similarity index 100%
rename from node-js-web-server/server190.js
rename to back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server190.js
diff --git a/node-js-web-server/server200.js b/back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server200.js
similarity index 100%
rename from node-js-web-server/server200.js
rename to back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server200.js
diff --git a/node-js-web-server/server210.js b/back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server210.js
similarity index 100%
rename from node-js-web-server/server210.js
rename to back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server210.js
diff --git a/node-js-web-server/server220.js b/back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server220.js
similarity index 100%
rename from node-js-web-server/server220.js
rename to back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server220.js
diff --git a/node-js-web-server/server230.js b/back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server230.js
similarity index 100%
rename from node-js-web-server/server230.js
rename to back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server230.js
diff --git a/node-js-web-server/server231.js b/back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server231.js
similarity index 100%
rename from node-js-web-server/server231.js
rename to back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server231.js
diff --git a/node-js-web-server/server240.js b/back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server240.js
similarity index 100%
rename from node-js-web-server/server240.js
rename to back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server240.js
diff --git a/node-js-web-server/server250.js b/back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server250.js
similarity index 100%
rename from node-js-web-server/server250.js
rename to back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server250.js
diff --git a/node-js-web-server/server260.js b/back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server260.js
similarity index 100%
rename from node-js-web-server/server260.js
rename to back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server260.js
diff --git a/node-js-web-server/server261.js b/back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server261.js
similarity index 100%
rename from node-js-web-server/server261.js
rename to back-end-development-and-apis/learn-nodejs-by-building-a-web-server/server261.js
diff --git a/node-js-web-server/sever270.js b/back-end-development-and-apis/learn-nodejs-by-building-a-web-server/sever270.js
similarity index 100%
rename from node-js-web-server/sever270.js
rename to back-end-development-and-apis/learn-nodejs-by-building-a-web-server/sever270.js
diff --git a/build-npm-module/index.js b/back-end-development-and-apis/learn-npm-by-building-an-npm-module/index.js
similarity index 100%
rename from build-npm-module/index.js
rename to back-end-development-and-apis/learn-npm-by-building-an-npm-module/index.js
diff --git a/build-npm-module/index000.js b/back-end-development-and-apis/learn-npm-by-building-an-npm-module/index000.js
similarity index 100%
rename from build-npm-module/index000.js
rename to back-end-development-and-apis/learn-npm-by-building-an-npm-module/index000.js
diff --git a/build-npm-module/index010.js b/back-end-development-and-apis/learn-npm-by-building-an-npm-module/index010.js
similarity index 100%
rename from build-npm-module/index010.js
rename to back-end-development-and-apis/learn-npm-by-building-an-npm-module/index010.js
diff --git a/build-npm-module/index020.js b/back-end-development-and-apis/learn-npm-by-building-an-npm-module/index020.js
similarity index 100%
rename from build-npm-module/index020.js
rename to back-end-development-and-apis/learn-npm-by-building-an-npm-module/index020.js
diff --git a/build-npm-module/index030.js b/back-end-development-and-apis/learn-npm-by-building-an-npm-module/index030.js
similarity index 100%
rename from build-npm-module/index030.js
rename to back-end-development-and-apis/learn-npm-by-building-an-npm-module/index030.js
diff --git a/build-npm-module/index040.js b/back-end-development-and-apis/learn-npm-by-building-an-npm-module/index040.js
similarity index 100%
rename from build-npm-module/index040.js
rename to back-end-development-and-apis/learn-npm-by-building-an-npm-module/index040.js
diff --git a/build-npm-module/index050.js b/back-end-development-and-apis/learn-npm-by-building-an-npm-module/index050.js
similarity index 100%
rename from build-npm-module/index050.js
rename to back-end-development-and-apis/learn-npm-by-building-an-npm-module/index050.js
diff --git a/build-npm-module/index060.js b/back-end-development-and-apis/learn-npm-by-building-an-npm-module/index060.js
similarity index 100%
rename from build-npm-module/index060.js
rename to back-end-development-and-apis/learn-npm-by-building-an-npm-module/index060.js
diff --git a/build-npm-module/index070.js b/back-end-development-and-apis/learn-npm-by-building-an-npm-module/index070.js
similarity index 100%
rename from build-npm-module/index070.js
rename to back-end-development-and-apis/learn-npm-by-building-an-npm-module/index070.js
diff --git a/build-npm-module/index080.js b/back-end-development-and-apis/learn-npm-by-building-an-npm-module/index080.js
similarity index 100%
rename from build-npm-module/index080.js
rename to back-end-development-and-apis/learn-npm-by-building-an-npm-module/index080.js
diff --git a/build-npm-module/index090.js b/back-end-development-and-apis/learn-npm-by-building-an-npm-module/index090.js
similarity index 100%
rename from build-npm-module/index090.js
rename to back-end-development-and-apis/learn-npm-by-building-an-npm-module/index090.js
diff --git a/build-npm-module/index100.js b/back-end-development-and-apis/learn-npm-by-building-an-npm-module/index100.js
similarity index 100%
rename from build-npm-module/index100.js
rename to back-end-development-and-apis/learn-npm-by-building-an-npm-module/index100.js
diff --git a/build-npm-module/index110.js b/back-end-development-and-apis/learn-npm-by-building-an-npm-module/index110.js
similarity index 100%
rename from build-npm-module/index110.js
rename to back-end-development-and-apis/learn-npm-by-building-an-npm-module/index110.js
diff --git a/build-npm-module/index120.js b/back-end-development-and-apis/learn-npm-by-building-an-npm-module/index120.js
similarity index 100%
rename from build-npm-module/index120.js
rename to back-end-development-and-apis/learn-npm-by-building-an-npm-module/index120.js
diff --git a/build-npm-module/index130.js b/back-end-development-and-apis/learn-npm-by-building-an-npm-module/index130.js
similarity index 100%
rename from build-npm-module/index130.js
rename to back-end-development-and-apis/learn-npm-by-building-an-npm-module/index130.js
diff --git a/build-npm-module/index140.js b/back-end-development-and-apis/learn-npm-by-building-an-npm-module/index140.js
similarity index 100%
rename from build-npm-module/index140.js
rename to back-end-development-and-apis/learn-npm-by-building-an-npm-module/index140.js
diff --git a/build-npm-module/index150.js b/back-end-development-and-apis/learn-npm-by-building-an-npm-module/index150.js
similarity index 100%
rename from build-npm-module/index150.js
rename to back-end-development-and-apis/learn-npm-by-building-an-npm-module/index150.js
diff --git a/build-npm-module/index160.js b/back-end-development-and-apis/learn-npm-by-building-an-npm-module/index160.js
similarity index 100%
rename from build-npm-module/index160.js
rename to back-end-development-and-apis/learn-npm-by-building-an-npm-module/index160.js
diff --git a/build-npm-module/index165.js b/back-end-development-and-apis/learn-npm-by-building-an-npm-module/index165.js
similarity index 100%
rename from build-npm-module/index165.js
rename to back-end-development-and-apis/learn-npm-by-building-an-npm-module/index165.js
diff --git a/build-npm-module/index170.js b/back-end-development-and-apis/learn-npm-by-building-an-npm-module/index170.js
similarity index 100%
rename from build-npm-module/index170.js
rename to back-end-development-and-apis/learn-npm-by-building-an-npm-module/index170.js
diff --git a/build-npm-module/index175.js b/back-end-development-and-apis/learn-npm-by-building-an-npm-module/index175.js
similarity index 100%
rename from build-npm-module/index175.js
rename to back-end-development-and-apis/learn-npm-by-building-an-npm-module/index175.js
diff --git a/build-npm-module/index180.js b/back-end-development-and-apis/learn-npm-by-building-an-npm-module/index180.js
similarity index 100%
rename from build-npm-module/index180.js
rename to back-end-development-and-apis/learn-npm-by-building-an-npm-module/index180.js
diff --git a/build-npm-module/index185.js b/back-end-development-and-apis/learn-npm-by-building-an-npm-module/index185.js
similarity index 100%
rename from build-npm-module/index185.js
rename to back-end-development-and-apis/learn-npm-by-building-an-npm-module/index185.js
diff --git a/build-npm-module/index190.js b/back-end-development-and-apis/learn-npm-by-building-an-npm-module/index190.js
similarity index 100%
rename from build-npm-module/index190.js
rename to back-end-development-and-apis/learn-npm-by-building-an-npm-module/index190.js
diff --git a/build-npm-module/index200.md b/back-end-development-and-apis/learn-npm-by-building-an-npm-module/index200.md
similarity index 100%
rename from build-npm-module/index200.md
rename to back-end-development-and-apis/learn-npm-by-building-an-npm-module/index200.md
diff --git a/build-npm-module/index205a.md b/back-end-development-and-apis/learn-npm-by-building-an-npm-module/index205a.md
similarity index 100%
rename from build-npm-module/index205a.md
rename to back-end-development-and-apis/learn-npm-by-building-an-npm-module/index205a.md
diff --git a/build-npm-module/index206.md b/back-end-development-and-apis/learn-npm-by-building-an-npm-module/index206.md
similarity index 100%
rename from build-npm-module/index206.md
rename to back-end-development-and-apis/learn-npm-by-building-an-npm-module/index206.md
diff --git a/build-npm-module/index207.md b/back-end-development-and-apis/learn-npm-by-building-an-npm-module/index207.md
similarity index 100%
rename from build-npm-module/index207.md
rename to back-end-development-and-apis/learn-npm-by-building-an-npm-module/index207.md
diff --git a/build-npm-module/index208.md b/back-end-development-and-apis/learn-npm-by-building-an-npm-module/index208.md
similarity index 100%
rename from build-npm-module/index208.md
rename to back-end-development-and-apis/learn-npm-by-building-an-npm-module/index208.md
diff --git a/build-npm-module/index209.md b/back-end-development-and-apis/learn-npm-by-building-an-npm-module/index209.md
similarity index 100%
rename from build-npm-module/index209.md
rename to back-end-development-and-apis/learn-npm-by-building-an-npm-module/index209.md
diff --git a/build-npm-module/index210.js b/back-end-development-and-apis/learn-npm-by-building-an-npm-module/index210.js
similarity index 100%
rename from build-npm-module/index210.js
rename to back-end-development-and-apis/learn-npm-by-building-an-npm-module/index210.js
diff --git a/build-npm-module/index220.js b/back-end-development-and-apis/learn-npm-by-building-an-npm-module/index220.js
similarity index 100%
rename from build-npm-module/index220.js
rename to back-end-development-and-apis/learn-npm-by-building-an-npm-module/index220.js
diff --git a/build-npm-module/index230.js b/back-end-development-and-apis/learn-npm-by-building-an-npm-module/index230.js
similarity index 100%
rename from build-npm-module/index230.js
rename to back-end-development-and-apis/learn-npm-by-building-an-npm-module/index230.js
diff --git a/build-npm-module/index240.js b/back-end-development-and-apis/learn-npm-by-building-an-npm-module/index240.js
similarity index 100%
rename from build-npm-module/index240.js
rename to back-end-development-and-apis/learn-npm-by-building-an-npm-module/index240.js
diff --git a/build-npm-module/index250.js b/back-end-development-and-apis/learn-npm-by-building-an-npm-module/index250.js
similarity index 100%
rename from build-npm-module/index250.js
rename to back-end-development-and-apis/learn-npm-by-building-an-npm-module/index250.js
diff --git a/build-npm-module/index260.js b/back-end-development-and-apis/learn-npm-by-building-an-npm-module/index260.js
similarity index 100%
rename from build-npm-module/index260.js
rename to back-end-development-and-apis/learn-npm-by-building-an-npm-module/index260.js
diff --git a/build-npm-module/index265.js b/back-end-development-and-apis/learn-npm-by-building-an-npm-module/index265.js
similarity index 100%
rename from build-npm-module/index265.js
rename to back-end-development-and-apis/learn-npm-by-building-an-npm-module/index265.js
diff --git a/build-npm-module/index266.js b/back-end-development-and-apis/learn-npm-by-building-an-npm-module/index266.js
similarity index 100%
rename from build-npm-module/index266.js
rename to back-end-development-and-apis/learn-npm-by-building-an-npm-module/index266.js
diff --git a/build-npm-module/index270.js b/back-end-development-and-apis/learn-npm-by-building-an-npm-module/index270.js
similarity index 100%
rename from build-npm-module/index270.js
rename to back-end-development-and-apis/learn-npm-by-building-an-npm-module/index270.js
diff --git a/build-npm-module/index280.js b/back-end-development-and-apis/learn-npm-by-building-an-npm-module/index280.js
similarity index 100%
rename from build-npm-module/index280.js
rename to back-end-development-and-apis/learn-npm-by-building-an-npm-module/index280.js
diff --git a/build-npm-module/index290.js b/back-end-development-and-apis/learn-npm-by-building-an-npm-module/index290.js
similarity index 100%
rename from build-npm-module/index290.js
rename to back-end-development-and-apis/learn-npm-by-building-an-npm-module/index290.js
diff --git a/build-npm-module/index300.js b/back-end-development-and-apis/learn-npm-by-building-an-npm-module/index300.js
similarity index 100%
rename from build-npm-module/index300.js
rename to back-end-development-and-apis/learn-npm-by-building-an-npm-module/index300.js
diff --git a/build-npm-module/index310.js b/back-end-development-and-apis/learn-npm-by-building-an-npm-module/index310.js
similarity index 100%
rename from build-npm-module/index310.js
rename to back-end-development-and-apis/learn-npm-by-building-an-npm-module/index310.js
diff --git a/build-npm-module/index320.js b/back-end-development-and-apis/learn-npm-by-building-an-npm-module/index320.js
similarity index 100%
rename from build-npm-module/index320.js
rename to back-end-development-and-apis/learn-npm-by-building-an-npm-module/index320.js
diff --git a/build-npm-module/index330.js b/back-end-development-and-apis/learn-npm-by-building-an-npm-module/index330.js
similarity index 100%
rename from build-npm-module/index330.js
rename to back-end-development-and-apis/learn-npm-by-building-an-npm-module/index330.js
diff --git a/build-npm-module/index340.js b/back-end-development-and-apis/learn-npm-by-building-an-npm-module/index340.js
similarity index 100%
rename from build-npm-module/index340.js
rename to back-end-development-and-apis/learn-npm-by-building-an-npm-module/index340.js
diff --git a/build-npm-module/main.js b/back-end-development-and-apis/learn-npm-by-building-an-npm-module/main.js
similarity index 100%
rename from build-npm-module/main.js
rename to back-end-development-and-apis/learn-npm-by-building-an-npm-module/main.js
diff --git a/basic-javascript-role-playing-game/css/style.css b/basic-javascript-role-playing-game/css/style.css
deleted file mode 100644
index 86d94eda0..000000000
--- a/basic-javascript-role-playing-game/css/style.css
+++ /dev/null
@@ -1,41 +0,0 @@
-body {
- background-color: darkblue;
-}
-
-#text {
- background-color: black;
- color: white;
- padding: 10px;
-}
-
-#game {
- max-width: 500px;
- max-height: 400px;
- background-color: lightgray;
- color: white;
- margin: 0 auto;
- padding: 10px;
-}
-
-#controls {
- border: 1px black solid;
- padding: 5px;
-}
-
-#stats {
- border: 1px black solid;
- color: black;
- padding: 5px;
-}
-
-#monsterStats {
- display: none;
- border: 1px black solid;
- color: white;
- padding: 5px;
- background-color: red;
-}
-
-.stat {
- padding-right: 10px;
-}
\ No newline at end of file
diff --git a/basic-javascript-role-playing-game/index.html b/basic-javascript-role-playing-game/index.html
deleted file mode 100644
index aa04c3f05..000000000
--- a/basic-javascript-role-playing-game/index.html
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
-
- RPG - Dragon Repeller
-
-
-
-
-
-
- XP: 0
- Health: 100
- Gold: 50
-
-
-
-
-
-
-
- Monster Name:
- Health:
-
-
Welcome to Dragon Repeller. You must defeat the dragon that is preventing people from leaving the town. You are in the town square. Where do you want to go? Use the buttons above.
-
-
-
-
-
diff --git a/basic-javascript-role-playing-game/index.js b/basic-javascript-role-playing-game/index.js
deleted file mode 100644
index 664726e57..000000000
--- a/basic-javascript-role-playing-game/index.js
+++ /dev/null
@@ -1,311 +0,0 @@
-
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-]
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-]
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- },
- {
- name: "kill monster",
- "button text": ["Go to town square", "Go to town square", "Go to town square"],
- "button functions": [goTown, goTown, easterEgg],
- text: 'The monster screams "Arg!" as it dies. You gain experience points and find gold.',
- },
- {
- name: "lose",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You die. ☠️"
- },
- {
- name: "win",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You defeat the dragon! YOU WIN THE GAME! 🎉"
- },
- {
- name: "easter egg",
- "button text": ["2", "8", "Go to town square?"],
- "button functions": [pickTwo, pickEight, goTown],
- text: "You find a secret game. Pick a number above. Ten numbers will be randomly chosen between 0 and 10. If the number you choose matches one of the random numbers, you win!"
- }
-]
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- monsterStats.style.display = "none";
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon + 1 < weapons.length) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon ++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
-
- health -= getMonsterAttackValue(monsters[fighting].level);
-
- if (isMonsterHit()) {
- monsterHealth -= weapons[currentWeapon].power + Math.floor(Math.random() * xp) + 1;
- } else {
- text.innerText += " You miss."
- }
- healthText.innerText = health;
- monsterHealthText.innerText = monsterHealth;
-
- if (health <= 0) {
- lose();
- } else if (monsterHealth <= 0) {
- fighting === 2 ? winGame() : defeatMonster();
- }
-
- if (Math.random() <= .1 && inventory.length !== 1) {
- text.innerText += " Your " + inventory.pop() + " breaks."
- currentWeapon--;
- }
-}
-
-function getMonsterAttackValue(level) {
- let hit = (level * 5) - (Math.floor(Math.random() * xp));
- console.log(hit);
- return hit;
-}
-
-function isMonsterHit() {
- return Math.random() > .2 || health < 20;
-}
-
-function dodge() {
- text.innerText = "You dodge the attack from the " + monsters[fighting].name + ".";
-}
-
-function defeatMonster() {
- gold += Math.floor(monsters[fighting].level * 6.7);
- xp += monsters[fighting].level;
- goldText.innerText = gold;
- xpText.innerText = xp;
- update(locations[4]);
-}
-
-function lose() {
- update(locations[5]);
-}
-
-function winGame() {
- update(locations[6]);
-}
-
-function restart() {
- xp = 0;
- health = 100;
- gold = 50;
- currentWeapon = 0;
- inventory = ["stick"];
- goldText.innerText = gold;
- healthText.innerText = health;
- xpText.innerText = xp;
- goTown();
-}
-
-// Easter egg
-
-function easterEgg() {
- update(locations[7])
-}
-
-function pickTwo() {
- pick(2);
-}
-
-function pickEight() {
- pick(8);
-}
-
-function pick(guess) {
- let numbers = [];
- while (numbers.length < 10) {
- numbers.push(Math.floor(Math.random() * 11))
- }
-
- text.innerText = "You picked " + guess + ". Here are the random numbers:\n"
-
- for (let i = 0; i < 10; i++) {
- text.innerText += numbers[i] + "\n";
- }
-
- if (numbers.indexOf(guess) !== -1) {
- text.innerText += "Right! You win 20 gold!"
- gold += 20;
- goldText.innerText = gold;
- } else {
- text.innerText += "Wrong! You lose 10 health!"
- health -= 10;
- healthText.innerText = health;
- if (health <= 0) {
- lose();
- }
- }
-}
\ No newline at end of file
diff --git a/basic-javascript-role-playing-game/index010.js b/basic-javascript-role-playing-game/index010.js
deleted file mode 100644
index e40a0e9fa..000000000
--- a/basic-javascript-role-playing-game/index010.js
+++ /dev/null
@@ -1,4 +0,0 @@
-var xp = 0;
-
-// To keep track of the player's experience points, we've declared a variable called `xp` and assigned it the starting value of 0.
-// Create another variable to keep track of health and start it at 100.
diff --git a/basic-javascript-role-playing-game/index020.js b/basic-javascript-role-playing-game/index020.js
deleted file mode 100644
index 894b22214..000000000
--- a/basic-javascript-role-playing-game/index020.js
+++ /dev/null
@@ -1,4 +0,0 @@
-var xp = 0;
-var health = 100;
-
-// Create a variable called `gold` and set it to the value 50.
diff --git a/basic-javascript-role-playing-game/index030.js b/basic-javascript-role-playing-game/index030.js
deleted file mode 100644
index b69504146..000000000
--- a/basic-javascript-role-playing-game/index030.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var xp = 0;
-var health = 100;
-var gold = 50;
-
-// Create a variable called `currentWeapon` and set it to 0. When a name has two words, the convention is to use so-called "lowerCamelCase". The first word is all lowercase, and then the first letter of every preceding word is uppercased. When a name has two words, the convention is to use so-called "lowerCamelCase". The variable name should look like this: currentWeapon.
diff --git a/basic-javascript-role-playing-game/index040.js b/basic-javascript-role-playing-game/index040.js
deleted file mode 100644
index 9f83883cf..000000000
--- a/basic-javascript-role-playing-game/index040.js
+++ /dev/null
@@ -1,8 +0,0 @@
-var xp = 0;
-var health = 100;
-var gold = 50;
-var currentWeapon = 0;
-
-/*
-We've been declaring variables with the `var` keyword. However, in modern JavaScript, it's better to use `let` instead of `var` because it fixes a number of unusual behaviors with 'var' that make it difficult to reason about. Change every `var` to `let`.
-*/
diff --git a/basic-javascript-role-playing-game/index050.js b/basic-javascript-role-playing-game/index050.js
deleted file mode 100644
index 00ec50339..000000000
--- a/basic-javascript-role-playing-game/index050.js
+++ /dev/null
@@ -1,10 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-
-/*
-Now you will declare a variable without initializing it.
-Using the 'let' keyword, declare a variable called `fighting` but don't set it equal to anything.
-Just end the line with a semicolon right after the variable name.
-*/
diff --git a/basic-javascript-role-playing-game/index060.js b/basic-javascript-role-playing-game/index060.js
deleted file mode 100644
index 6a45f0424..000000000
--- a/basic-javascript-role-playing-game/index060.js
+++ /dev/null
@@ -1,7 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-
-// Declare variables named `monsterHealth` and `inventory` without initializing them.
diff --git a/basic-javascript-role-playing-game/index070.js b/basic-javascript-role-playing-game/index070.js
deleted file mode 100644
index f7b3fe248..000000000
--- a/basic-javascript-role-playing-game/index070.js
+++ /dev/null
@@ -1,11 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory;
-
-/* Now set the inventory to equal the string "stick". Strings must be surrounded with double quotes `"`, single quotes `'`, or backticks `` ` `` .
-Strings must be surrounded with double quotes `"`, single quotes `'`, or backticks `` ` `` .
-*/
diff --git a/basic-javascript-role-playing-game/index080.js b/basic-javascript-role-playing-game/index080.js
deleted file mode 100644
index 57d07702d..000000000
--- a/basic-javascript-role-playing-game/index080.js
+++ /dev/null
@@ -1,9 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = "stick";
-
-// Since the inventory can store multiple items, change the value of `inventory` to an array with the items stick, dagger, and sword. Here is an example of a variable sandwich that equals a three-item array: `let sandwich = ["peanut butter", "jelly", "bread"];`
diff --git a/basic-javascript-role-playing-game/index090.js b/basic-javascript-role-playing-game/index090.js
deleted file mode 100644
index d4ee434a8..000000000
--- a/basic-javascript-role-playing-game/index090.js
+++ /dev/null
@@ -1,9 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick", "dagger", "sword"];
-
-// For now, let's start the player with just the stick. Delete the dagger and sword items in the array. More items will be added to the array during game play.
\ No newline at end of file
diff --git a/basic-javascript-role-playing-game/index100.js b/basic-javascript-role-playing-game/index100.js
deleted file mode 100644
index 2b836bf55..000000000
--- a/basic-javascript-role-playing-game/index100.js
+++ /dev/null
@@ -1,9 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-// In order to update HTML elements on the page, you need to get references to them in your JavaScript code. The code `let el = document.querySelector("#el");` gets a reference to an HTML element with an `id` of `el` and assigns it to the variable `el`. Get a reference to the HTML element with the `id` of `button1` and assign it to a variable with the name `button1`.
diff --git a/basic-javascript-role-playing-game/index110.js b/basic-javascript-role-playing-game/index110.js
deleted file mode 100644
index e5e491d22..000000000
--- a/basic-javascript-role-playing-game/index110.js
+++ /dev/null
@@ -1,11 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-let button1 = document.querySelector("#button1");
-
-// You can also declare variables with the `const` key word. Since `button1` is a constant that will never change, switch the `let` keyword that declares the variable to `const`.
\ No newline at end of file
diff --git a/basic-javascript-role-playing-game/index120.js b/basic-javascript-role-playing-game/index120.js
deleted file mode 100644
index 57a4f786d..000000000
--- a/basic-javascript-role-playing-game/index120.js
+++ /dev/null
@@ -1,11 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-
-// Here are the ids of the other HTML elements that we want a reference to in the JavaScript code: button2, button3, text, xpText, healthText, goldText, monsterStats, monsterNameText, monsterHealthText. Just like you did with button1, create variables and set them equal to the element references.
\ No newline at end of file
diff --git a/basic-javascript-role-playing-game/index130.js b/basic-javascript-role-playing-game/index130.js
deleted file mode 100644
index b08656374..000000000
--- a/basic-javascript-role-playing-game/index130.js
+++ /dev/null
@@ -1,20 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-// Make a comment to describe what the next few lines of code will do. Comments can be written with either two forward-slashes `//` or with a multi-line sequence `/* */`. For example, here is a single line comment that says "hello world": `// hello world`. Write a single line comment that says "initialize buttons".
\ No newline at end of file
diff --git a/basic-javascript-role-playing-game/index140.js b/basic-javascript-role-playing-game/index140.js
deleted file mode 100644
index 545cf4c8c..000000000
--- a/basic-javascript-role-playing-game/index140.js
+++ /dev/null
@@ -1,22 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-// initialize buttons
-
-// Designate what the first button in the HTML does by setting the `onclick` property of `button1` to the function name `goStore`. You will create the `goStore` function later. For example, in `button.onclick = openProgram;`, the `onclick` property of `button` is set to `openProgram`.
\ No newline at end of file
diff --git a/basic-javascript-role-playing-game/index150.js b/basic-javascript-role-playing-game/index150.js
deleted file mode 100644
index e58094723..000000000
--- a/basic-javascript-role-playing-game/index150.js
+++ /dev/null
@@ -1,23 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-// initialize buttons
-button1.onclick = goStore;
-
-// Now set the `onclick` property of `button2` and `button3`. The second button should be set to `goCave` and the third button should be set to `fightDragon`.
\ No newline at end of file
diff --git a/basic-javascript-role-playing-game/index160.js b/basic-javascript-role-playing-game/index160.js
deleted file mode 100644
index 98a893efe..000000000
--- a/basic-javascript-role-playing-game/index160.js
+++ /dev/null
@@ -1,29 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-/*
-Create the `goStore` function to hold the code that runs whenever the player goes to the store. Here is an example of an empty function called `functionName` (Note the opening curly brace at the end of the first line and the closing curly brace on the second line):
-function functionName() {
-}
-*/
\ No newline at end of file
diff --git a/basic-javascript-role-playing-game/index170.js b/basic-javascript-role-playing-game/index170.js
deleted file mode 100644
index 5db2126e7..000000000
--- a/basic-javascript-role-playing-game/index170.js
+++ /dev/null
@@ -1,32 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function goStore() {
-}
-
-/* For now, make the `goStore` function output the message "Going to store." to the web console. For example, here is a function that outputs the message "Hello World" to the web console (Note that code inside a function should be indented):
-function functionName() {
- console.log("Hello World");
-}
-*/
\ No newline at end of file
diff --git a/basic-javascript-role-playing-game/index180.js b/basic-javascript-role-playing-game/index180.js
deleted file mode 100644
index c0d97365d..000000000
--- a/basic-javascript-role-playing-game/index180.js
+++ /dev/null
@@ -1,29 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function goStore() {
- console.log("Going to store.");
-}
-
-// Similar to the `goStore` function, create a `goCave` function that prints "Going to cave." to the console.
\ No newline at end of file
diff --git a/basic-javascript-role-playing-game/index190.js b/basic-javascript-role-playing-game/index190.js
deleted file mode 100644
index 999acf099..000000000
--- a/basic-javascript-role-playing-game/index190.js
+++ /dev/null
@@ -1,33 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function goStore() {
- console.log("Going to store.");
-}
-
-function goCave() {
- console.log("Going to cave.");
-}
-
-// Also, create a `fightDragon` function that prints "Fighting dragon." to the console. When you are finished, you can test out your program in the browser.
\ No newline at end of file
diff --git a/basic-javascript-role-playing-game/index200.js b/basic-javascript-role-playing-game/index200.js
deleted file mode 100644
index 0e54df86a..000000000
--- a/basic-javascript-role-playing-game/index200.js
+++ /dev/null
@@ -1,37 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-// When a player clicks the 'Go to store' button, the buttons and text in the game should change. Remove the code inside the `goStore` function. Add a new line of code inside the function that updates the text of `button1` so that it says "Buy 10 health (10 gold)". For example, this code updates the text of `button` to say "Click Me": `button.innerText = "Click Me";`.
-
-function goStore() {
- console.log("Going to store.");
-}
-
-function goCave() {
- console.log("Going to cave.");
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
diff --git a/basic-javascript-role-playing-game/index210.js b/basic-javascript-role-playing-game/index210.js
deleted file mode 100644
index 54e12ba34..000000000
--- a/basic-javascript-role-playing-game/index210.js
+++ /dev/null
@@ -1,37 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-// After the line that updates `button1`, update the text of `button2` to say "Buy weapon (30 gold)" and update the text of `button3` to say "Go to town square".
-
-function goStore() {
- button1.innerText = "Buy 10 health (10 gold)";
-}
-
-function goCave() {
- console.log("Going to cave.");
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
diff --git a/basic-javascript-role-playing-game/index220.js b/basic-javascript-role-playing-game/index220.js
deleted file mode 100644
index 306520fa6..000000000
--- a/basic-javascript-role-playing-game/index220.js
+++ /dev/null
@@ -1,39 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-// Now that the text on the buttons have changed, the `onclick` properties on the buttons should change. Inside the goStore function, update the `onclick` property of all three buttons. The new functions should be `buyHealth`, `buyWeapon`, and `goTown`. If you have trouble, look at how the buttons were initialized.
-
-function goStore() {
- button1.innerText = "Buy 10 health (10 gold)";
- button2.innerText = "Buy weapon (30 gold)";
- button3.innerText = "Go to town square";
-}
-
-function goCave() {
- console.log("Going to cave.");
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
diff --git a/basic-javascript-role-playing-game/index230.js b/basic-javascript-role-playing-game/index230.js
deleted file mode 100644
index 607bada4c..000000000
--- a/basic-javascript-role-playing-game/index230.js
+++ /dev/null
@@ -1,42 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-// Right after the `onclick` properties are updated, change the `innerText` property of `text` to "You enter the store."
-
-function goStore() {
- button1.innerText = "Buy 10 health (10 gold)";
- button2.innerText = "Buy weapon (30 gold)";
- button3.innerText = "Go to town square";
- button1.onclick = buyHealth;
- button2.onclick = buyWeapon;
- button3.onclick = goTown;
-}
-
-function goCave() {
- console.log("Going to cave.");
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
diff --git a/basic-javascript-role-playing-game/index240.js b/basic-javascript-role-playing-game/index240.js
deleted file mode 100644
index 6c62a69e7..000000000
--- a/basic-javascript-role-playing-game/index240.js
+++ /dev/null
@@ -1,43 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function goStore() {
- button1.innerText = "Buy 10 health (10 gold)";
- button2.innerText = "Buy weapon (30 gold)";
- button3.innerText = "Go to town square";
- button1.onclick = buyHealth;
- button2.onclick = buyWeapon;
- button3.onclick = goTown;
- text.innerText = "You enter the store.";
-}
-
-function goCave() {
- console.log("Going to cave.");
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-// At the end of the current code, add three new empty functions called `buyHealth`, `buyWeapon`, and `goTown`. After this step, you can test out the game by clicking the "Go to store" button.
\ No newline at end of file
diff --git a/basic-javascript-role-playing-game/index250.js b/basic-javascript-role-playing-game/index250.js
deleted file mode 100644
index 40f1f9468..000000000
--- a/basic-javascript-role-playing-game/index250.js
+++ /dev/null
@@ -1,52 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function goStore() {
- button1.innerText = "Buy 10 health (10 gold)";
- button2.innerText = "Buy weapon (30 gold)";
- button3.innerText = "Go to town square";
- button1.onclick = buyHealth;
- button2.onclick = buyWeapon;
- button3.onclick = goTown;
- text.innerText = "You enter the store.";
-}
-
-function goCave() {
- console.log("Going to cave.");
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
-}
-
-function buyWeapon() {
-}
-
-// Move the `goTown` function to above the `goStore` function. Then, copy and paste the contents of the `goStore` function into the `goTown` function.
-
-function goTown() {
-}
diff --git a/basic-javascript-role-playing-game/index255.js b/basic-javascript-role-playing-game/index255.js
deleted file mode 100644
index 4a9ef6793..000000000
--- a/basic-javascript-role-playing-game/index255.js
+++ /dev/null
@@ -1,59 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-// In the `goTown` function, the text and functions need to be updated. Change the text of the buttons to "Go to store", "Go to cave", and "Fight dragon". Change the `onclick` value of the buttons to "goStore", "goCave", "fightDragon". Change the `innerText` of `text` to "You are in the town square. You see a sign that says Store."
-
-function goTown() {
- button1.innerText = "Buy 10 health (10 gold)";
- button2.innerText = "Buy weapon (30 gold)";
- button3.innerText = "Go to town square";
- button1.onclick = buyHealth;
- button2.onclick = buyWeapon;
- button3.onclick = goTown;
- text.innerText = "You enter the store.";
-}
-
-function goStore() {
- button1.innerText = "Buy 10 health (10 gold)";
- button2.innerText = "Buy weapon (30 gold)";
- button3.innerText = "Go to town square";
- button1.onclick = buyHealth;
- button2.onclick = buyWeapon;
- button3.onclick = goTown;
- text.innerText = "You enter the store.";
-}
-
-function goCave() {
- console.log("Going to cave.");
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
-}
-
-function buyWeapon() {
-}
diff --git a/basic-javascript-role-playing-game/index260.js b/basic-javascript-role-playing-game/index260.js
deleted file mode 100644
index 77bcb853d..000000000
--- a/basic-javascript-role-playing-game/index260.js
+++ /dev/null
@@ -1,59 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-// Add double quote marks around the word "Store" in the line "You see a sign that says Store." Before each quotation mark add a `\` to signal that the following quote is not the end of the string, but should instead appear inside the string. This is called escaping.
-
-function goTown() {
- button1.innerText = "Go to store";
- button2.innerText = "Go to cave";
- button3.innerText = "Fight dragon";
- button1.onclick = goStore;
- button2.onclick = goCave;
- button3.onclick = fightDragon;
- text.innerText = "You are in the town square. You see a sign that says Store.";
-}
-
-function goStore() {
- button1.innerText = "Buy 10 health (10 gold)";
- button2.innerText = "Buy weapon (30 gold)";
- button3.innerText = "Go to town square";
- button1.onclick = buyHealth;
- button2.onclick = buyWeapon;
- button3.onclick = goTown;
- text.innerText = "You enter the store.";
-}
-
-function goCave() {
- console.log("Going to cave.");
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
-}
-
-function buyWeapon() {
-}
diff --git a/basic-javascript-role-playing-game/index265.js b/basic-javascript-role-playing-game/index265.js
deleted file mode 100644
index 962cdba02..000000000
--- a/basic-javascript-role-playing-game/index265.js
+++ /dev/null
@@ -1,66 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-/*
-There is repetition in the `goTown` and `goStore` functions. When you have repetition in code, it is a sign that you need a new function. Above the `goTown` function, create an empty function called `update`. This time the function should take a parameter named `location` so data can be passed into the function when it is called. Here is an example of a function named `testFun` that that accepts a parameter named `param`:
-```
-function testFun(param) {
- console.log(param);
-}
-```
-*/
-
-function goTown() {
- button1.innerText = "Go to store";
- button2.innerText = "Go to cave";
- button3.innerText = "Fight dragon";
- button1.onclick = goStore;
- button2.onclick = goCave;
- button3.onclick = fightDragon;
- text.innerText = "You are in the town square. You see a sign that says \"Store\".";
-}
-
-function goStore() {
- button1.innerText = "Buy 10 health (10 gold)";
- button2.innerText = "Buy weapon (30 gold)";
- button3.innerText = "Go to town square";
- button1.onclick = buyHealth;
- button2.onclick = buyWeapon;
- button3.onclick = goTown;
- text.innerText = "You enter the store.";
-}
-
-function goCave() {
- console.log("Going to cave.");
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
-}
-
-function buyWeapon() {
-}
diff --git a/basic-javascript-role-playing-game/index270.js b/basic-javascript-role-playing-game/index270.js
deleted file mode 100644
index 5aa09e758..000000000
--- a/basic-javascript-role-playing-game/index270.js
+++ /dev/null
@@ -1,63 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-/* Below the list of `const` variables, create a new `const` variable called `locations`. Set it to equal an empty array. This will be used to store all the data for the locations in the game.
-*/
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
-}
-
-function goTown() {
- button1.innerText = "Go to store";
- button2.innerText = "Go to cave";
- button3.innerText = "Fight dragon";
- button1.onclick = goStore;
- button2.onclick = goCave;
- button3.onclick = fightDragon;
- text.innerText = "You are in the town square. You see a sign that says \"Store\".";
-}
-
-function goStore() {
- button1.innerText = "Buy 10 health (10 gold)";
- button2.innerText = "Buy weapon (30 gold)";
- button3.innerText = "Go to town square";
- button1.onclick = buyHealth;
- button2.onclick = buyWeapon;
- button3.onclick = goTown;
- text.innerText = "You enter the store.";
-}
-
-function goCave() {
- console.log("Going to cave.");
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
-}
-
-function buyWeapon() {
-}
diff --git a/basic-javascript-role-playing-game/index275.js b/basic-javascript-role-playing-game/index275.js
deleted file mode 100644
index 00f900b46..000000000
--- a/basic-javascript-role-playing-game/index275.js
+++ /dev/null
@@ -1,65 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-/* Arrays can store any data type, including objects. Objects are similar to arrays, except that instead of using indexes to access and modify their data, you access the data in objects through what are called properties. Inside the `locations` array add an empty object using curly braces. Here is an example of an array named `arr` with an empty object inside: `const arr = [{}];`
-*/
-
-const locations = [];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
-}
-
-function goTown() {
- button1.innerText = "Go to store";
- button2.innerText = "Go to cave";
- button3.innerText = "Fight dragon";
- button1.onclick = goStore;
- button2.onclick = goCave;
- button3.onclick = fightDragon;
- text.innerText = "You are in the town square. You see a sign that says \"Store\".";
-}
-
-function goStore() {
- button1.innerText = "Buy 10 health (10 gold)";
- button2.innerText = "Buy weapon (30 gold)";
- button3.innerText = "Go to town square";
- button1.onclick = buyHealth;
- button2.onclick = buyWeapon;
- button3.onclick = goTown;
- text.innerText = "You enter the store.";
-}
-
-function goCave() {
- console.log("Going to cave.");
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
-}
-
-function buyWeapon() {
-}
diff --git a/basic-javascript-role-playing-game/index280.js b/basic-javascript-role-playing-game/index280.js
deleted file mode 100644
index 25e55e3d1..000000000
--- a/basic-javascript-role-playing-game/index280.js
+++ /dev/null
@@ -1,73 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-/*
-Inside the object you just added, create a property called `name` with the value of "town square". For example, here is an example of an array with an object inside that has a property called `name` with a value of "Quincy Larson" (new lines are used only for the purpose of making the code more readable):
-```
-const arr = [
- {
- name: "Quincy Larson"
- }
-]
-```
-*/
-
-const locations = [{}];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
-}
-
-function goTown() {
- button1.innerText = "Go to store";
- button2.innerText = "Go to cave";
- button3.innerText = "Fight dragon";
- button1.onclick = goStore;
- button2.onclick = goCave;
- button3.onclick = fightDragon;
- text.innerText = "You are in the town square. You see a sign that says \"Store\".";
-}
-
-function goStore() {
- button1.innerText = "Buy 10 health (10 gold)";
- button2.innerText = "Buy weapon (30 gold)";
- button3.innerText = "Go to town square";
- button1.onclick = buyHealth;
- button2.onclick = buyWeapon;
- button3.onclick = goTown;
- text.innerText = "You enter the store.";
-}
-
-function goCave() {
- console.log("Going to cave.");
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
-}
-
-function buyWeapon() {
-}
diff --git a/basic-javascript-role-playing-game/index285.js b/basic-javascript-role-playing-game/index285.js
deleted file mode 100644
index 4a8513df1..000000000
--- a/basic-javascript-role-playing-game/index285.js
+++ /dev/null
@@ -1,78 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-/*
-After the `name` property put a comma. On the next line add a property named `"button text"` that has a value of an empty array. Since the property name has more than one word, there must be quotes around it. Here is an example:
-```
-const arr = [
- {
- name: "Quincy Larson",
- "favorite colors": []
- }
-]
-```
-*/
-
-const locations = [
- {
- name: "town square"
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
-}
-
-function goTown() {
- button1.innerText = "Go to store";
- button2.innerText = "Go to cave";
- button3.innerText = "Fight dragon";
- button1.onclick = goStore;
- button2.onclick = goCave;
- button3.onclick = fightDragon;
- text.innerText = "You are in the town square. You see a sign that says \"Store\".";
-}
-
-function goStore() {
- button1.innerText = "Buy 10 health (10 gold)";
- button2.innerText = "Buy weapon (30 gold)";
- button3.innerText = "Go to town square";
- button1.onclick = buyHealth;
- button2.onclick = buyWeapon;
- button3.onclick = goTown;
- text.innerText = "You enter the store.";
-}
-
-function goCave() {
- console.log("Going to cave.");
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
-}
-
-function buyWeapon() {
-}
diff --git a/basic-javascript-role-playing-game/index290.js b/basic-javascript-role-playing-game/index290.js
deleted file mode 100644
index 5b211fbb9..000000000
--- a/basic-javascript-role-playing-game/index290.js
+++ /dev/null
@@ -1,70 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-/* Inside the `"button text"` array, add three string elements. Use the three stings assigned to the buttons inside the `goTown` function. Here is an example array with three strings: `const arr = ["one", "two", "three"];`.
-*/
-
-const locations = [
- {
- name: "town square",
- "button text": []
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
-}
-
-function goTown() {
- button1.innerText = "Go to store";
- button2.innerText = "Go to cave";
- button3.innerText = "Fight dragon";
- button1.onclick = goStore;
- button2.onclick = goCave;
- button3.onclick = fightDragon;
- text.innerText = "You are in the town square. You see a sign that says \"Store\".";
-}
-
-function goStore() {
- button1.innerText = "Buy 10 health (10 gold)";
- button2.innerText = "Buy weapon (30 gold)";
- button3.innerText = "Go to town square";
- button1.onclick = buyHealth;
- button2.onclick = buyWeapon;
- button3.onclick = goTown;
- text.innerText = "You enter the store.";
-}
-
-function goCave() {
- console.log("Going to cave.");
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
-}
-
-function buyWeapon() {
-}
diff --git a/basic-javascript-role-playing-game/index295.js b/basic-javascript-role-playing-game/index295.js
deleted file mode 100644
index f0f450b93..000000000
--- a/basic-javascript-role-playing-game/index295.js
+++ /dev/null
@@ -1,70 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-/* Add another property in the object with the name `"button functions"`. The value should be an array containing the three `onclick` functions from the `goTown` function. It should look like this: `[goStore, goCave, fightDragon]`
-*/
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"]
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
-}
-
-function goTown() {
- button1.innerText = "Go to store";
- button2.innerText = "Go to cave";
- button3.innerText = "Fight dragon";
- button1.onclick = goStore;
- button2.onclick = goCave;
- button3.onclick = fightDragon;
- text.innerText = "You are in the town square. You see a sign that says \"Store\".";
-}
-
-function goStore() {
- button1.innerText = "Buy 10 health (10 gold)";
- button2.innerText = "Buy weapon (30 gold)";
- button3.innerText = "Go to town square";
- button1.onclick = buyHealth;
- button2.onclick = buyWeapon;
- button3.onclick = goTown;
- text.innerText = "You enter the store.";
-}
-
-function goCave() {
- console.log("Going to cave.");
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
-}
-
-function buyWeapon() {
-}
diff --git a/basic-javascript-role-playing-game/index300.js b/basic-javascript-role-playing-game/index300.js
deleted file mode 100644
index f88badf6c..000000000
--- a/basic-javascript-role-playing-game/index300.js
+++ /dev/null
@@ -1,71 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-/* Add one final property to the object named `text`. The value should be the final text from the `goTown` function.
-*/
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon]
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
-}
-
-function goTown() {
- button1.innerText = "Go to store";
- button2.innerText = "Go to cave";
- button3.innerText = "Fight dragon";
- button1.onclick = goStore;
- button2.onclick = goCave;
- button3.onclick = fightDragon;
- text.innerText = "You are in the town square. You see a sign that says \"Store\".";
-}
-
-function goStore() {
- button1.innerText = "Buy 10 health (10 gold)";
- button2.innerText = "Buy weapon (30 gold)";
- button3.innerText = "Go to town square";
- button1.onclick = buyHealth;
- button2.onclick = buyWeapon;
- button3.onclick = goTown;
- text.innerText = "You enter the store.";
-}
-
-function goCave() {
- console.log("Going to cave.");
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
-}
-
-function buyWeapon() {
-}
diff --git a/basic-javascript-role-playing-game/index305.js b/basic-javascript-role-playing-game/index305.js
deleted file mode 100644
index ea4aa85c8..000000000
--- a/basic-javascript-role-playing-game/index305.js
+++ /dev/null
@@ -1,72 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-/* The `locations` array currently has one element which is an object. Within the array, and after the object's final curly brace, add a comma. On the next line within the array, add another object with all the same properties as the first object. Keep the property names the same on the second object, but change all the property values to the information from the `goStore` function. Also, set the `name` property to `store`.
-*/
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
-}
-
-function goTown() {
- button1.innerText = "Go to store";
- button2.innerText = "Go to cave";
- button3.innerText = "Fight dragon";
- button1.onclick = goStore;
- button2.onclick = goCave;
- button3.onclick = fightDragon;
- text.innerText = "You are in the town square. You see a sign that says \"Store\".";
-}
-
-function goStore() {
- button1.innerText = "Buy 10 health (10 gold)";
- button2.innerText = "Buy weapon (30 gold)";
- button3.innerText = "Go to town square";
- button1.onclick = buyHealth;
- button2.onclick = buyWeapon;
- button3.onclick = goTown;
- text.innerText = "You enter the store.";
-}
-
-function goCave() {
- console.log("Going to cave.");
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
-}
-
-function buyWeapon() {
-}
diff --git a/basic-javascript-role-playing-game/index310.js b/basic-javascript-role-playing-game/index310.js
deleted file mode 100644
index e20c608ac..000000000
--- a/basic-javascript-role-playing-game/index310.js
+++ /dev/null
@@ -1,78 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-/* Now we are can consolidate the code inside the `goTown` and `goStore` functions. Copy the code inside the `goTown` function and paste it in the `update` function. Then delete all the code inside the `goTown` and `goStore` functions.
-*/
-
-function update(location) {
-}
-
-function goTown() {
- button1.innerText = "Go to store";
- button2.innerText = "Go to cave";
- button3.innerText = "Fight dragon";
- button1.onclick = goStore;
- button2.onclick = goCave;
- button3.onclick = fightDragon;
- text.innerText = "You are in the town square. You see a sign that says \"Store\".";
-}
-
-function goStore() {
- button1.innerText = "Buy 10 health (10 gold)";
- button2.innerText = "Buy weapon (30 gold)";
- button3.innerText = "Go to town square";
- button1.onclick = buyHealth;
- button2.onclick = buyWeapon;
- button3.onclick = goTown;
- text.innerText = "You enter the store.";
-}
-
-function goCave() {
- console.log("Going to cave.");
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
-}
-
-function buyWeapon() {
-}
diff --git a/basic-javascript-role-playing-game/index315.js b/basic-javascript-role-playing-game/index315.js
deleted file mode 100644
index 36e7fe3fc..000000000
--- a/basic-javascript-role-playing-game/index315.js
+++ /dev/null
@@ -1,71 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = "Go to store";
- button2.innerText = "Go to cave";
- button3.innerText = "Fight dragon";
- button1.onclick = goStore;
- button2.onclick = goCave;
- button3.onclick = fightDragon;
- text.innerText = "You are in the town square. You see a sign that says \"Store\".";
-}
-
-/* Instead of assigning the `innerText` and `onClick` properties to specific strings and functions like it does now, the `update` function will use data from the `location` that is passed into it. First, data needs to be passed into the `update` function. Inside the `goTown` function, call the `update` function. Here is how you would call a function named `exampleFunction`: `exampleFunction();`
-*/
-
-function goTown() {
-}
-
-function goStore() {
-}
-
-function goCave() {
- console.log("Going to cave.");
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
-}
-
-function buyWeapon() {
-}
diff --git a/basic-javascript-role-playing-game/index320.js b/basic-javascript-role-playing-game/index320.js
deleted file mode 100644
index 703a725cf..000000000
--- a/basic-javascript-role-playing-game/index320.js
+++ /dev/null
@@ -1,72 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = "Go to store";
- button2.innerText = "Go to cave";
- button3.innerText = "Fight dragon";
- button1.onclick = goStore;
- button2.onclick = goCave;
- button3.onclick = fightDragon;
- text.innerText = "You are in the town square. You see a sign that says \"Store\".";
-}
-
-/* Now change the code you just wrote to call the `update` function so the `locations` array is passed in as an argument. Here is how you would call a function named `exampleFunction` with an argument called `arg`: `exampleFunction(arg);`
-*/
-
-function goTown() {
- update();
-}
-
-function goStore() {
-}
-
-function goCave() {
- console.log("Going to cave.");
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
-}
-
-function buyWeapon() {
-}
\ No newline at end of file
diff --git a/basic-javascript-role-playing-game/index325.js b/basic-javascript-role-playing-game/index325.js
deleted file mode 100644
index d50e1a569..000000000
--- a/basic-javascript-role-playing-game/index325.js
+++ /dev/null
@@ -1,72 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = "Go to store";
- button2.innerText = "Go to cave";
- button3.innerText = "Fight dragon";
- button1.onclick = goStore;
- button2.onclick = goCave;
- button3.onclick = fightDragon;
- text.innerText = "You are in the town square. You see a sign that says \"Store\".";
-}
-
-/* The `locations` array contains two locations: the town square and store. Currently the entire array with both locations is being passed in to the update function. Pass in only the first element of the locations array by adding `[0]` at the end of the name of the array. For example, `exampleFunction(arg[0]);`
-*/
-
-function goTown() {
- update(locations);
-}
-
-function goStore() {
-}
-
-function goCave() {
- console.log("Going to cave.");
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
-}
-
-function buyWeapon() {
-}
diff --git a/basic-javascript-role-playing-game/index330.js b/basic-javascript-role-playing-game/index330.js
deleted file mode 100644
index 3b42dc6ad..000000000
--- a/basic-javascript-role-playing-game/index330.js
+++ /dev/null
@@ -1,72 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-/* Now that the `goTown` function calls the `update` function with the first element of the `locations` array, it is time to use that location information to update the `innerText` and `onclick` properties. Inside the `update` function, change `button1.innerText` to equal `location["button text"]`. That line gets the `"button text"` property of the `location` that was passed into the `update` function`.
-*/
-
-function update(location) {
- button1.innerText = "Go to store";
- button2.innerText = "Go to cave";
- button3.innerText = "Fight dragon";
- button1.onclick = goStore;
- button2.onclick = goCave;
- button3.onclick = fightDragon;
- text.innerText = "You are in the town square. You see a sign that says \"Store\".";
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
-}
-
-function goCave() {
- console.log("Going to cave.");
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
-}
-
-function buyWeapon() {
-}
diff --git a/basic-javascript-role-playing-game/index335.js b/basic-javascript-role-playing-game/index335.js
deleted file mode 100644
index efa24947f..000000000
--- a/basic-javascript-role-playing-game/index335.js
+++ /dev/null
@@ -1,72 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-/* `location["button text"]` is an array with three elements. Use only the first element of the array by adding `[0]` at the end.
-*/
-
-function update(location) {
- button1.innerText = location["button text"];
- button2.innerText = "Go to cave";
- button3.innerText = "Fight dragon";
- button1.onclick = goStore;
- button2.onclick = goCave;
- button3.onclick = fightDragon;
- text.innerText = "You are in the town square. You see a sign that says \"Store\".";
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
-}
-
-function goCave() {
- console.log("Going to cave.");
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
-}
-
-function buyWeapon() {
-}
diff --git a/basic-javascript-role-playing-game/index340.js b/basic-javascript-role-playing-game/index340.js
deleted file mode 100644
index fa2bfa690..000000000
--- a/basic-javascript-role-playing-game/index340.js
+++ /dev/null
@@ -1,72 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-/* Now update the `innerText` of the other two buttons. They should be set to equal the same thing as the first button, except the number inside the brackets should be 1 for the second button and 2 for the third button.
-*/
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = "Go to cave";
- button3.innerText = "Fight dragon";
- button1.onclick = goStore;
- button2.onclick = goCave;
- button3.onclick = fightDragon;
- text.innerText = "You are in the town square. You see a sign that says \"Store\".";
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
-}
-
-function goCave() {
- console.log("Going to cave.");
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
-}
-
-function buyWeapon() {
-}
diff --git a/basic-javascript-role-playing-game/index345.js b/basic-javascript-role-playing-game/index345.js
deleted file mode 100644
index 4ae213534..000000000
--- a/basic-javascript-role-playing-game/index345.js
+++ /dev/null
@@ -1,72 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-/* Now update the three `onclick` properties. These will look very similar to the `innerText` properties, except instead of using the `"button text"` part of the `location`, use `"button functions"`.
-*/
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = goStore;
- button2.onclick = goCave;
- button3.onclick = fightDragon;
- text.innerText = "You are in the town square. You see a sign that says \"Store\".";
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
-}
-
-function goCave() {
- console.log("Going to cave.");
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
-}
-
-function buyWeapon() {
-}
diff --git a/basic-javascript-role-playing-game/index350.js b/basic-javascript-role-playing-game/index350.js
deleted file mode 100644
index ef37fe8ab..000000000
--- a/basic-javascript-role-playing-game/index350.js
+++ /dev/null
@@ -1,72 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-/* Finally, update `text.innerText` to equal the text from the location object. So far we have been accessing properties of the location object using bracket notation. This time use dot notation. Here is how to access a `name` property of an object called `obj` using dot notation: `obj.name`.
-*/
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = "You are in the town square. You see a sign that says \"Store\".";
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
-}
-
-function goCave() {
- console.log("Going to cave.");
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
-}
-
-function buyWeapon() {
-}
diff --git a/basic-javascript-role-playing-game/index355.js b/basic-javascript-role-playing-game/index355.js
deleted file mode 100644
index 13d6a86f9..000000000
--- a/basic-javascript-role-playing-game/index355.js
+++ /dev/null
@@ -1,72 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
-}
-
-/* Now update the `goStore` function. The code should look just like the code inside the `goTown` function, except the number 0 should be changed to 1. After this step would be a good time to try out the game so far. You should be able to move between the store and the town square.
-*/
-
-function goCave() {
- console.log("Going to cave.");
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
-}
-
-function buyWeapon() {
-}
diff --git a/basic-javascript-role-playing-game/index360.js b/basic-javascript-role-playing-game/index360.js
deleted file mode 100644
index 7ba5de083..000000000
--- a/basic-javascript-role-playing-game/index360.js
+++ /dev/null
@@ -1,73 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-/* Add a third object in the `locations` array with the same properties as the other two objects. Set `name` to "cave". Set the elements in the `"button text"` array to ["Fight slime", "Fight fanged beast", and "Go to town square". Set te elements in the `"button functions"` array to be "fightSlime", "fightBeast", and "goTown". Set the value of the `text` property to "You enter the cave. You see some monsters.".
-*/
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- console.log("Going to cave.");
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
-}
-
-function buyWeapon() {
-}
diff --git a/basic-javascript-role-playing-game/index365.js b/basic-javascript-role-playing-game/index365.js
deleted file mode 100644
index 8775dc747..000000000
--- a/basic-javascript-role-playing-game/index365.js
+++ /dev/null
@@ -1,79 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-/* Now update the `goCave` function using the pattern from `goTown` and `goCave`.
-*/
-
-function goCave() {
- console.log("Going to cave.");
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
-}
-
-function buyWeapon() {
-}
diff --git a/basic-javascript-role-playing-game/index370.js b/basic-javascript-role-playing-game/index370.js
deleted file mode 100644
index 9ae05ef51..000000000
--- a/basic-javascript-role-playing-game/index370.js
+++ /dev/null
@@ -1,79 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
-}
-
-function buyWeapon() {
-}
-
-/* Create two more empty functions: `fightSlime` and `fightBeast`.
-*/
\ No newline at end of file
diff --git a/basic-javascript-role-playing-game/index375.js b/basic-javascript-role-playing-game/index375.js
deleted file mode 100644
index 04f9fe01b..000000000
--- a/basic-javascript-role-playing-game/index375.js
+++ /dev/null
@@ -1,85 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-/* Now that the store and cave locations are complete, we'll code the actions at those locations. Inside the `buyHealth` function, set `gold` to equal `gold` minus 10. For example here is how you would set set `num` to equal 5 less than `num`: `num = num - 5;`.
-*/
-
-function buyHealth() {
-}
-
-function buyWeapon() {
-}
-
-function fightSlime() {
-}
-
-function fightBeast() {
-}
diff --git a/basic-javascript-role-playing-game/index380.js b/basic-javascript-role-playing-game/index380.js
deleted file mode 100644
index 89fe99f40..000000000
--- a/basic-javascript-role-playing-game/index380.js
+++ /dev/null
@@ -1,86 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-/* After gold is subtracted, add ten to health.
-*/
-
-function buyHealth() {
- gold = gold - 10;
-}
-
-function buyWeapon() {
-}
-
-function fightSlime() {
-}
-
-function fightBeast() {
-}
diff --git a/basic-javascript-role-playing-game/index385.js b/basic-javascript-role-playing-game/index385.js
deleted file mode 100644
index 1481fdce1..000000000
--- a/basic-javascript-role-playing-game/index385.js
+++ /dev/null
@@ -1,87 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function fightDragon() {
- console.log("Fighting dragon.")
-}
-
-/* There is a shorthand way to add or subtract from a variable called compound assignment. The long way to add to a variable is `num = num + 5`. The shorthand way is `num += 5`. It works the same way with subtraction. Update both lines inside the `buyHealth` function to use compound assignment.
-*/
-
-function buyHealth() {
- gold = gold - 10;
- health = health + 10;
-}
-
-function buyWeapon() {
-}
-
-function fightSlime() {
-}
-
-function fightBeast() {
-}
diff --git a/basic-javascript-role-playing-game/index390.js b/basic-javascript-role-playing-game/index390.js
deleted file mode 100644
index d0883bbeb..000000000
--- a/basic-javascript-role-playing-game/index390.js
+++ /dev/null
@@ -1,87 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-/* Now that the gold and health variables have been updated, we need to update the values displayed on the screen. Inside the `buyHealth` function, add the line `goldText.innerText = gold;`. Then use the same pattern to update `healthText`.
-*/
-
-function buyHealth() {
- gold -= 10;
- health += 10;
-}
-
-function buyWeapon() {
-}
-
-function fightSlime() {
-}
-
-function fightBeast() {
-}
diff --git a/basic-javascript-role-playing-game/index395.js b/basic-javascript-role-playing-game/index395.js
deleted file mode 100644
index 708d3de91..000000000
--- a/basic-javascript-role-playing-game/index395.js
+++ /dev/null
@@ -1,97 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-/* What if the player doesn't have enough gold to buy health? Put all the code in the `buyHealth` function inside an `if` statement. Here is an example of an `if` statement inside a function:
-```
-function checkMoney() {
- if (condition) {
- console.log("You have money!");
- }
-}
-```
-Note: For now you should use the word "condition" inside the `if` statement but we'll be changing that next.
-*/
-
-function buyHealth() {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
-}
-
-function buyWeapon() {
-}
-
-function fightSlime() {
-}
-
-function fightBeast() {
-}
diff --git a/basic-javascript-role-playing-game/index400.js b/basic-javascript-role-playing-game/index400.js
deleted file mode 100644
index 6bde99f3a..000000000
--- a/basic-javascript-role-playing-game/index400.js
+++ /dev/null
@@ -1,94 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-/* The word "condition" inside the if statement is just a placeholder. Change the condition to check if the amount of gold the player has is greater than or equal to 10. Here is an `if` statement that checks if `num` is greater than or equal to 5:
-if (num >= 5) {
- console.log("Num is greater than or equal to five!");
-}
-*/
-
-function buyHealth() {
- if (condition) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- }
-}
-
-function buyWeapon() {
-}
-
-function fightSlime() {
-}
-
-function fightBeast() {
-}
diff --git a/basic-javascript-role-playing-game/index405.js b/basic-javascript-role-playing-game/index405.js
deleted file mode 100644
index 80cd0aff4..000000000
--- a/basic-javascript-role-playing-game/index405.js
+++ /dev/null
@@ -1,95 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-/* Now when a player tries to buy health it will only work if they have enough money. If the player does not have enough money, nothing will happen. Add an `else` statement where you can put code to run if a player dees not have enough money. Here is an example of an empty `else` statement:
-if (num >= 5) {
- console.log("Num is greater than or equal to five!");
-} else {
-}
-*/
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- }
-}
-
-function buyWeapon() {
-}
-
-function fightSlime() {
-}
-
-function fightBeast() {
-}
diff --git a/basic-javascript-role-playing-game/index415.js b/basic-javascript-role-playing-game/index415.js
deleted file mode 100644
index 8dadc380f..000000000
--- a/basic-javascript-role-playing-game/index415.js
+++ /dev/null
@@ -1,92 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function fightDragon() {
- console.log("Fighting dragon.")
-}
-
-/* Inside the `else` statement, set `text.innerText` to equal "You do not have enough gold to buy health."
-*/
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- }
-}
-
-function buyWeapon() {
-}
-
-function fightSlime() {
-}
-
-function fightBeast() {
-}
diff --git a/basic-javascript-role-playing-game/index420.js b/basic-javascript-role-playing-game/index420.js
deleted file mode 100644
index 499221e6f..000000000
--- a/basic-javascript-role-playing-game/index420.js
+++ /dev/null
@@ -1,93 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-/* Before we write the code for the `buyWeapon` function, use `const` to create a `weapons` variable right above the `locations` array. Set it to equal an empty array.
-*/
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
-}
-
-function fightSlime() {
-}
-
-function fightBeast() {
-}
diff --git a/basic-javascript-role-playing-game/index425.js b/basic-javascript-role-playing-game/index425.js
deleted file mode 100644
index 1c817db03..000000000
--- a/basic-javascript-role-playing-game/index425.js
+++ /dev/null
@@ -1,95 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-/* Just like in the `locations` array, all the elements in `weapons` will be objects. Add four objects to the `weapons` array, each with two properties: `name` and `power`. The first should be the `name` "stick" with `power` set to 5. Then, "dagger" with set `power` to 30. Next, "claw hammer" with a `power` of 50. Finally, "sword" with a `power` of 100.
-*/
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
-}
-
-function fightSlime() {
-}
-
-function fightBeast() {
-}
diff --git a/basic-javascript-role-playing-game/index430.js b/basic-javascript-role-playing-game/index430.js
deleted file mode 100644
index b3c6f39bd..000000000
--- a/basic-javascript-role-playing-game/index430.js
+++ /dev/null
@@ -1,112 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-/* Inside the `buyWeapon` function, add an `if` statement to check if gold is greater than or equal to 30.
-*/
-
-function buyWeapon() {
-}
-
-function fightSlime() {
-}
-
-function fightBeast() {
-}
diff --git a/basic-javascript-role-playing-game/index435.js b/basic-javascript-role-playing-game/index435.js
deleted file mode 100644
index 3ce90a7ea..000000000
--- a/basic-javascript-role-playing-game/index435.js
+++ /dev/null
@@ -1,115 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-/* Similar to in the `buyHealth` function, set `gold` to equal 30 less than its current value.
-*/
-
-function buyWeapon() {
- if (gold >= 30) {
-
- }
-}
-
-function fightSlime() {
-}
-
-function fightBeast() {
-}
diff --git a/basic-javascript-role-playing-game/index440.js b/basic-javascript-role-playing-game/index440.js
deleted file mode 100644
index 76bbb8f69..000000000
--- a/basic-javascript-role-playing-game/index440.js
+++ /dev/null
@@ -1,115 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (gold >= 30) {
- gold -= 30;
- }
-}
-
-/* The value of `currentWeapon` corresponds to an index in the `weapons` array. The player starts with a stick since `currentWeapon` starts at 0 and `weapons[0]` is the "stick" weapon. In the `buyWeapon` function, add one to `currentWeapon` since the user is buying the next weapon in the `weapons` array.
-*/
-
-function fightSlime() {
-}
-
-function fightBeast() {
-}
diff --git a/basic-javascript-role-playing-game/index445.js b/basic-javascript-role-playing-game/index445.js
deleted file mode 100644
index 30fee2af8..000000000
--- a/basic-javascript-role-playing-game/index445.js
+++ /dev/null
@@ -1,120 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-/* You can easily increment or add one to a variable with the `++` operator. All three of these statements add one to a number:
-num = num + 1;
-num += 1;
-num++;
-Change the line `currentWeapon += 1;` to use the `++` operator.
-*/
-
-function buyWeapon() {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon += 1;
- }
-}
-
-function fightSlime() {
-}
-
-function fightBeast() {
-}
diff --git a/basic-javascript-role-playing-game/index450.js b/basic-javascript-role-playing-game/index450.js
deleted file mode 100644
index ecc031ab1..000000000
--- a/basic-javascript-role-playing-game/index450.js
+++ /dev/null
@@ -1,116 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-/* Now update the `innerText` property of `goldText` and `text`. `text` should equal "You now have a new weapon.".
-*/
-
-function buyWeapon() {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- }
-}
-
-function fightSlime() {
-}
-
-function fightBeast() {
-}
diff --git a/basic-javascript-role-playing-game/index455.js b/basic-javascript-role-playing-game/index455.js
deleted file mode 100644
index 0e7c7fb3a..000000000
--- a/basic-javascript-role-playing-game/index455.js
+++ /dev/null
@@ -1,118 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-/* Let's tell the player what weapon they bought. In between the two lines you just wrote, use `let` to initialize a new variable called `newWeapon`. Set `newWeapon` to equal `weapons`.
-*/
-
-function buyWeapon() {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- text.innerText = "You now have a new weapon.";
- }
-}
-
-function fightSlime() {
-}
-
-function fightBeast() {
-}
diff --git a/basic-javascript-role-playing-game/index460.js b/basic-javascript-role-playing-game/index460.js
deleted file mode 100644
index f4eaa73e2..000000000
--- a/basic-javascript-role-playing-game/index460.js
+++ /dev/null
@@ -1,119 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-/* Right after the word `weapons` (with no space between), add brackets `[]`. In between the brackets put `currentWeapon`, which is the index number of the weapon the player just bought.
-*/
-
-function buyWeapon() {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons;
- text.innerText = "You now have a new weapon.";
- }
-}
-
-function fightSlime() {
-}
-
-function fightBeast() {
-}
diff --git a/basic-javascript-role-playing-game/index465.js b/basic-javascript-role-playing-game/index465.js
deleted file mode 100644
index 509cccccf..000000000
--- a/basic-javascript-role-playing-game/index465.js
+++ /dev/null
@@ -1,119 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-/* Get just the name property of the current weapon by adding `.name` at the end of `weapons[currentWeapon]` (don't use a space).
-*/
-
-function buyWeapon() {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon];
- text.innerText = "You now have a new weapon.";
- }
-}
-
-function fightSlime() {
-}
-
-function fightBeast() {
-}
diff --git a/basic-javascript-role-playing-game/index470.js b/basic-javascript-role-playing-game/index470.js
deleted file mode 100644
index a35844271..000000000
--- a/basic-javascript-role-playing-game/index470.js
+++ /dev/null
@@ -1,123 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-/* You can insert variables into a string with the concatenation (`+`) operator. Update the "You now have a new weapon." string so it says "You now have a " and then lists the name of the new weapon. Make sure to add a period at the end of the sentence. Here is an example that creates the string "Hello, our name is freeCodeCamp.":
-```
-let ourName = "freeCodeCamp";
-let ourStr = "Hello, our name is " + ourName + ".";
-```
-*/
-
-function buyWeapon() {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a new weapon.";
- }
-}
-
-function fightSlime() {
-}
-
-function fightBeast() {
-}
diff --git a/basic-javascript-role-playing-game/index480.js b/basic-javascript-role-playing-game/index480.js
deleted file mode 100644
index 434a6522d..000000000
--- a/basic-javascript-role-playing-game/index480.js
+++ /dev/null
@@ -1,125 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-/* Way back at the beginning you created the `inventory` array. Push the `newWeapon` onto the end of the `inventory` array. Here is an example of pushing onto an array:
-```
-let arr = ["first"];
-let next = "second";
-arr.push(next);
-// arr now equals ["first", "second"]
-```
-*/
-
-function buyWeapon() {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- }
-}
-
-function fightSlime() {
-}
-
-function fightBeast() {
-}
diff --git a/basic-javascript-role-playing-game/index485.js b/basic-javascript-role-playing-game/index485.js
deleted file mode 100644
index 6c15c0d7a..000000000
--- a/basic-javascript-role-playing-game/index485.js
+++ /dev/null
@@ -1,120 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-/* Up to this point, anytime `text.innerText` was updated, the old text was erased. This time, use the `+=` operator instead of the `=` operator to add text to the end of `text.innerText`. Add the string " In your inventory you have: " (include the spaces at the beginning and end).
-*/
-
-function buyWeapon() {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- }
-}
-
-function fightSlime() {
-}
-
-function fightBeast() {
-}
diff --git a/basic-javascript-role-playing-game/index490.js b/basic-javascript-role-playing-game/index490.js
deleted file mode 100644
index 202b71f1e..000000000
--- a/basic-javascript-role-playing-game/index490.js
+++ /dev/null
@@ -1,121 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-/* At the end of the string you just added after the ending quote mark, add `+ inventory` to add the contents of the inventory to the end of the string.
-*/
-
-function buyWeapon() {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: ";
- }
-}
-
-function fightSlime() {
-}
-
-function fightBeast() {
-}
diff --git a/basic-javascript-role-playing-game/index495.js b/basic-javascript-role-playing-game/index495.js
deleted file mode 100644
index af4b262ef..000000000
--- a/basic-javascript-role-playing-game/index495.js
+++ /dev/null
@@ -1,121 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-/* At the end of the `if` statement inside the `buyWeapon` function, add an `else` statement. Inside the `else` statement, set `text.innerText` to equal "You do not have enough gold to buy a weapon.".
-*/
-
-function buyWeapon() {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- }
-}
-
-function fightSlime() {
-}
-
-function fightBeast() {
-}
diff --git a/basic-javascript-role-playing-game/index500.js b/basic-javascript-role-playing-game/index500.js
deleted file mode 100644
index 40a6e93ed..000000000
--- a/basic-javascript-role-playing-game/index500.js
+++ /dev/null
@@ -1,123 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-/* Once a player has the best weapon, they can't buy another one. Wrap all the code in the `buyWeapon` function inside another `if` statement. The condition should check if `currentWeapon` is less than 3 (the index of the last weapon).
-*/
-
-function buyWeapon() {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
-}
-
-function fightSlime() {
-}
-
-function fightBeast() {
-}
diff --git a/basic-javascript-role-playing-game/index505.js b/basic-javascript-role-playing-game/index505.js
deleted file mode 100644
index c1658e863..000000000
--- a/basic-javascript-role-playing-game/index505.js
+++ /dev/null
@@ -1,125 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-/* At some point in the future, you may want to add more weapons. Instead of checking if `currentWeapon` is less than three, check if `currentWeapon` is less than the length of the `weapons` array. For example, here is how you would get the length of an array called `arr`: `arr.length`.
-*/
-
-function buyWeapon() {
- if (currentWeapon < 3) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- }
-}
-
-function fightSlime() {
-}
-
-function fightBeast() {
-}
diff --git a/basic-javascript-role-playing-game/index510.js b/basic-javascript-role-playing-game/index510.js
deleted file mode 100644
index e034779e6..000000000
--- a/basic-javascript-role-playing-game/index510.js
+++ /dev/null
@@ -1,125 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-/* We have to fix an error. The `currentWeapon` variable is the array index. Array indexing starts at zero. The index of the last element in an array is one less than the length of the array. In the `if` condition you are working on, change `weapons.length` to `weapons.length - 1`.
-*/
-
-function buyWeapon() {
- if (currentWeapon < weapons.length) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- }
-}
-
-function fightSlime() {
-}
-
-function fightBeast() {
-}
diff --git a/basic-javascript-role-playing-game/index515.js b/basic-javascript-role-playing-game/index515.js
deleted file mode 100644
index d05a09c46..000000000
--- a/basic-javascript-role-playing-game/index515.js
+++ /dev/null
@@ -1,125 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-/* Add an `else` statement on the end of the outer `if` statement. Inside the `else` statement, set `text.innerText` to "You already have the most powerful weapon!".
-*/
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- }
-}
-
-function fightSlime() {
-}
-
-function fightBeast() {
-}
diff --git a/basic-javascript-role-playing-game/index520.js b/basic-javascript-role-playing-game/index520.js
deleted file mode 100644
index 4fd4230a4..000000000
--- a/basic-javascript-role-playing-game/index520.js
+++ /dev/null
@@ -1,127 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-/* Once a player has the most powerful weapon, we'll give them the ability to sell their older weapons back. In the else statement, set `button2.innerText` to equal "Sell weapon for 15 gold". Also, set `button2.onclick` to the function name `sellWeapon`.
-*/
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- }
-}
-
-function fightSlime() {
-}
-
-function fightBeast() {
-}
diff --git a/basic-javascript-role-playing-game/index525.js b/basic-javascript-role-playing-game/index525.js
deleted file mode 100644
index 41e99bf1e..000000000
--- a/basic-javascript-role-playing-game/index525.js
+++ /dev/null
@@ -1,129 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-/* After the `buyWeapon` function, create an empty function called `sellWeapon`.
-*/
-
-function fightSlime() {
-}
-
-function fightBeast() {
-}
\ No newline at end of file
diff --git a/basic-javascript-role-playing-game/index530.js b/basic-javascript-role-playing-game/index530.js
deleted file mode 100644
index fcd932484..000000000
--- a/basic-javascript-role-playing-game/index530.js
+++ /dev/null
@@ -1,132 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-/* Players should not be able to sell their only weapon. Inside the `sellWeapon` function, add an `if` statement with a condition that checks if the length of the `inventory` array is greater than one.
-*/
-
-function sellWeapon() {
-}
-
-function fightSlime() {
-}
-
-function fightBeast() {
-}
diff --git a/basic-javascript-role-playing-game/index535.js b/basic-javascript-role-playing-game/index535.js
deleted file mode 100644
index 399a5483e..000000000
--- a/basic-javascript-role-playing-game/index535.js
+++ /dev/null
@@ -1,135 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-/* Inside the `if` statement, set `gold` equal to 15 more than its current value. Also, update `goldText.innerText` to the new value.
-*/
-
-function sellWeapon() {
- if (inventory.length > 1) {
-
- }
-}
-
-function fightSlime() {
-}
-
-function fightBeast() {
-}
diff --git a/basic-javascript-role-playing-game/index540.js b/basic-javascript-role-playing-game/index540.js
deleted file mode 100644
index d39f53161..000000000
--- a/basic-javascript-role-playing-game/index540.js
+++ /dev/null
@@ -1,136 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-/* Use the `let` keyword to create a variable named `currentWeapon`. Don't set it equal to anything yet. Notice that we already have a `currentWeapon` variable from earlier. Since the `let` keyword is used instead of `var`, this new version of `currentWeapon` is scoped only to this `if` statement. At the close of the `if` statement, the old version of `currentWeapon` will be used again.
-*/
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- }
-}
-
-function fightSlime() {
-}
-
-function fightBeast() {
-}
diff --git a/basic-javascript-role-playing-game/index545.js b/basic-javascript-role-playing-game/index545.js
deleted file mode 100644
index f93c9d363..000000000
--- a/basic-javascript-role-playing-game/index545.js
+++ /dev/null
@@ -1,142 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-/* Use the `shift()` method on the `inventory` array to remove the first element and return that removed element. Set `currentWeapon` to equal returned element. Here is an example:
-```
-let arr = ["one", "two", "three"];
-let firstElement = arr.shift();
-// arr now equals ["two", "three"] and firstElement now equals "one"
-```
-*/
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon;
- }
-}
-
-function fightSlime() {
-}
-
-function fightBeast() {
-}
diff --git a/basic-javascript-role-playing-game/index550.js b/basic-javascript-role-playing-game/index550.js
deleted file mode 100644
index 069618c52..000000000
--- a/basic-javascript-role-playing-game/index550.js
+++ /dev/null
@@ -1,137 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-/* After the line that creates the `currentWeapon` variable, set `text.innerText` to equal `"You sold a " + currentWeapon + "."`
-*/
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- }
-}
-
-function fightSlime() {
-}
-
-function fightBeast() {
-}
diff --git a/basic-javascript-role-playing-game/index555.js b/basic-javascript-role-playing-game/index555.js
deleted file mode 100644
index e40ebf65e..000000000
--- a/basic-javascript-role-playing-game/index555.js
+++ /dev/null
@@ -1,138 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-/* Now use the `+=` operator to add to `text.innerText`. Add the string " In your inventory you have: " (with spaces at the beginning and end). Then add the `inventory` variable to the end of the string.
-*/
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- }
-}
-
-function fightSlime() {
-}
-
-function fightBeast() {
-}
diff --git a/basic-javascript-role-playing-game/index560.js b/basic-javascript-role-playing-game/index560.js
deleted file mode 100644
index 1b49c5124..000000000
--- a/basic-javascript-role-playing-game/index560.js
+++ /dev/null
@@ -1,139 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-/* Add code so that if the length of the inventory is NOT more than one, then a text message appears that says "Don't sell your only weapon!".
-*/
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- }
-}
-
-function fightSlime() {
-}
-
-function fightBeast() {
-}
diff --git a/basic-javascript-role-playing-game/index565.js b/basic-javascript-role-playing-game/index565.js
deleted file mode 100644
index e6986749f..000000000
--- a/basic-javascript-role-playing-game/index565.js
+++ /dev/null
@@ -1,141 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-/* Now we'll start working on fighting monsters. Organize your code by moving the `fightDragon` function to the bottom of the code near the other fight functions.
-*/
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
-}
-
-function fightBeast() {
-}
diff --git a/basic-javascript-role-playing-game/index570.js b/basic-javascript-role-playing-game/index570.js
deleted file mode 100644
index b97650493..000000000
--- a/basic-javascript-role-playing-game/index570.js
+++ /dev/null
@@ -1,141 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-/* Below where the `weapons` array is defined, define a `monsters` array. Set the contents of the `monsters` array to: `{ name: "slime", level: 2, health: 15 }, {name: "fanged beast", level: 8, health: 60 }, { name: "dragon", level: 20, health: 300 }`. Space out the code similar to the `weapons` array so that it is easier to read.
-*/
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
-}
-
-function fightBeast() {
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
diff --git a/basic-javascript-role-playing-game/index575.js b/basic-javascript-role-playing-game/index575.js
deleted file mode 100644
index d679c5cf3..000000000
--- a/basic-javascript-role-playing-game/index575.js
+++ /dev/null
@@ -1,159 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-/* Fighting each type of monster will be very similar so all three fighting functions will call a function named `goFight`. At the end of the code, add an empty function named `goFight`.
-*/
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
-}
-
-function fightBeast() {
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
diff --git a/basic-javascript-role-playing-game/index580.js b/basic-javascript-role-playing-game/index580.js
deleted file mode 100644
index 6ea6efe09..000000000
--- a/basic-javascript-role-playing-game/index580.js
+++ /dev/null
@@ -1,162 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-/* Inside the `fightSlime` function, set `fighting` to equal 0 (which is the index of the slime in the `monsters` array). On the next line, call the `goFight` function. As a reminder, here is how you would call a function named `myFunc`: `myFunc();`.
-*/
-
-function fightSlime() {
-}
-
-function fightBeast() {
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function goFight() {
-}
diff --git a/basic-javascript-role-playing-game/index585.js b/basic-javascript-role-playing-game/index585.js
deleted file mode 100644
index f82cfb784..000000000
--- a/basic-javascript-role-playing-game/index585.js
+++ /dev/null
@@ -1,164 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-/* Write the code for the `fightBeast` and `fightDragon` functions, using the `fightSlime` function as an example. Make sure to delete the line that is already in the `fightDragon` function.
-*/
-
-function fightBeast() {
-}
-
-function fightDragon() {
- console.log("Fighting dragon.");
-}
-
-function goFight() {
-}
diff --git a/basic-javascript-role-playing-game/index590.js b/basic-javascript-role-playing-game/index590.js
deleted file mode 100644
index 6b556239f..000000000
--- a/basic-javascript-role-playing-game/index590.js
+++ /dev/null
@@ -1,167 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-/* Add a new object in the `locations` array with all the same properties as the other objects in the array. Set `name` to "fight". Set `"button text"` to `["Attack", "Dodge", "Run"]`. Set `"button functions"` to `[attack, dodge, goTown]`. And set `text` to "You are fighting a monster.".
-*/
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
-}
diff --git a/basic-javascript-role-playing-game/index595.js b/basic-javascript-role-playing-game/index595.js
deleted file mode 100644
index bf3a820df..000000000
--- a/basic-javascript-role-playing-game/index595.js
+++ /dev/null
@@ -1,173 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
-}
-
-/* At the end of the code create empty functions named `attack` and `dodge`.
-*/
\ No newline at end of file
diff --git a/basic-javascript-role-playing-game/index600.js b/basic-javascript-role-playing-game/index600.js
deleted file mode 100644
index 4533c1205..000000000
--- a/basic-javascript-role-playing-game/index600.js
+++ /dev/null
@@ -1,179 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-/* In the `goFight` function, call the `update` function. Pass `locations[3]` into the function.
-*/
-
-function goFight() {
-}
-
-function attack() {
-}
-
-function dodge() {
-}
diff --git a/basic-javascript-role-playing-game/index605.js b/basic-javascript-role-playing-game/index605.js
deleted file mode 100644
index 85eadc495..000000000
--- a/basic-javascript-role-playing-game/index605.js
+++ /dev/null
@@ -1,180 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-/* Next in the `goFight` function, set `monsterHealth` to equal the health of the current monster. You can get the health of the current monster with `monsters[fighting].health`. Try to understand that line before continuing.
-*/
-
-function goFight() {
- update(locations[3]);
-}
-
-function attack() {
-}
-
-function dodge() {
-}
diff --git a/basic-javascript-role-playing-game/index610.js b/basic-javascript-role-playing-game/index610.js
deleted file mode 100644
index a9bd57f7a..000000000
--- a/basic-javascript-role-playing-game/index610.js
+++ /dev/null
@@ -1,181 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-/* The HTML that shows the monster stats that has been hidden using CSS. Display the `monsterStats` HTML element by updating its CSS `display` property to equal `block`. Here is an example of updating the `display` property of an element named `myElement`: `myElement.style.display = "block";`
-*/
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
-}
-
-function attack() {
-}
-
-function dodge() {
-}
diff --git a/basic-javascript-role-playing-game/index615.js b/basic-javascript-role-playing-game/index615.js
deleted file mode 100644
index 68104640e..000000000
--- a/basic-javascript-role-playing-game/index615.js
+++ /dev/null
@@ -1,182 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-/* Now set the `innerText` property of `monsterNameText` to equal `monsters[fighting].name`. Also, set the `innerText` property of `monsterHealthText` to equal `monsterHealth`;
-*/
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
-}
-
-function attack() {
-}
-
-function dodge() {
-}
diff --git a/basic-javascript-role-playing-game/index620.js b/basic-javascript-role-playing-game/index620.js
deleted file mode 100644
index 9dd3bb32a..000000000
--- a/basic-javascript-role-playing-game/index620.js
+++ /dev/null
@@ -1,184 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-/* We'll build out the `attack` function now. For the first line in the function, update the text message to say "The [monster name] attacks." but replace "[monster name]" with the actual name of the monster. Remember, you can get the monster name with `monsters[fighting].name`.
-*/
-
-function attack() {
-}
-
-function dodge() {
-}
diff --git a/basic-javascript-role-playing-game/index625.js b/basic-javascript-role-playing-game/index625.js
deleted file mode 100644
index aadb3bf0c..000000000
--- a/basic-javascript-role-playing-game/index625.js
+++ /dev/null
@@ -1,185 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-/* Now use the `+=` operator to append more text to `text.innerText`. Add the text " You attack it with your [weapon name]." but replace "[weapon name]" with the actual weapon name. Remember, you can get the weapon name with `weapons[currentWeapon].name`.
-*/
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
-}
-
-function dodge() {
-}
diff --git a/basic-javascript-role-playing-game/index630.js b/basic-javascript-role-playing-game/index630.js
deleted file mode 100644
index f2556fce7..000000000
--- a/basic-javascript-role-playing-game/index630.js
+++ /dev/null
@@ -1,186 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-/* Next, set `health` to equal `health` minus the monster's level. You can get the monster's level with `monsters[fighting].level`.
-*/
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
-}
-
-function dodge() {
-}
diff --git a/basic-javascript-role-playing-game/index635.js b/basic-javascript-role-playing-game/index635.js
deleted file mode 100644
index 63979cb2b..000000000
--- a/basic-javascript-role-playing-game/index635.js
+++ /dev/null
@@ -1,187 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-/* Set `monsterHealth` to `monsterHealth` minus the power of the current weapon (`weapons[currentWeapon].power`).
-*/
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= monsters[fighting].level;
-}
-
-function dodge() {
-}
diff --git a/basic-javascript-role-playing-game/index640.js b/basic-javascript-role-playing-game/index640.js
deleted file mode 100644
index b3574d5d6..000000000
--- a/basic-javascript-role-playing-game/index640.js
+++ /dev/null
@@ -1,188 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-/* At the end of that line, add a random number between one and the value of `xp`. Here is the formula to get a random number between 1 and 5: `Math.floor(Math.random() * 5) + 1`.
-*/
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= monsters[fighting].level;
- monsterHealth -= weapons[currentWeapon].power;
-}
-
-function dodge() {
-}
diff --git a/basic-javascript-role-playing-game/index645.js b/basic-javascript-role-playing-game/index645.js
deleted file mode 100644
index 1c2dd7b16..000000000
--- a/basic-javascript-role-playing-game/index645.js
+++ /dev/null
@@ -1,188 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-/* Update `healthText.innerText` and `monsterHealthText.innerText` to equal `health` and `monsterHealth`.
-*/
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= monsters[fighting].level;
- monsterHealth -= weapons[currentWeapon].power + Math.floor(Math.random() * xp) + 1;
-}
-
-function dodge() {
-}
diff --git a/basic-javascript-role-playing-game/index650.js b/basic-javascript-role-playing-game/index650.js
deleted file mode 100644
index 77c2624d9..000000000
--- a/basic-javascript-role-playing-game/index650.js
+++ /dev/null
@@ -1,190 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-/* Check if health is less than or equal to zero. If it is, call the `lose()` function.
-*/
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= monsters[fighting].level;
- monsterHealth -= weapons[currentWeapon].power + Math.floor(Math.random() * xp) + 1;
- healthText.innerText = health;
- monsterHealthText.innerText = monsterHealth;
-}
-
-function dodge() {
-}
diff --git a/basic-javascript-role-playing-game/index655.js b/basic-javascript-role-playing-game/index655.js
deleted file mode 100644
index 0e71d5563..000000000
--- a/basic-javascript-role-playing-game/index655.js
+++ /dev/null
@@ -1,202 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-/* An `else` statement can be conditional with an `else if` statement. At the end of the `if` statement, add an `else if` statement to check if `monsterHealth` is less than or equal to zero. Inside the `else if` block, call the `defeatMonster()` function. Here is an example of an `if` statement with `else if` and `else`:
-```
-if (num > 15) {
- return "Bigger than 15";
-} else if (num < 5) {
- return "Smaller than 5";
-} else {
- return "Between 5 and 15";
-}
-```
-*/
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= monsters[fighting].level;
- monsterHealth -= weapons[currentWeapon].power + Math.floor(Math.random() * xp) + 1;
- healthText.innerText = health;
- monsterHealthText.innerText = monsterHealth;
- if (health <= 0) {
- lose();
- }
-}
-
-function dodge() {
-}
diff --git a/basic-javascript-role-playing-game/index670.js b/basic-javascript-role-playing-game/index670.js
deleted file mode 100644
index c067d7204..000000000
--- a/basic-javascript-role-playing-game/index670.js
+++ /dev/null
@@ -1,195 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-/* At the end of the code add two empty functions named `defeat monster` and `lose`.
-*/
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= monsters[fighting].level;
- monsterHealth -= weapons[currentWeapon].power + Math.floor(Math.random() * xp) + 1;
- healthText.innerText = health;
- monsterHealthText.innerText = monsterHealth;
- if (health <= 0) {
- lose();
- } else if (monsterHealth <= 0) {
- defeatMonster();
- }
-}
-
-function dodge() {
-}
diff --git a/basic-javascript-role-playing-game/index675.js b/basic-javascript-role-playing-game/index675.js
deleted file mode 100644
index c64984ee3..000000000
--- a/basic-javascript-role-playing-game/index675.js
+++ /dev/null
@@ -1,201 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= monsters[fighting].level;
- monsterHealth -= weapons[currentWeapon].power + Math.floor(Math.random() * xp) + 1;
- healthText.innerText = health;
- monsterHealthText.innerText = monsterHealth;
- if (health <= 0) {
- lose();
- } else if (monsterHealth <= 0) {
- defeatMonster();
- }
-}
-
-/* Inside the `dodge` function, set `text.innerText` equal to "You dodge the attack from the [monster's name]." Instead of "[monster's name]", get the monster's name with `monsters[fighting].name`.
-*/
-
-function dodge() {
-}
-
-function defeatMonster() {
-}
-
-function lose() {
-}
diff --git a/basic-javascript-role-playing-game/index680.js b/basic-javascript-role-playing-game/index680.js
deleted file mode 100644
index a788f5356..000000000
--- a/basic-javascript-role-playing-game/index680.js
+++ /dev/null
@@ -1,202 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= monsters[fighting].level;
- monsterHealth -= weapons[currentWeapon].power + Math.floor(Math.random() * xp) + 1;
- healthText.innerText = health;
- monsterHealthText.innerText = monsterHealth;
- if (health <= 0) {
- lose();
- } else if (monsterHealth <= 0) {
- defeatMonster();
- }
-}
-
-function dodge() {
- text.innerText = "You dodge the attack from the " + monsters[fighting].name + ".";
-}
-
-/* In the `defeatMonster` function, set `gold` to equal `gold` plus the monster's level times 6.7. You can get the monster's level with `monsters[fighting].level`. Here is how you would set `num` to equal `num` plus five times eight: `num += 5 * 8;`.
-*/
-
-function defeatMonster() {
-}
-
-function lose() {
-}
diff --git a/basic-javascript-role-playing-game/index685.js b/basic-javascript-role-playing-game/index685.js
deleted file mode 100644
index f21a0732c..000000000
--- a/basic-javascript-role-playing-game/index685.js
+++ /dev/null
@@ -1,203 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= monsters[fighting].level;
- monsterHealth -= weapons[currentWeapon].power + Math.floor(Math.random() * xp) + 1;
- healthText.innerText = health;
- monsterHealthText.innerText = monsterHealth;
- if (health <= 0) {
- lose();
- } else if (monsterHealth <= 0) {
- defeatMonster();
- }
-}
-
-function dodge() {
- text.innerText = "You dodge the attack from the " + monsters[fighting].name + ".";
-}
-
-/* Set `xp` to equal `xp` plus the monster's level.
-*/
-
-function defeatMonster() {
- gold += Math.floor(monsters[fighting].level * 6.7);
-}
-
-function lose() {
-}
diff --git a/basic-javascript-role-playing-game/index690.js b/basic-javascript-role-playing-game/index690.js
deleted file mode 100644
index 04e492f9c..000000000
--- a/basic-javascript-role-playing-game/index690.js
+++ /dev/null
@@ -1,204 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= monsters[fighting].level;
- monsterHealth -= weapons[currentWeapon].power + Math.floor(Math.random() * xp) + 1;
- healthText.innerText = health;
- monsterHealthText.innerText = monsterHealth;
- if (health <= 0) {
- lose();
- } else if (monsterHealth <= 0) {
- defeatMonster();
- }
-}
-
-function dodge() {
- text.innerText = "You dodge the attack from the " + monsters[fighting].name + ".";
-}
-
-/* Now set the `innerText` properties of `goldText` and `xpText` to the updated values.
-*/
-
-function defeatMonster() {
- gold += Math.floor(monsters[fighting].level * 6.7);
- xp += monsters[fighting].level;
-}
-
-function lose() {
-}
diff --git a/basic-javascript-role-playing-game/index695.js b/basic-javascript-role-playing-game/index695.js
deleted file mode 100644
index fdbb7b1d5..000000000
--- a/basic-javascript-role-playing-game/index695.js
+++ /dev/null
@@ -1,206 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= monsters[fighting].level;
- monsterHealth -= weapons[currentWeapon].power + Math.floor(Math.random() * xp) + 1;
- healthText.innerText = health;
- monsterHealthText.innerText = monsterHealth;
- if (health <= 0) {
- lose();
- } else if (monsterHealth <= 0) {
- defeatMonster();
- }
-}
-
-function dodge() {
- text.innerText = "You dodge the attack from the " + monsters[fighting].name + ".";
-}
-
-/* Finish the `defeatMonster` function by calling the `update()` function and pass in `locations[4]`.
-*/
-
-function defeatMonster() {
- gold += Math.floor(monsters[fighting].level * 6.7);
- xp += monsters[fighting].level;
- goldText.innerText = gold;
- xpText.innerText = xp;
-}
-
-function lose() {
-}
diff --git a/basic-javascript-role-playing-game/index700.js b/basic-javascript-role-playing-game/index700.js
deleted file mode 100644
index c9eb0cb9e..000000000
--- a/basic-javascript-role-playing-game/index700.js
+++ /dev/null
@@ -1,207 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-/* Add a new object in the `locations` array with all the same properties as the other objects in the array. Set `name` to "kill monster". Set `"button text"` to `["Go to town square", "Go to town square", "Go to town square"]`. Set `"button functions"` to `[goTown, goTown, goTown]`. And set `text` to "The monster screams Arg! as it dies. You gain experience points and find gold.".
-*/
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= monsters[fighting].level;
- monsterHealth -= weapons[currentWeapon].power + Math.floor(Math.random() * xp) + 1;
- healthText.innerText = health;
- monsterHealthText.innerText = monsterHealth;
- if (health <= 0) {
- lose();
- } else if (monsterHealth <= 0) {
- defeatMonster();
- }
-}
-
-function dodge() {
- text.innerText = "You dodge the attack from the " + monsters[fighting].name + ".";
-}
-
-function defeatMonster() {
- gold += Math.floor(monsters[fighting].level * 6.7);
- xp += monsters[fighting].level;
- goldText.innerText = gold;
- xpText.innerText = xp;
- update(locations[4]);
-}
-
-function lose() {
-}
diff --git a/basic-javascript-role-playing-game/index705.js b/basic-javascript-role-playing-game/index705.js
deleted file mode 100644
index 450c1ea2b..000000000
--- a/basic-javascript-role-playing-game/index705.js
+++ /dev/null
@@ -1,213 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-/* The word "Arg!" should have quotes around it. Besides escaping quotes, there is another way you can include quote marks inside a quote. Change the double quotes to single quotes around the sentence, "The monster screams Arg! as it dies. You gain experience points and find gold". Then add double quotes around "Arg!"
-*/
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- },
- {
- name: "kill monster",
- "button text": ["Go to town square", "Go to town square", "Go to town square"],
- "button functions": [goTown, goTown, goTown],
- text: "The monster screams Arg! as it dies. You gain experience points and find gold."
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= monsters[fighting].level;
- monsterHealth -= weapons[currentWeapon].power + Math.floor(Math.random() * xp) + 1;
- healthText.innerText = health;
- monsterHealthText.innerText = monsterHealth;
- if (health <= 0) {
- lose();
- } else if (monsterHealth <= 0) {
- defeatMonster();
- }
-}
-
-function dodge() {
- text.innerText = "You dodge the attack from the " + monsters[fighting].name + ".";
-}
-
-function defeatMonster() {
- gold += Math.floor(monsters[fighting].level * 6.7);
- xp += monsters[fighting].level;
- goldText.innerText = gold;
- xpText.innerText = xp;
- update(locations[4]);
-}
-
-function lose() {
-}
diff --git a/basic-javascript-role-playing-game/index710.js b/basic-javascript-role-playing-game/index710.js
deleted file mode 100644
index be33248e5..000000000
--- a/basic-javascript-role-playing-game/index710.js
+++ /dev/null
@@ -1,213 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-/* While your working in the `locations` array, add another object at the end. Set `name` to "lose". Set `"button text"` to `["REPLAY?", "REPLAY?", "REPLAY?"]`. Set `"button functions"` to `[restart, restart, restart]`. And set `text` to "You die. ☠️".
-*/
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- },
- {
- name: "kill monster",
- "button text": ["Go to town square", "Go to town square", "Go to town square"],
- "button functions": [goTown, goTown, goTown],
- text: 'The monster screams "Arg!" as it dies. You gain experience points and find gold.'
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= monsters[fighting].level;
- monsterHealth -= weapons[currentWeapon].power + Math.floor(Math.random() * xp) + 1;
- healthText.innerText = health;
- monsterHealthText.innerText = monsterHealth;
- if (health <= 0) {
- lose();
- } else if (monsterHealth <= 0) {
- defeatMonster();
- }
-}
-
-function dodge() {
- text.innerText = "You dodge the attack from the " + monsters[fighting].name + ".";
-}
-
-function defeatMonster() {
- gold += Math.floor(monsters[fighting].level * 6.7);
- xp += monsters[fighting].level;
- goldText.innerText = gold;
- xpText.innerText = xp;
- update(locations[4]);
-}
-
-function lose() {
-}
diff --git a/basic-javascript-role-playing-game/index713.js b/basic-javascript-role-playing-game/index713.js
deleted file mode 100644
index 9c2005ad0..000000000
--- a/basic-javascript-role-playing-game/index713.js
+++ /dev/null
@@ -1,219 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- },
- {
- name: "kill monster",
- "button text": ["Go to town square", "Go to town square", "Go to town square"],
- "button functions": [goTown, goTown, goTown],
- text: 'The monster screams "Arg!" as it dies. You gain experience points and find gold.'
- },
- {
- name: "lose",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You die. ☠️"
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-/* After a monster is defeated the monster stat box should no longer display. On the first line of the `update` function add: `monsterStats.style.display = "none";`.
-*/
-
-function update(location) {
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= monsters[fighting].level;
- monsterHealth -= weapons[currentWeapon].power + Math.floor(Math.random() * xp) + 1;
- healthText.innerText = health;
- monsterHealthText.innerText = monsterHealth;
- if (health <= 0) {
- lose();
- } else if (monsterHealth <= 0) {
- defeatMonster();
- }
-}
-
-function dodge() {
- text.innerText = "You dodge the attack from the " + monsters[fighting].name + ".";
-}
-
-function defeatMonster() {
- gold += Math.floor(monsters[fighting].level * 6.7);
- xp += monsters[fighting].level;
- goldText.innerText = gold;
- xpText.innerText = xp;
- update(locations[4]);
-}
-
-function lose() {
-}
diff --git a/basic-javascript-role-playing-game/index715.js b/basic-javascript-role-playing-game/index715.js
deleted file mode 100644
index ca43c43c6..000000000
--- a/basic-javascript-role-playing-game/index715.js
+++ /dev/null
@@ -1,220 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- },
- {
- name: "kill monster",
- "button text": ["Go to town square", "Go to town square", "Go to town square"],
- "button functions": [goTown, goTown, goTown],
- text: 'The monster screams "Arg!" as it dies. You gain experience points and find gold.'
- },
- {
- name: "lose",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You die. ☠️"
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- monsterStats.style.display = "none";
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= monsters[fighting].level;
- monsterHealth -= weapons[currentWeapon].power + Math.floor(Math.random() * xp) + 1;
- healthText.innerText = health;
- monsterHealthText.innerText = monsterHealth;
- if (health <= 0) {
- lose();
- } else if (monsterHealth <= 0) {
- defeatMonster();
- }
-}
-
-function dodge() {
- text.innerText = "You dodge the attack from the " + monsters[fighting].name + ".";
-}
-
-function defeatMonster() {
- gold += Math.floor(monsters[fighting].level * 6.7);
- xp += monsters[fighting].level;
- goldText.innerText = gold;
- xpText.innerText = xp;
- update(locations[4]);
-}
-
-/* In the `lose` function, call the `update` function and pass in `locations[5]`;
-*/
-
-function lose() {
-}
diff --git a/basic-javascript-role-playing-game/index725.js b/basic-javascript-role-playing-game/index725.js
deleted file mode 100644
index 28ef7018e..000000000
--- a/basic-javascript-role-playing-game/index725.js
+++ /dev/null
@@ -1,221 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- },
- {
- name: "kill monster",
- "button text": ["Go to town square", "Go to town square", "Go to town square"],
- "button functions": [goTown, goTown, goTown],
- text: 'The monster screams "Arg!" as it dies. You gain experience points and find gold.'
- },
- {
- name: "lose",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You die. ☠️"
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- monsterStats.style.display = "none";
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= monsters[fighting].level;
- monsterHealth -= weapons[currentWeapon].power + Math.floor(Math.random() * xp) + 1;
- healthText.innerText = health;
- monsterHealthText.innerText = monsterHealth;
- if (health <= 0) {
- lose();
- } else if (monsterHealth <= 0) {
- defeatMonster();
- }
-}
-
-function dodge() {
- text.innerText = "You dodge the attack from the " + monsters[fighting].name + ".";
-}
-
-function defeatMonster() {
- gold += Math.floor(monsters[fighting].level * 6.7);
- xp += monsters[fighting].level;
- goldText.innerText = gold;
- xpText.innerText = xp;
- update(locations[4]);
-}
-
-function lose() {
- update(locations[5]);
-}
-
-/* At the end of the code, create a `restart` function. Inside the function, set `xp` to 0, set `gold` to 50, set `currentWeapon` to 0, and set `inventory` to `["stick"]`. Also, update the `innerText` properties of `goldText`, `healthText`, and `xpText` to their current values. Finally, call the `goTown()` function. After this step is a good time to test the game so far.
-*/
\ No newline at end of file
diff --git a/basic-javascript-role-playing-game/index730.js b/basic-javascript-role-playing-game/index730.js
deleted file mode 100644
index 2433deffd..000000000
--- a/basic-javascript-role-playing-game/index730.js
+++ /dev/null
@@ -1,233 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- },
- {
- name: "kill monster",
- "button text": ["Go to town square", "Go to town square", "Go to town square"],
- "button functions": [goTown, goTown, goTown],
- text: 'The monster screams "Arg!" as it dies. You gain experience points and find gold.'
- },
- {
- name: "lose",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You die. ☠️"
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- monsterStats.style.display = "none";
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-/* Inside the `attack` function, update the contents of the `else if` statement. Instead of calling the `defeatMonster` function right away, create an `if` statement with an `else` statement. If the player is fighting the dragon (`fighting === 2`), then call the `winGame` function. Else, call the `defeatMonster` function.
-*/
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= monsters[fighting].level;
- monsterHealth -= weapons[currentWeapon].power + Math.floor(Math.random() * xp) + 1;
- healthText.innerText = health;
- monsterHealthText.innerText = monsterHealth;
- if (health <= 0) {
- lose();
- } else if (monsterHealth <= 0) {
- defeatMonster();
- }
-}
-
-function dodge() {
- text.innerText = "You dodge the attack from the " + monsters[fighting].name + ".";
-}
-
-function defeatMonster() {
- gold += Math.floor(monsters[fighting].level * 6.7);
- xp += monsters[fighting].level;
- goldText.innerText = gold;
- xpText.innerText = xp;
- update(locations[4]);
-}
-
-function lose() {
- update(locations[5]);
-}
-
-function restart() {
- xp = 0;
- health = 100;
- gold = 50;
- currentWeapon = 0;
- inventory = ["stick"];
- goldText.innerText = gold;
- healthText.innerText = health;
- xpText.innerText = xp;
- goTown();
-}
diff --git a/basic-javascript-role-playing-game/index735.js b/basic-javascript-role-playing-game/index735.js
deleted file mode 100644
index 430543207..000000000
--- a/basic-javascript-role-playing-game/index735.js
+++ /dev/null
@@ -1,249 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- },
- {
- name: "kill monster",
- "button text": ["Go to town square", "Go to town square", "Go to town square"],
- "button functions": [goTown, goTown, goTown],
- text: 'The monster screams "Arg!" as it dies. You gain experience points and find gold.'
- },
- {
- name: "lose",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You die. ☠️"
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- monsterStats.style.display = "none";
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-/* The conditional operator, also called the ternary operator, can be used as a one line if-else expression. The syntax is: `condition ? statement-if-true : statement-if-false;`. Change the if-else expression from the last challenge to use the ternary operator instead. Here is an example:
-```
-if (age >= 18) {
- adultFunction();
-} else {
- kidFunction();
-}
-
-// The above if-else expression does the same thing as the following line
-
-age >= 18 ? adultFunction() : kidFunction();
-
-```
-*/
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= monsters[fighting].level;
- monsterHealth -= weapons[currentWeapon].power + Math.floor(Math.random() * xp) + 1;
- healthText.innerText = health;
- monsterHealthText.innerText = monsterHealth;
- if (health <= 0) {
- lose();
- } else if (monsterHealth <= 0) {
- if (fighting === 2) {
- winGame();
- } else {
- defeatMonster();
- }
- }
-}
-
-function dodge() {
- text.innerText = "You dodge the attack from the " + monsters[fighting].name + ".";
-}
-
-function defeatMonster() {
- gold += Math.floor(monsters[fighting].level * 6.7);
- xp += monsters[fighting].level;
- goldText.innerText = gold;
- xpText.innerText = xp;
- update(locations[4]);
-}
-
-function lose() {
- update(locations[5]);
-}
-
-function restart() {
- xp = 0;
- health = 100;
- gold = 50;
- currentWeapon = 0;
- inventory = ["stick"];
- goldText.innerText = gold;
- healthText.innerText = health;
- xpText.innerText = xp;
- goTown();
-}
diff --git a/basic-javascript-role-playing-game/index740.js b/basic-javascript-role-playing-game/index740.js
deleted file mode 100644
index 8443c51dc..000000000
--- a/basic-javascript-role-playing-game/index740.js
+++ /dev/null
@@ -1,233 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- },
- {
- name: "kill monster",
- "button text": ["Go to town square", "Go to town square", "Go to town square"],
- "button functions": [goTown, goTown, goTown],
- text: 'The monster screams "Arg!" as it dies. You gain experience points and find gold.'
- },
- {
- name: "lose",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You die. ☠️"
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- monsterStats.style.display = "none";
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= monsters[fighting].level;
- monsterHealth -= weapons[currentWeapon].power + Math.floor(Math.random() * xp) + 1;
- healthText.innerText = health;
- monsterHealthText.innerText = monsterHealth;
- if (health <= 0) {
- lose();
- } else if (monsterHealth <= 0) {
- fighting === 2 ? winGame() : defeatMonster();
- }
-}
-
-function dodge() {
- text.innerText = "You dodge the attack from the " + monsters[fighting].name + ".";
-}
-
-function defeatMonster() {
- gold += Math.floor(monsters[fighting].level * 6.7);
- xp += monsters[fighting].level;
- goldText.innerText = gold;
- xpText.innerText = xp;
- update(locations[4]);
-}
-
-function lose() {
- update(locations[5]);
-}
-
-/* After the `lose` function, create a function called `winGame`. Inside the `winGame` function, call the `update` function and pass in `locations[6]`.
-*/
-
-function restart() {
- xp = 0;
- health = 100;
- gold = 50;
- currentWeapon = 0;
- inventory = ["stick"];
- goldText.innerText = gold;
- healthText.innerText = health;
- xpText.innerText = xp;
- goTown();
-}
diff --git a/basic-javascript-role-playing-game/index745.js b/basic-javascript-role-playing-game/index745.js
deleted file mode 100644
index da3ef10b6..000000000
--- a/basic-javascript-role-playing-game/index745.js
+++ /dev/null
@@ -1,237 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-/* Add another object in the `locations` array. Everything should be the same as the "lose" element, except the `name` should be "win" and the text should be "You defeat the dragon! YOU WIN THE GAME! 🎉"
-*/
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- },
- {
- name: "kill monster",
- "button text": ["Go to town square", "Go to town square", "Go to town square"],
- "button functions": [goTown, goTown, goTown],
- text: 'The monster screams "Arg!" as it dies. You gain experience points and find gold.'
- },
- {
- name: "lose",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You die. ☠️"
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- monsterStats.style.display = "none";
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= monsters[fighting].level;
- monsterHealth -= weapons[currentWeapon].power + Math.floor(Math.random() * xp) + 1;
- healthText.innerText = health;
- monsterHealthText.innerText = monsterHealth;
- if (health <= 0) {
- lose();
- } else if (monsterHealth <= 0) {
- fighting === 2 ? winGame() : defeatMonster();
- }
-}
-
-function dodge() {
- text.innerText = "You dodge the attack from the " + monsters[fighting].name + ".";
-}
-
-function defeatMonster() {
- gold += Math.floor(monsters[fighting].level * 6.7);
- xp += monsters[fighting].level;
- goldText.innerText = gold;
- xpText.innerText = xp;
- update(locations[4]);
-}
-
-function lose() {
- update(locations[5]);
-}
-
-function winGame() {
- update(locations[6]);
-}
-
-function restart() {
- xp = 0;
- health = 100;
- gold = 50;
- currentWeapon = 0;
- inventory = ["stick"];
- goldText.innerText = gold;
- healthText.innerText = health;
- xpText.innerText = xp;
- goTown();
-}
diff --git a/basic-javascript-role-playing-game/index750.js b/basic-javascript-role-playing-game/index750.js
deleted file mode 100644
index fcb9f678a..000000000
--- a/basic-javascript-role-playing-game/index750.js
+++ /dev/null
@@ -1,243 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- },
- {
- name: "kill monster",
- "button text": ["Go to town square", "Go to town square", "Go to town square"],
- "button functions": [goTown, goTown, goTown],
- text: 'The monster screams "Arg!" as it dies. You gain experience points and find gold.'
- },
- {
- name: "lose",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You die. ☠️"
- },
- {
- name: "win",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You defeat the dragon! YOU WIN THE GAME! 🎉"
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- monsterStats.style.display = "none";
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-/* The game could be complete now, but let's make it more interesting. Inside the `attack` function, change the line `health -= monsters[fighting].level;` to `health -= getMonsterAttackValue(monsters[fighting].level);` This sets `health` to equal `health` minus the return value of the `getMonsterAttackValue` function. The level of the monster is passed into the function.
-*/
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= monsters[fighting].level;
- monsterHealth -= weapons[currentWeapon].power + Math.floor(Math.random() * xp) + 1;
- healthText.innerText = health;
- monsterHealthText.innerText = monsterHealth;
- if (health <= 0) {
- lose();
- } else if (monsterHealth <= 0) {
- fighting === 2 ? winGame() : defeatMonster();
- }
-}
-
-function dodge() {
- text.innerText = "You dodge the attack from the " + monsters[fighting].name + ".";
-}
-
-function defeatMonster() {
- gold += Math.floor(monsters[fighting].level * 6.7);
- xp += monsters[fighting].level;
- goldText.innerText = gold;
- xpText.innerText = xp;
- update(locations[4]);
-}
-
-function lose() {
- update(locations[5]);
-}
-
-function winGame() {
- update(locations[6]);
-}
-
-function restart() {
- xp = 0;
- health = 100;
- gold = 50;
- currentWeapon = 0;
- inventory = ["stick"];
- goldText.innerText = gold;
- healthText.innerText = health;
- xpText.innerText = xp;
- goTown();
-}
diff --git a/basic-javascript-role-playing-game/index755.js b/basic-javascript-role-playing-game/index755.js
deleted file mode 100644
index 5c91a2238..000000000
--- a/basic-javascript-role-playing-game/index755.js
+++ /dev/null
@@ -1,243 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- },
- {
- name: "kill monster",
- "button text": ["Go to town square", "Go to town square", "Go to town square"],
- "button functions": [goTown, goTown, goTown],
- text: 'The monster screams "Arg!" as it dies. You gain experience points and find gold.'
- },
- {
- name: "lose",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You die. ☠️"
- },
- {
- name: "win",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You defeat the dragon! YOU WIN THE GAME! 🎉"
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- monsterStats.style.display = "none";
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= getMonsterAttackValue(monsters[fighting].level);
- monsterHealth -= weapons[currentWeapon].power + Math.floor(Math.random() * xp) + 1;
- healthText.innerText = health;
- monsterHealthText.innerText = monsterHealth;
- if (health <= 0) {
- lose();
- } else if (monsterHealth <= 0) {
- fighting === 2 ? winGame() : defeatMonster();
- }
-}
-
-/* Under the `attack` function, create a function with name `getMonsterAttackValue` that takes `level` as a parameter.
-*/
-
-function dodge() {
- text.innerText = "You dodge the attack from the " + monsters[fighting].name + ".";
-}
-
-function defeatMonster() {
- gold += Math.floor(monsters[fighting].level * 6.7);
- xp += monsters[fighting].level;
- goldText.innerText = gold;
- xpText.innerText = xp;
- update(locations[4]);
-}
-
-function lose() {
- update(locations[5]);
-}
-
-function winGame() {
- update(locations[6]);
-}
-
-function restart() {
- xp = 0;
- health = 100;
- gold = 50;
- currentWeapon = 0;
- inventory = ["stick"];
- goldText.innerText = gold;
- healthText.innerText = health;
- xpText.innerText = xp;
- goTown();
-}
diff --git a/basic-javascript-role-playing-game/index760.js b/basic-javascript-role-playing-game/index760.js
deleted file mode 100644
index a7f56cdd1..000000000
--- a/basic-javascript-role-playing-game/index760.js
+++ /dev/null
@@ -1,246 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- },
- {
- name: "kill monster",
- "button text": ["Go to town square", "Go to town square", "Go to town square"],
- "button functions": [goTown, goTown, goTown],
- text: 'The monster screams "Arg!" as it dies. You gain experience points and find gold.'
- },
- {
- name: "lose",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You die. ☠️"
- },
- {
- name: "win",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You defeat the dragon! YOU WIN THE GAME! 🎉"
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- monsterStats.style.display = "none";
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= getMonsterAttackValue(monsters[fighting].level);
- monsterHealth -= weapons[currentWeapon].power + Math.floor(Math.random() * xp) + 1;
- healthText.innerText = health;
- monsterHealthText.innerText = monsterHealth;
- if (health <= 0) {
- lose();
- } else if (monsterHealth <= 0) {
- fighting === 2 ? winGame() : defeatMonster();
- }
-}
-
-/* The attack of the monster will be based on the monster's level and player's `xp`. In the `getMonsterAttackValue` function, use `let` to create a variable called `hit`. Set it to equal the equation `(level * 5) - (Math.floor(Math.random() * xp))`.
-*/
-
-function getMonsterAttackValue(level) {
-}
-
-function dodge() {
- text.innerText = "You dodge the attack from the " + monsters[fighting].name + ".";
-}
-
-function defeatMonster() {
- gold += Math.floor(monsters[fighting].level * 6.7);
- xp += monsters[fighting].level;
- goldText.innerText = gold;
- xpText.innerText = xp;
- update(locations[4]);
-}
-
-function lose() {
- update(locations[5]);
-}
-
-function winGame() {
- update(locations[6]);
-}
-
-function restart() {
- xp = 0;
- health = 100;
- gold = 50;
- currentWeapon = 0;
- inventory = ["stick"];
- goldText.innerText = gold;
- healthText.innerText = health;
- xpText.innerText = xp;
- goTown();
-}
diff --git a/basic-javascript-role-playing-game/index765.js b/basic-javascript-role-playing-game/index765.js
deleted file mode 100644
index 901693b67..000000000
--- a/basic-javascript-role-playing-game/index765.js
+++ /dev/null
@@ -1,247 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- },
- {
- name: "kill monster",
- "button text": ["Go to town square", "Go to town square", "Go to town square"],
- "button functions": [goTown, goTown, goTown],
- text: 'The monster screams "Arg!" as it dies. You gain experience points and find gold.'
- },
- {
- name: "lose",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You die. ☠️"
- },
- {
- name: "win",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You defeat the dragon! YOU WIN THE GAME! 🎉"
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- monsterStats.style.display = "none";
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= getMonsterAttackValue(monsters[fighting].level);
- monsterHealth -= weapons[currentWeapon].power + Math.floor(Math.random() * xp) + 1;
- healthText.innerText = health;
- monsterHealthText.innerText = monsterHealth;
- if (health <= 0) {
- lose();
- } else if (monsterHealth <= 0) {
- fighting === 2 ? winGame() : defeatMonster();
- }
-}
-
-/* Log the value of `hit` to the console to use in debugging. Here is how to log the value of `num` to the console: `console.log(num);`.
-*/
-
-function getMonsterAttackValue(level) {
- let hit = (level * 5) - (Math.floor(Math.random() * xp));
-}
-
-function dodge() {
- text.innerText = "You dodge the attack from the " + monsters[fighting].name + ".";
-}
-
-function defeatMonster() {
- gold += Math.floor(monsters[fighting].level * 6.7);
- xp += monsters[fighting].level;
- goldText.innerText = gold;
- xpText.innerText = xp;
- update(locations[4]);
-}
-
-function lose() {
- update(locations[5]);
-}
-
-function winGame() {
- update(locations[6]);
-}
-
-function restart() {
- xp = 0;
- health = 100;
- gold = 50;
- currentWeapon = 0;
- inventory = ["stick"];
- goldText.innerText = gold;
- healthText.innerText = health;
- xpText.innerText = xp;
- goTown();
-}
diff --git a/basic-javascript-role-playing-game/index770.js b/basic-javascript-role-playing-game/index770.js
deleted file mode 100644
index 7abef94e0..000000000
--- a/basic-javascript-role-playing-game/index770.js
+++ /dev/null
@@ -1,255 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- },
- {
- name: "kill monster",
- "button text": ["Go to town square", "Go to town square", "Go to town square"],
- "button functions": [goTown, goTown, goTown],
- text: 'The monster screams "Arg!" as it dies. You gain experience points and find gold.'
- },
- {
- name: "lose",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You die. ☠️"
- },
- {
- name: "win",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You defeat the dragon! YOU WIN THE GAME! 🎉"
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- monsterStats.style.display = "none";
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= getMonsterAttackValue(monsters[fighting].level);
- monsterHealth -= weapons[currentWeapon].power + Math.floor(Math.random() * xp) + 1;
- healthText.innerText = health;
- monsterHealthText.innerText = monsterHealth;
- if (health <= 0) {
- lose();
- } else if (monsterHealth <= 0) {
- fighting === 2 ? winGame() : defeatMonster();
- }
-}
-
-/* Now return `hit` from the `getMonsterAttackValue` function. The return value of this function is used in the `attack` function. Here is an example of a function that returns a value:
-```
-function plusThree(num) {
- let numPlusThree = num + 3;
- return numPlusThree;
-}
-var answer = plusThree(5); // 8
-```
-*/
-
-function getMonsterAttackValue(level) {
- let hit = (level * 5) - (Math.floor(Math.random() * xp));
- console.log(hit);
-}
-
-function dodge() {
- text.innerText = "You dodge the attack from the " + monsters[fighting].name + ".";
-}
-
-function defeatMonster() {
- gold += Math.floor(monsters[fighting].level * 6.7);
- xp += monsters[fighting].level;
- goldText.innerText = gold;
- xpText.innerText = xp;
- update(locations[4]);
-}
-
-function lose() {
- update(locations[5]);
-}
-
-function winGame() {
- update(locations[6]);
-}
-
-function restart() {
- xp = 0;
- health = 100;
- gold = 50;
- currentWeapon = 0;
- inventory = ["stick"];
- goldText.innerText = gold;
- healthText.innerText = health;
- xpText.innerText = xp;
- goTown();
-}
diff --git a/basic-javascript-role-playing-game/index775.js b/basic-javascript-role-playing-game/index775.js
deleted file mode 100644
index f83f6dafc..000000000
--- a/basic-javascript-role-playing-game/index775.js
+++ /dev/null
@@ -1,254 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- },
- {
- name: "kill monster",
- "button text": ["Go to town square", "Go to town square", "Go to town square"],
- "button functions": [goTown, goTown, goTown],
- text: 'The monster screams "Arg!" as it dies. You gain experience points and find gold.'
- },
- {
- name: "lose",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You die. ☠️"
- },
- {
- name: "win",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You defeat the dragon! YOU WIN THE GAME! 🎉"
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- monsterStats.style.display = "none";
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-/* In the `attack` function after the line `health -= getMonsterAttackValue(monsters[fighting].level);`, create an empty if-else expression. For the condition, put the function call `isMonsterHit()`. Here is an example of an empty if-else expression with a function call as the condition:
-```
-if (isTrue()) {
-} else {
-}
-```
-*/
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= getMonsterAttackValue(monsters[fighting].level);
- monsterHealth -= weapons[currentWeapon].power + Math.floor(Math.random() * xp) + 1;
- healthText.innerText = health;
- monsterHealthText.innerText = monsterHealth;
- if (health <= 0) {
- lose();
- } else if (monsterHealth <= 0) {
- fighting === 2 ? winGame() : defeatMonster();
- }
-}
-
-function getMonsterAttackValue(level) {
- let hit = (level * 5) - (Math.floor(Math.random() * xp));
- console.log(hit);
- return hit;
-}
-
-function dodge() {
- text.innerText = "You dodge the attack from the " + monsters[fighting].name + ".";
-}
-
-function defeatMonster() {
- gold += Math.floor(monsters[fighting].level * 6.7);
- xp += monsters[fighting].level;
- goldText.innerText = gold;
- xpText.innerText = xp;
- update(locations[4]);
-}
-
-function lose() {
- update(locations[5]);
-}
-
-function winGame() {
- update(locations[6]);
-}
-
-function restart() {
- xp = 0;
- health = 100;
- gold = 50;
- currentWeapon = 0;
- inventory = ["stick"];
- goldText.innerText = gold;
- healthText.innerText = health;
- xpText.innerText = xp;
- goTown();
-}
diff --git a/basic-javascript-role-playing-game/index780.js b/basic-javascript-role-playing-game/index780.js
deleted file mode 100644
index 878689178..000000000
--- a/basic-javascript-role-playing-game/index780.js
+++ /dev/null
@@ -1,254 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- },
- {
- name: "kill monster",
- "button text": ["Go to town square", "Go to town square", "Go to town square"],
- "button functions": [goTown, goTown, goTown],
- text: 'The monster screams "Arg!" as it dies. You gain experience points and find gold.'
- },
- {
- name: "lose",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You die. ☠️"
- },
- {
- name: "win",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You defeat the dragon! YOU WIN THE GAME! 🎉"
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- monsterStats.style.display = "none";
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-/* In the `attack` function, move the line `monsterHealth -= weapons[currentWeapon].power + Math.floor(Math.random() * xp) + 1;` into an `if` expression. For the condition, put the function call `isMonsterHit()`. Here is an example of an `if` expression with a function call as the condition:
-```
-if (isTrue()) {
- console.log("It's true!");
-}
-```
-*/
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= getMonsterAttackValue(monsters[fighting].level);
- monsterHealth -= weapons[currentWeapon].power + Math.floor(Math.random() * xp) + 1;
- healthText.innerText = health;
- monsterHealthText.innerText = monsterHealth;
- if (health <= 0) {
- lose();
- } else if (monsterHealth <= 0) {
- fighting === 2 ? winGame() : defeatMonster();
- }
-}
-
-function getMonsterAttackValue(level) {
- let hit = (level * 5) - (Math.floor(Math.random() * xp));
- console.log(hit);
- return hit;
-}
-
-function dodge() {
- text.innerText = "You dodge the attack from the " + monsters[fighting].name + ".";
-}
-
-function defeatMonster() {
- gold += Math.floor(monsters[fighting].level * 6.7);
- xp += monsters[fighting].level;
- goldText.innerText = gold;
- xpText.innerText = xp;
- update(locations[4]);
-}
-
-function lose() {
- update(locations[5]);
-}
-
-function winGame() {
- update(locations[6]);
-}
-
-function restart() {
- xp = 0;
- health = 100;
- gold = 50;
- currentWeapon = 0;
- inventory = ["stick"];
- goldText.innerText = gold;
- healthText.innerText = health;
- xpText.innerText = xp;
- goTown();
-}
diff --git a/basic-javascript-role-playing-game/index785.js b/basic-javascript-role-playing-game/index785.js
deleted file mode 100644
index 0540a2b2b..000000000
--- a/basic-javascript-role-playing-game/index785.js
+++ /dev/null
@@ -1,252 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- },
- {
- name: "kill monster",
- "button text": ["Go to town square", "Go to town square", "Go to town square"],
- "button functions": [goTown, goTown, goTown],
- text: 'The monster screams "Arg!" as it dies. You gain experience points and find gold.'
- },
- {
- name: "lose",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You die. ☠️"
- },
- {
- name: "win",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You defeat the dragon! YOU WIN THE GAME! 🎉"
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- monsterStats.style.display = "none";
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-/* Add an `else` expression to the `if` expression. Use the `+=` operator to add the text " You miss." onto the end of `text.innerText`.
-*/
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= getMonsterAttackValue(monsters[fighting].level);
-
- if (isMonsterHit()) {
- monsterHealth -= weapons[currentWeapon].power + Math.floor(Math.random() * xp) + 1;
- }
- healthText.innerText = health;
- monsterHealthText.innerText = monsterHealth;
- if (health <= 0) {
- lose();
- } else if (monsterHealth <= 0) {
- fighting === 2 ? winGame() : defeatMonster();
- }
-}
-
-function getMonsterAttackValue(level) {
- let hit = (level * 5) - (Math.floor(Math.random() * xp));
- console.log(hit);
- return hit;
-}
-
-function dodge() {
- text.innerText = "You dodge the attack from the " + monsters[fighting].name + ".";
-}
-
-function defeatMonster() {
- gold += Math.floor(monsters[fighting].level * 6.7);
- xp += monsters[fighting].level;
- goldText.innerText = gold;
- xpText.innerText = xp;
- update(locations[4]);
-}
-
-function lose() {
- update(locations[5]);
-}
-
-function winGame() {
- update(locations[6]);
-}
-
-function restart() {
- xp = 0;
- health = 100;
- gold = 50;
- currentWeapon = 0;
- inventory = ["stick"];
- goldText.innerText = gold;
- healthText.innerText = health;
- xpText.innerText = xp;
- goTown();
-}
diff --git a/basic-javascript-role-playing-game/index790.js b/basic-javascript-role-playing-game/index790.js
deleted file mode 100644
index a469737c7..000000000
--- a/basic-javascript-role-playing-game/index790.js
+++ /dev/null
@@ -1,259 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- },
- {
- name: "kill monster",
- "button text": ["Go to town square", "Go to town square", "Go to town square"],
- "button functions": [goTown, goTown, goTown],
- text: 'The monster screams "Arg!" as it dies. You gain experience points and find gold.'
- },
- {
- name: "lose",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You die. ☠️"
- },
- {
- name: "win",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You defeat the dragon! YOU WIN THE GAME! 🎉"
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- monsterStats.style.display = "none";
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= getMonsterAttackValue(monsters[fighting].level);
-
- if (isMonsterHit()) {
- monsterHealth -= weapons[currentWeapon].power + Math.floor(Math.random() * xp) + 1;
- } else {
- text.innerText += " You miss.";
- }
- healthText.innerText = health;
- monsterHealthText.innerText = monsterHealth;
- if (health <= 0) {
- lose();
- } else if (monsterHealth <= 0) {
- fighting === 2 ? winGame() : defeatMonster();
- }
-}
-
-function getMonsterAttackValue(level) {
- let hit = (level * 5) - (Math.floor(Math.random() * xp));
- console.log(hit);
- return hit;
-}
-
-/* Now create the `isMonsterHit` function. It will return a boolean to be used in the `if` expression. Return the result of the comparison `Math.random() > .2`. Here is a function that returns the result of a comparison:
-```
-function flipHeads() {
- return Math.random() > .5;
-}
-```
-*/
-
-function dodge() {
- text.innerText = "You dodge the attack from the " + monsters[fighting].name + ".";
-}
-
-function defeatMonster() {
- gold += Math.floor(monsters[fighting].level * 6.7);
- xp += monsters[fighting].level;
- goldText.innerText = gold;
- xpText.innerText = xp;
- update(locations[4]);
-}
-
-function lose() {
- update(locations[5]);
-}
-
-function winGame() {
- update(locations[6]);
-}
-
-function restart() {
- xp = 0;
- health = 100;
- gold = 50;
- currentWeapon = 0;
- inventory = ["stick"];
- goldText.innerText = gold;
- healthText.innerText = health;
- xpText.innerText = xp;
- goTown();
-}
diff --git a/basic-javascript-role-playing-game/index795.js b/basic-javascript-role-playing-game/index795.js
deleted file mode 100644
index 2168ca012..000000000
--- a/basic-javascript-role-playing-game/index795.js
+++ /dev/null
@@ -1,258 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- },
- {
- name: "kill monster",
- "button text": ["Go to town square", "Go to town square", "Go to town square"],
- "button functions": [goTown, goTown, goTown],
- text: 'The monster screams "Arg!" as it dies. You gain experience points and find gold.'
- },
- {
- name: "lose",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You die. ☠️"
- },
- {
- name: "win",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You defeat the dragon! YOU WIN THE GAME! 🎉"
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- monsterStats.style.display = "none";
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= getMonsterAttackValue(monsters[fighting].level);
-
- if (isMonsterHit()) {
- monsterHealth -= weapons[currentWeapon].power + Math.floor(Math.random() * xp) + 1;
- } else {
- text.innerText += " You miss.";
- }
- healthText.innerText = health;
- monsterHealthText.innerText = monsterHealth;
- if (health <= 0) {
- lose();
- } else if (monsterHealth <= 0) {
- fighting === 2 ? winGame() : defeatMonster();
- }
-}
-
-function getMonsterAttackValue(level) {
- let hit = (level * 5) - (Math.floor(Math.random() * xp));
- console.log(hit);
- return hit;
-}
-
-/* The player should hit if either `Math.random() > .2` OR if the player's health is less than 20. At the end of the return statement, add the "logical or" operator (`||`) and then check if `health` is less than 20. Here is an example that returns true if either a number is less than 10 or more than 20: `num < 10 || num > 20`.
-*/
-
-function isMonsterHit() {
- return Math.random() > .2;
-}
-
-function dodge() {
- text.innerText = "You dodge the attack from the " + monsters[fighting].name + ".";
-}
-
-function defeatMonster() {
- gold += Math.floor(monsters[fighting].level * 6.7);
- xp += monsters[fighting].level;
- goldText.innerText = gold;
- xpText.innerText = xp;
- update(locations[4]);
-}
-
-function lose() {
- update(locations[5]);
-}
-
-function winGame() {
- update(locations[6]);
-}
-
-function restart() {
- xp = 0;
- health = 100;
- gold = 50;
- currentWeapon = 0;
- inventory = ["stick"];
- goldText.innerText = gold;
- healthText.innerText = health;
- xpText.innerText = xp;
- goTown();
-}
diff --git a/basic-javascript-role-playing-game/index800.js b/basic-javascript-role-playing-game/index800.js
deleted file mode 100644
index 5f0acc2de..000000000
--- a/basic-javascript-role-playing-game/index800.js
+++ /dev/null
@@ -1,258 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- },
- {
- name: "kill monster",
- "button text": ["Go to town square", "Go to town square", "Go to town square"],
- "button functions": [goTown, goTown, goTown],
- text: 'The monster screams "Arg!" as it dies. You gain experience points and find gold.'
- },
- {
- name: "lose",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You die. ☠️"
- },
- {
- name: "win",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You defeat the dragon! YOU WIN THE GAME! 🎉"
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- monsterStats.style.display = "none";
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-/* On every attack, there should be a small chance that the player's weapon breaks. At the end of the `attack` function, add an `if` expression with the condition `Math.random() <= .1`.
-*/
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= getMonsterAttackValue(monsters[fighting].level);
-
- if (isMonsterHit()) {
- monsterHealth -= weapons[currentWeapon].power + Math.floor(Math.random() * xp) + 1;
- } else {
- text.innerText += " You miss.";
- }
- healthText.innerText = health;
- monsterHealthText.innerText = monsterHealth;
- if (health <= 0) {
- lose();
- } else if (monsterHealth <= 0) {
- fighting === 2 ? winGame() : defeatMonster();
- }
-}
-
-function getMonsterAttackValue(level) {
- let hit = (level * 5) - (Math.floor(Math.random() * xp));
- console.log(hit);
- return hit;
-}
-
-function isMonsterHit() {
- return Math.random() > .2 || health < 20;
-}
-
-function dodge() {
- text.innerText = "You dodge the attack from the " + monsters[fighting].name + ".";
-}
-
-function defeatMonster() {
- gold += Math.floor(monsters[fighting].level * 6.7);
- xp += monsters[fighting].level;
- goldText.innerText = gold;
- xpText.innerText = xp;
- update(locations[4]);
-}
-
-function lose() {
- update(locations[5]);
-}
-
-function winGame() {
- update(locations[6]);
-}
-
-function restart() {
- xp = 0;
- health = 100;
- gold = 50;
- currentWeapon = 0;
- inventory = ["stick"];
- goldText.innerText = gold;
- healthText.innerText = health;
- xpText.innerText = xp;
- goTown();
-}
diff --git a/basic-javascript-role-playing-game/index805.js b/basic-javascript-role-playing-game/index805.js
deleted file mode 100644
index 103219154..000000000
--- a/basic-javascript-role-playing-game/index805.js
+++ /dev/null
@@ -1,265 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- },
- {
- name: "kill monster",
- "button text": ["Go to town square", "Go to town square", "Go to town square"],
- "button functions": [goTown, goTown, goTown],
- text: 'The monster screams "Arg!" as it dies. You gain experience points and find gold.'
- },
- {
- name: "lose",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You die. ☠️"
- },
- {
- name: "win",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You defeat the dragon! YOU WIN THE GAME! 🎉"
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- monsterStats.style.display = "none";
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-/* Use the `+=` operator to add "Your [first item in inventory array] breaks." to the end of `text.innerText`. Instead of the bracketed text, it should show the actual item name. Use `inventory.pop()` to both remove the last element from the array AND return that element. Example:
-```
-let shoppingList = ["milk", "apples", "cereal"];
-console.log("I bought " + shoppingList.pop() + "."); // Logs "I bought cereal."
-// shoppingList now equals ["milk", "apples"]
-*/
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= getMonsterAttackValue(monsters[fighting].level);
-
- if (isMonsterHit()) {
- monsterHealth -= weapons[currentWeapon].power + Math.floor(Math.random() * xp) + 1;
- } else {
- text.innerText += " You miss.";
- }
- healthText.innerText = health;
- monsterHealthText.innerText = monsterHealth;
- if (health <= 0) {
- lose();
- } else if (monsterHealth <= 0) {
- fighting === 2 ? winGame() : defeatMonster();
- }
-
- if (Math.random() <= .1) {
- }
-}
-
-function getMonsterAttackValue(level) {
- let hit = (level * 5) - (Math.floor(Math.random() * xp));
- console.log(hit);
- return hit;
-}
-
-function isMonsterHit() {
- return Math.random() > .2 || health < 20;
-}
-
-function dodge() {
- text.innerText = "You dodge the attack from the " + monsters[fighting].name + ".";
-}
-
-function defeatMonster() {
- gold += Math.floor(monsters[fighting].level * 6.7);
- xp += monsters[fighting].level;
- goldText.innerText = gold;
- xpText.innerText = xp;
- update(locations[4]);
-}
-
-function lose() {
- update(locations[5]);
-}
-
-function winGame() {
- update(locations[6]);
-}
-
-function restart() {
- xp = 0;
- health = 100;
- gold = 50;
- currentWeapon = 0;
- inventory = ["stick"];
- goldText.innerText = gold;
- healthText.innerText = health;
- xpText.innerText = xp;
- goTown();
-}
diff --git a/basic-javascript-role-playing-game/index810.js b/basic-javascript-role-playing-game/index810.js
deleted file mode 100644
index c51a23f5b..000000000
--- a/basic-javascript-role-playing-game/index810.js
+++ /dev/null
@@ -1,262 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- },
- {
- name: "kill monster",
- "button text": ["Go to town square", "Go to town square", "Go to town square"],
- "button functions": [goTown, goTown, goTown],
- text: 'The monster screams "Arg!" as it dies. You gain experience points and find gold.'
- },
- {
- name: "lose",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You die. ☠️"
- },
- {
- name: "win",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You defeat the dragon! YOU WIN THE GAME! 🎉"
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- monsterStats.style.display = "none";
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-/* Decrement the value of `currentWeapon` using `--`. For example, say `num` equals 5. After running `num--`, `num` now equals 4.
-*/
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= getMonsterAttackValue(monsters[fighting].level);
-
- if (isMonsterHit()) {
- monsterHealth -= weapons[currentWeapon].power + Math.floor(Math.random() * xp) + 1;
- } else {
- text.innerText += " You miss.";
- }
- healthText.innerText = health;
- monsterHealthText.innerText = monsterHealth;
- if (health <= 0) {
- lose();
- } else if (monsterHealth <= 0) {
- fighting === 2 ? winGame() : defeatMonster();
- }
-
- if (Math.random() <= .1) {
- text.innerText += " Your " + inventory.pop() + " breaks.";
- }
-}
-
-function getMonsterAttackValue(level) {
- let hit = (level * 5) - (Math.floor(Math.random() * xp));
- console.log(hit);
- return hit;
-}
-
-function isMonsterHit() {
- return Math.random() > .2 || health < 20;
-}
-
-function dodge() {
- text.innerText = "You dodge the attack from the " + monsters[fighting].name + ".";
-}
-
-function defeatMonster() {
- gold += Math.floor(monsters[fighting].level * 6.7);
- xp += monsters[fighting].level;
- goldText.innerText = gold;
- xpText.innerText = xp;
- update(locations[4]);
-}
-
-function lose() {
- update(locations[5]);
-}
-
-function winGame() {
- update(locations[6]);
-}
-
-function restart() {
- xp = 0;
- health = 100;
- gold = 50;
- currentWeapon = 0;
- inventory = ["stick"];
- goldText.innerText = gold;
- healthText.innerText = health;
- xpText.innerText = xp;
- goTown();
-}
diff --git a/basic-javascript-role-playing-game/index815.js b/basic-javascript-role-playing-game/index815.js
deleted file mode 100644
index 6b15722ab..000000000
--- a/basic-javascript-role-playing-game/index815.js
+++ /dev/null
@@ -1,267 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- },
- {
- name: "kill monster",
- "button text": ["Go to town square", "Go to town square", "Go to town square"],
- "button functions": [goTown, goTown, goTown],
- text: 'The monster screams "Arg!" as it dies. You gain experience points and find gold.'
- },
- {
- name: "lose",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You die. ☠️"
- },
- {
- name: "win",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You defeat the dragon! YOU WIN THE GAME! 🎉"
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- monsterStats.style.display = "none";
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-/* We don't want a player's only weapon to break. Use the "logical and" operator (`&&`) to add a second condition to the `if` expression you just wrote. A player's weapon should only be able to break if `inventory.length` does not equal (`!==`) one. Here is an example of an `if` expression with the conditions that `firstName` equals "Quincy" AND `lastName` does NOT equal "Larson". With `&&`, both conditions must be true or else the entire statement evaluates to false.
-```
-if (firstName === "Quincy" && lastName !== "Larson") {
- console.log("Cool name but not the creator of freeCodeCamp.org.")
-}
-*/
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= getMonsterAttackValue(monsters[fighting].level);
-
- if (isMonsterHit()) {
- monsterHealth -= weapons[currentWeapon].power + Math.floor(Math.random() * xp) + 1;
- } else {
- text.innerText += " You miss.";
- }
- healthText.innerText = health;
- monsterHealthText.innerText = monsterHealth;
- if (health <= 0) {
- lose();
- } else if (monsterHealth <= 0) {
- fighting === 2 ? winGame() : defeatMonster();
- }
-
- if (Math.random() <= .1) {
- text.innerText += " Your " + inventory.pop() + " breaks.";
- currentWeapon--;
- }
-}
-
-function getMonsterAttackValue(level) {
- let hit = (level * 5) - (Math.floor(Math.random() * xp));
- console.log(hit);
- return hit;
-}
-
-function isMonsterHit() {
- return Math.random() > .2 || health < 20;
-}
-
-function dodge() {
- text.innerText = "You dodge the attack from the " + monsters[fighting].name + ".";
-}
-
-function defeatMonster() {
- gold += Math.floor(monsters[fighting].level * 6.7);
- xp += monsters[fighting].level;
- goldText.innerText = gold;
- xpText.innerText = xp;
- update(locations[4]);
-}
-
-function lose() {
- update(locations[5]);
-}
-
-function winGame() {
- update(locations[6]);
-}
-
-function restart() {
- xp = 0;
- health = 100;
- gold = 50;
- currentWeapon = 0;
- inventory = ["stick"];
- goldText.innerText = gold;
- healthText.innerText = health;
- xpText.innerText = xp;
- goTown();
-}
diff --git a/basic-javascript-role-playing-game/index820.js b/basic-javascript-role-playing-game/index820.js
deleted file mode 100644
index 3b13dd81a..000000000
--- a/basic-javascript-role-playing-game/index820.js
+++ /dev/null
@@ -1,263 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- },
- {
- name: "kill monster",
- "button text": ["Go to town square", "Go to town square", "Go to town square"],
- "button functions": [goTown, goTown, goTown],
- text: 'The monster screams "Arg!" as it dies. You gain experience points and find gold.'
- },
- {
- name: "lose",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You die. ☠️"
- },
- {
- name: "win",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You defeat the dragon! YOU WIN THE GAME! 🎉"
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- monsterStats.style.display = "none";
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= getMonsterAttackValue(monsters[fighting].level);
-
- if (isMonsterHit()) {
- monsterHealth -= weapons[currentWeapon].power + Math.floor(Math.random() * xp) + 1;
- } else {
- text.innerText += " You miss.";
- }
- healthText.innerText = health;
- monsterHealthText.innerText = monsterHealth;
- if (health <= 0) {
- lose();
- } else if (monsterHealth <= 0) {
- fighting === 2 ? winGame() : defeatMonster();
- }
-
- if (Math.random() <= .1 && inventory.length !== 1) {
- text.innerText += " Your " + inventory.pop() + " breaks.";
- currentWeapon--;
- }
-}
-
-function getMonsterAttackValue(level) {
- let hit = (level * 5) - (Math.floor(Math.random() * xp));
- console.log(hit);
- return hit;
-}
-
-function isMonsterHit() {
- return Math.random() > .2 || health < 20;
-}
-
-function dodge() {
- text.innerText = "You dodge the attack from the " + monsters[fighting].name + ".";
-}
-
-function defeatMonster() {
- gold += Math.floor(monsters[fighting].level * 6.7);
- xp += monsters[fighting].level;
- goldText.innerText = gold;
- xpText.innerText = xp;
- update(locations[4]);
-}
-
-function lose() {
- update(locations[5]);
-}
-
-function winGame() {
- update(locations[6]);
-}
-
-function restart() {
- xp = 0;
- health = 100;
- gold = 50;
- currentWeapon = 0;
- inventory = ["stick"];
- goldText.innerText = gold;
- healthText.innerText = health;
- xpText.innerText = xp;
- goTown();
-}
-
-/* The only thing left to add is a mini-game easter egg (a hidden feature). Add a new function called `easterEgg` that calls the `update` function and passes in `locations[7]` as an argument.
-*/
\ No newline at end of file
diff --git a/basic-javascript-role-playing-game/index825.js b/basic-javascript-role-playing-game/index825.js
deleted file mode 100644
index 407475a36..000000000
--- a/basic-javascript-role-playing-game/index825.js
+++ /dev/null
@@ -1,267 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-/* Add a new object to the `locations` array. Set `name` to "easter egg". Set `"button text"` to `["2", "8", "Go to town square?"]`. Set `"button functions"` to `[pickTwo, pickEight, goTown]`. Set `text` to "You find a secret game. Pick a number above. Ten numbers will be randomly chosen between 0 and 10. If the number you choose matches one of the random numbers, you win!"
-*/
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- },
- {
- name: "kill monster",
- "button text": ["Go to town square", "Go to town square", "Go to town square"],
- "button functions": [goTown, goTown, goTown],
- text: 'The monster screams "Arg!" as it dies. You gain experience points and find gold.'
- },
- {
- name: "lose",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You die. ☠️"
- },
- {
- name: "win",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You defeat the dragon! YOU WIN THE GAME! 🎉"
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- monsterStats.style.display = "none";
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= getMonsterAttackValue(monsters[fighting].level);
-
- if (isMonsterHit()) {
- monsterHealth -= weapons[currentWeapon].power + Math.floor(Math.random() * xp) + 1;
- } else {
- text.innerText += " You miss.";
- }
- healthText.innerText = health;
- monsterHealthText.innerText = monsterHealth;
- if (health <= 0) {
- lose();
- } else if (monsterHealth <= 0) {
- fighting === 2 ? winGame() : defeatMonster();
- }
-
- if (Math.random() <= .1 && inventory.length !== 1) {
- text.innerText += " Your " + inventory.pop() + " breaks.";
- currentWeapon--;
- }
-}
-
-function getMonsterAttackValue(level) {
- let hit = (level * 5) - (Math.floor(Math.random() * xp));
- console.log(hit);
- return hit;
-}
-
-function isMonsterHit() {
- return Math.random() > .2 || health < 20;
-}
-
-function dodge() {
- text.innerText = "You dodge the attack from the " + monsters[fighting].name + ".";
-}
-
-function defeatMonster() {
- gold += Math.floor(monsters[fighting].level * 6.7);
- xp += monsters[fighting].level;
- goldText.innerText = gold;
- xpText.innerText = xp;
- update(locations[4]);
-}
-
-function lose() {
- update(locations[5]);
-}
-
-function winGame() {
- update(locations[6]);
-}
-
-function restart() {
- xp = 0;
- health = 100;
- gold = 50;
- currentWeapon = 0;
- inventory = ["stick"];
- goldText.innerText = gold;
- healthText.innerText = health;
- xpText.innerText = xp;
- goTown();
-}
-
-function easterEgg() {
- update(locations[7]);
-}
diff --git a/basic-javascript-role-playing-game/index830.js b/basic-javascript-role-playing-game/index830.js
deleted file mode 100644
index 9f725c21d..000000000
--- a/basic-javascript-role-playing-game/index830.js
+++ /dev/null
@@ -1,273 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- },
- {
- name: "kill monster",
- "button text": ["Go to town square", "Go to town square", "Go to town square"],
- "button functions": [goTown, goTown, goTown],
- text: 'The monster screams "Arg!" as it dies. You gain experience points and find gold.'
- },
- {
- name: "lose",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You die. ☠️"
- },
- {
- name: "win",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You defeat the dragon! YOU WIN THE GAME! 🎉"
- },
- {
- name: "easter egg",
- "button text": ["2", "8", "Go to town square?"],
- "button functions": [pickTwo, pickEight, goTown],
- text: "You find a secret game. Pick a number above. Ten numbers will be randomly chosen between 0 and 10. If the number you choose matches one of the random numbers, you win!"
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- monsterStats.style.display = "none";
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= getMonsterAttackValue(monsters[fighting].level);
-
- if (isMonsterHit()) {
- monsterHealth -= weapons[currentWeapon].power + Math.floor(Math.random() * xp) + 1;
- } else {
- text.innerText += " You miss.";
- }
- healthText.innerText = health;
- monsterHealthText.innerText = monsterHealth;
- if (health <= 0) {
- lose();
- } else if (monsterHealth <= 0) {
- fighting === 2 ? winGame() : defeatMonster();
- }
-
- if (Math.random() <= .1 && inventory.length !== 1) {
- text.innerText += " Your " + inventory.pop() + " breaks.";
- currentWeapon--;
- }
-}
-
-function getMonsterAttackValue(level) {
- let hit = (level * 5) - (Math.floor(Math.random() * xp));
- console.log(hit);
- return hit;
-}
-
-function isMonsterHit() {
- return Math.random() > .2 || health < 20;
-}
-
-function dodge() {
- text.innerText = "You dodge the attack from the " + monsters[fighting].name + ".";
-}
-
-function defeatMonster() {
- gold += Math.floor(monsters[fighting].level * 6.7);
- xp += monsters[fighting].level;
- goldText.innerText = gold;
- xpText.innerText = xp;
- update(locations[4]);
-}
-
-function lose() {
- update(locations[5]);
-}
-
-function winGame() {
- update(locations[6]);
-}
-
-function restart() {
- xp = 0;
- health = 100;
- gold = 50;
- currentWeapon = 0;
- inventory = ["stick"];
- goldText.innerText = gold;
- healthText.innerText = health;
- xpText.innerText = xp;
- goTown();
-}
-
-function easterEgg() {
- update(locations[7]);
-}
-
-/* At the end of the code, add two new functions named `pickTwo` and `pickEight`. Inside each function call the `pick()` function. Pass either "2" or "8" into the `pick` function depending on the function name.
-*/
\ No newline at end of file
diff --git a/basic-javascript-role-playing-game/index835.js b/basic-javascript-role-playing-game/index835.js
deleted file mode 100644
index 4f54a7e2d..000000000
--- a/basic-javascript-role-playing-game/index835.js
+++ /dev/null
@@ -1,282 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- },
- {
- name: "kill monster",
- "button text": ["Go to town square", "Go to town square", "Go to town square"],
- "button functions": [goTown, goTown, goTown],
- text: 'The monster screams "Arg!" as it dies. You gain experience points and find gold.'
- },
- {
- name: "lose",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You die. ☠️"
- },
- {
- name: "win",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You defeat the dragon! YOU WIN THE GAME! 🎉"
- },
- {
- name: "easter egg",
- "button text": ["2", "8", "Go to town square?"],
- "button functions": [pickTwo, pickEight, goTown],
- text: "You find a secret game. Pick a number above. Ten numbers will be randomly chosen between 0 and 10. If the number you choose matches one of the random numbers, you win!"
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- monsterStats.style.display = "none";
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health.";
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon.";
- }
- } else {
- text.innerText = "You already have the most powerful weapon!";
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= getMonsterAttackValue(monsters[fighting].level);
-
- if (isMonsterHit()) {
- monsterHealth -= weapons[currentWeapon].power + Math.floor(Math.random() * xp) + 1;
- } else {
- text.innerText += " You miss.";
- }
- healthText.innerText = health;
- monsterHealthText.innerText = monsterHealth;
- if (health <= 0) {
- lose();
- } else if (monsterHealth <= 0) {
- fighting === 2 ? winGame() : defeatMonster();
- }
-
- if (Math.random() <= .1 && inventory.length !== 1) {
- text.innerText += " Your " + inventory.pop() + " breaks.";
- currentWeapon--;
- }
-}
-
-function getMonsterAttackValue(level) {
- let hit = (level * 5) - (Math.floor(Math.random() * xp));
- console.log(hit);
- return hit;
-}
-
-function isMonsterHit() {
- return Math.random() > .2 || health < 20;
-}
-
-function dodge() {
- text.innerText = "You dodge the attack from the " + monsters[fighting].name + ".";
-}
-
-function defeatMonster() {
- gold += Math.floor(monsters[fighting].level * 6.7);
- xp += monsters[fighting].level;
- goldText.innerText = gold;
- xpText.innerText = xp;
- update(locations[4]);
-}
-
-function lose() {
- update(locations[5]);
-}
-
-function winGame() {
- update(locations[6]);
-}
-
-function restart() {
- xp = 0;
- health = 100;
- gold = 50;
- currentWeapon = 0;
- inventory = ["stick"];
- goldText.innerText = gold;
- healthText.innerText = health;
- xpText.innerText = xp;
- goTown();
-}
-
-function easterEgg() {
- update(locations[7]);
-}
-
-function pickTwo() {
- pick(2);
-}
-
-function pickEight() {
- pick(8);
-}
-
-/*
-Add a `pick` function with an argument named "guess".
-*/
\ No newline at end of file
diff --git a/basic-javascript-role-playing-game/index840.js b/basic-javascript-role-playing-game/index840.js
deleted file mode 100644
index 891484352..000000000
--- a/basic-javascript-role-playing-game/index840.js
+++ /dev/null
@@ -1,284 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- },
- {
- name: "kill monster",
- "button text": ["Go to town square", "Go to town square", "Go to town square"],
- "button functions": [goTown, goTown, goTown],
- text: 'The monster screams "Arg!" as it dies. You gain experience points and find gold.'
- },
- {
- name: "lose",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You die. ☠️"
- },
- {
- name: "win",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You defeat the dragon! YOU WIN THE GAME! 🎉"
- },
- {
- name: "easter egg",
- "button text": ["2", "8", "Go to town square?"],
- "button functions": [pickTwo, pickEight, goTown],
- text: "You find a secret game. Pick a number above. Ten numbers will be randomly chosen between 0 and 10. If the number you choose matches one of the random numbers, you win!"
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- monsterStats.style.display = "none";
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health."
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon."
- }
- } else {
- text.innerText = "You already have the most powerful weapon!"
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= getMonsterAttackValue(monsters[fighting].level);
-
- if (isMonsterHit()) {
- monsterHealth -= weapons[currentWeapon].power + Math.floor((Math.random() * (xp - 2) + 1));
- } else {
- text.innerText += " You miss.";
- }
- healthText.innerText = health;
- monsterHealthText.innerText = monsterHealth;
- if (health <= 0) {
- lose();
- } else if (monsterHealth <= 0) {
- fighting === 2 ? winGame() : defeatMonster();
- }
-
- if (Math.random() <= .1 && inventory.length !== 1) {
- text.innerText += " Your " + inventory.pop() + " breaks.";
- currentWeapon--;
- }
-}
-
-function getMonsterAttackValue(level) {
- let hit = (level * 5) - (Math.floor(Math.random() * xp));
- console.log(hit);
- return hit;
-}
-
-function isMonsterHit() {
- return Math.random() > .2 || health < 20;
-}
-
-function dodge() {
- text.innerText = "You dodge the attack from the " + monsters[fighting].name + ".";
-}
-
-function defeatMonster() {
- gold += Math.floor(monsters[fighting].level * 6.7);
- xp += monsters[fighting].level;
- goldText.innerText = gold;
- xpText.innerText = xp;
- update(locations[4]);
-}
-
-function lose() {
- update(locations[5]);
-}
-
-function winGame() {
- update(locations[6]);
-}
-
-function restart() {
- xp = 0;
- health = 100;
- gold = 50;
- currentWeapon = 0;
- inventory = ["stick"];
- goldText.innerText = gold;
- healthText.innerText = health;
- xpText.innerText = xp;
- goTown();
-}
-
-function easterEgg() {
- update(locations[7]);
-}
-
-function pickTwo() {
- pick(2);
-}
-
-function pickEight() {
- pick(8);
-}
-
-function pick(guess) {
-}
-
-/* Inside `pick`, use `let` to initialize a variable named "numbers" and set it to an empty array.
-*/
\ No newline at end of file
diff --git a/basic-javascript-role-playing-game/index845.js b/basic-javascript-role-playing-game/index845.js
deleted file mode 100644
index 17a9c8f9a..000000000
--- a/basic-javascript-role-playing-game/index845.js
+++ /dev/null
@@ -1,294 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- },
- {
- name: "kill monster",
- "button text": ["Go to town square", "Go to town square", "Go to town square"],
- "button functions": [goTown, goTown, goTown],
- text: 'The monster screams "Arg!" as it dies. You gain experience points and find gold.'
- },
- {
- name: "lose",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You die. ☠️"
- },
- {
- name: "win",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You defeat the dragon! YOU WIN THE GAME! 🎉"
- },
- {
- name: "easter egg",
- "button text": ["2", "8", "Go to town square?"],
- "button functions": [pickTwo, pickEight, goTown],
- text: "You find a secret game. Pick a number above. Ten numbers will be randomly chosen between 0 and 10. If the number you choose matches one of the random numbers, you win!"
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- monsterStats.style.display = "none";
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health."
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon."
- }
- } else {
- text.innerText = "You already have the most powerful weapon!"
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= getMonsterAttackValue(monsters[fighting].level);
-
- if (isMonsterHit()) {
- monsterHealth -= weapons[currentWeapon].power + Math.floor((Math.random() * (xp - 2) + 1));
- } else {
- text.innerText += " You miss.";
- }
- healthText.innerText = health;
- monsterHealthText.innerText = monsterHealth;
- if (health <= 0) {
- lose();
- } else if (monsterHealth <= 0) {
- fighting === 2 ? winGame() : defeatMonster();
- }
-
- if (Math.random() <= .1 && inventory.length !== 1) {
- text.innerText += " Your " + inventory.pop() + " breaks.";
- currentWeapon--;
- }
-}
-
-function getMonsterAttackValue(level) {
- let hit = (level * 5) - (Math.floor(Math.random() * xp));
- console.log(hit);
- return hit;
-}
-
-function isMonsterHit() {
- return Math.random() > .2 || health < 20;
-}
-
-function dodge() {
- text.innerText = "You dodge the attack from the " + monsters[fighting].name + ".";
-}
-
-function defeatMonster() {
- gold += Math.floor(monsters[fighting].level * 6.7);
- xp += monsters[fighting].level;
- goldText.innerText = gold;
- xpText.innerText = xp;
- update(locations[4]);
-}
-
-function lose() {
- update(locations[5]);
-}
-
-function winGame() {
- update(locations[6]);
-}
-
-function restart() {
- xp = 0;
- health = 100;
- gold = 50;
- currentWeapon = 0;
- inventory = ["stick"];
- goldText.innerText = gold;
- healthText.innerText = health;
- xpText.innerText = xp;
- goTown();
-}
-
-function easterEgg() {
- update(locations[7]);
-}
-
-function pickTwo() {
- pick(2);
-}
-
-function pickEight() {
- pick(8);
-}
-
-function pick(guess) {
- let numbers = [];
-}
-
-/* Inside `guess`, create a `while` loop to run the same code multiple times. The code inside the `while` loop should keep repeating while `numbers.length` is less than 10 and stop once that condition is no longer true. Here is an example of a while loop that repeats code inside the loop while `i` is less than five.
-```
-let ourArray = [];
-let i = 0;
-while(i < 5) {
- ourArray.push(i);
- i++;
-}
-// ourArray now equals [0,1,2,3,4]
-```
-*/
\ No newline at end of file
diff --git a/basic-javascript-role-playing-game/index850.js b/basic-javascript-role-playing-game/index850.js
deleted file mode 100644
index 45a4726c1..000000000
--- a/basic-javascript-role-playing-game/index850.js
+++ /dev/null
@@ -1,288 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- },
- {
- name: "kill monster",
- "button text": ["Go to town square", "Go to town square", "Go to town square"],
- "button functions": [goTown, goTown, goTown],
- text: 'The monster screams "Arg!" as it dies. You gain experience points and find gold.'
- },
- {
- name: "lose",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You die. ☠️"
- },
- {
- name: "win",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You defeat the dragon! YOU WIN THE GAME! 🎉"
- },
- {
- name: "easter egg",
- "button text": ["2", "8", "Go to town square?"],
- "button functions": [pickTwo, pickEight, goTown],
- text: "You find a secret game. Pick a number above. Ten numbers will be randomly chosen between 0 and 10. If the number you choose matches one of the random numbers, you win!"
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- monsterStats.style.display = "none";
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health."
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon."
- }
- } else {
- text.innerText = "You already have the most powerful weapon!"
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= getMonsterAttackValue(monsters[fighting].level);
-
- if (isMonsterHit()) {
- monsterHealth -= weapons[currentWeapon].power + Math.floor((Math.random() * (xp - 2) + 1));
- } else {
- text.innerText += " You miss.";
- }
- healthText.innerText = health;
- monsterHealthText.innerText = monsterHealth;
- if (health <= 0) {
- lose();
- } else if (monsterHealth <= 0) {
- fighting === 2 ? winGame() : defeatMonster();
- }
-
- if (Math.random() <= .1 && inventory.length !== 1) {
- text.innerText += " Your " + inventory.pop() + " breaks.";
- currentWeapon--;
- }
-}
-
-function getMonsterAttackValue(level) {
- let hit = (level * 5) - (Math.floor(Math.random() * xp));
- console.log(hit);
- return hit;
-}
-
-function isMonsterHit() {
- return Math.random() > .2 || health < 20;
-}
-
-function dodge() {
- text.innerText = "You dodge the attack from the " + monsters[fighting].name + ".";
-}
-
-function defeatMonster() {
- gold += Math.floor(monsters[fighting].level * 6.7);
- xp += monsters[fighting].level;
- goldText.innerText = gold;
- xpText.innerText = xp;
- update(locations[4]);
-}
-
-function lose() {
- update(locations[5]);
-}
-
-function winGame() {
- update(locations[6]);
-}
-
-function restart() {
- xp = 0;
- health = 100;
- gold = 50;
- currentWeapon = 0;
- inventory = ["stick"];
- goldText.innerText = gold;
- healthText.innerText = health;
- xpText.innerText = xp;
- goTown();
-}
-
-function easterEgg() {
- update(locations[7]);
-}
-
-function pickTwo() {
- pick(2);
-}
-
-function pickEight() {
- pick(8);
-}
-
-function pick(guess) {
- let numbers = [];
- while(numbers.length < 10) {
-
- }
-}
-
-/* Inside the while loop, push a random number between 0 and 10 onto the end of the `numbers` array. Get the random number with `Math.floor(Math.random() * 11)`.
-*/
\ No newline at end of file
diff --git a/basic-javascript-role-playing-game/index855.js b/basic-javascript-role-playing-game/index855.js
deleted file mode 100644
index c7854ec99..000000000
--- a/basic-javascript-role-playing-game/index855.js
+++ /dev/null
@@ -1,288 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- },
- {
- name: "kill monster",
- "button text": ["Go to town square", "Go to town square", "Go to town square"],
- "button functions": [goTown, goTown, goTown],
- text: 'The monster screams "Arg!" as it dies. You gain experience points and find gold.'
- },
- {
- name: "lose",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You die. ☠️"
- },
- {
- name: "win",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You defeat the dragon! YOU WIN THE GAME! 🎉"
- },
- {
- name: "easter egg",
- "button text": ["2", "8", "Go to town square?"],
- "button functions": [pickTwo, pickEight, goTown],
- text: "You find a secret game. Pick a number above. Ten numbers will be randomly chosen between 0 and 10. If the number you choose matches one of the random numbers, you win!"
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- monsterStats.style.display = "none";
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health."
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon."
- }
- } else {
- text.innerText = "You already have the most powerful weapon!"
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= getMonsterAttackValue(monsters[fighting].level);
-
- if (isMonsterHit()) {
- monsterHealth -= weapons[currentWeapon].power + Math.floor((Math.random() * (xp - 2) + 1));
- } else {
- text.innerText += " You miss.";
- }
- healthText.innerText = health;
- monsterHealthText.innerText = monsterHealth;
- if (health <= 0) {
- lose();
- } else if (monsterHealth <= 0) {
- fighting === 2 ? winGame() : defeatMonster();
- }
-
- if (Math.random() <= .1 && inventory.length !== 1) {
- text.innerText += " Your " + inventory.pop() + " breaks.";
- currentWeapon--;
- }
-}
-
-function getMonsterAttackValue(level) {
- let hit = (level * 5) - (Math.floor(Math.random() * xp));
- console.log(hit);
- return hit;
-}
-
-function isMonsterHit() {
- return Math.random() > .2 || health < 20;
-}
-
-function dodge() {
- text.innerText = "You dodge the attack from the " + monsters[fighting].name + ".";
-}
-
-function defeatMonster() {
- gold += Math.floor(monsters[fighting].level * 6.7);
- xp += monsters[fighting].level;
- goldText.innerText = gold;
- xpText.innerText = xp;
- update(locations[4]);
-}
-
-function lose() {
- update(locations[5]);
-}
-
-function winGame() {
- update(locations[6]);
-}
-
-function restart() {
- xp = 0;
- health = 100;
- gold = 50;
- currentWeapon = 0;
- inventory = ["stick"];
- goldText.innerText = gold;
- healthText.innerText = health;
- xpText.innerText = xp;
- goTown();
-}
-
-function easterEgg() {
- update(locations[7]);
-}
-
-function pickTwo() {
- pick(2);
-}
-
-function pickEight() {
- pick(8);
-}
-
-function pick(guess) {
- let numbers = [];
- while(numbers.length < 10) {
- numbers.push(Math.floor(Math.random() * 11));
- }
-}
-
-/* Now set `text.innerText` to equal "You picked [guess]. Here are the random numbers:". Replace [guess] with the actual guess.
-*/
\ No newline at end of file
diff --git a/basic-javascript-role-playing-game/index860.js b/basic-javascript-role-playing-game/index860.js
deleted file mode 100644
index 42b709a05..000000000
--- a/basic-javascript-role-playing-game/index860.js
+++ /dev/null
@@ -1,290 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- },
- {
- name: "kill monster",
- "button text": ["Go to town square", "Go to town square", "Go to town square"],
- "button functions": [goTown, goTown, goTown],
- text: 'The monster screams "Arg!" as it dies. You gain experience points and find gold.'
- },
- {
- name: "lose",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You die. ☠️"
- },
- {
- name: "win",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You defeat the dragon! YOU WIN THE GAME! 🎉"
- },
- {
- name: "easter egg",
- "button text": ["2", "8", "Go to town square?"],
- "button functions": [pickTwo, pickEight, goTown],
- text: "You find a secret game. Pick a number above. Ten numbers will be randomly chosen between 0 and 10. If the number you choose matches one of the random numbers, you win!"
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- monsterStats.style.display = "none";
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health."
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon."
- }
- } else {
- text.innerText = "You already have the most powerful weapon!"
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= getMonsterAttackValue(monsters[fighting].level);
-
- if (isMonsterHit()) {
- monsterHealth -= weapons[currentWeapon].power + Math.floor((Math.random() * (xp - 2) + 1));
- } else {
- text.innerText += " You miss.";
- }
- healthText.innerText = health;
- monsterHealthText.innerText = monsterHealth;
- if (health <= 0) {
- lose();
- } else if (monsterHealth <= 0) {
- fighting === 2 ? winGame() : defeatMonster();
- }
-
- if (Math.random() <= .1 && inventory.length !== 1) {
- text.innerText += " Your " + inventory.pop() + " breaks.";
- currentWeapon--;
- }
-}
-
-function getMonsterAttackValue(level) {
- let hit = (level * 5) - (Math.floor(Math.random() * xp));
- console.log(hit);
- return hit;
-}
-
-function isMonsterHit() {
- return Math.random() > .2 || health < 20;
-}
-
-function dodge() {
- text.innerText = "You dodge the attack from the " + monsters[fighting].name + ".";
-}
-
-function defeatMonster() {
- gold += Math.floor(monsters[fighting].level * 6.7);
- xp += monsters[fighting].level;
- goldText.innerText = gold;
- xpText.innerText = xp;
- update(locations[4]);
-}
-
-function lose() {
- update(locations[5]);
-}
-
-function winGame() {
- update(locations[6]);
-}
-
-function restart() {
- xp = 0;
- health = 100;
- gold = 50;
- currentWeapon = 0;
- inventory = ["stick"];
- goldText.innerText = gold;
- healthText.innerText = health;
- xpText.innerText = xp;
- goTown();
-}
-
-function easterEgg() {
- update(locations[7]);
-}
-
-function pickTwo() {
- pick(2);
-}
-
-function pickEight() {
- pick(8);
-}
-
-function pick(guess) {
- let numbers = [];
- while(numbers.length < 10) {
- numbers.push(Math.floor(Math.random() * 11));
- }
-
- text.innerText = "You picked " + guess + ". Here are the random numbers:";
-}
-
-/* Before the final end quote in the string you just added, insert the new line escape sequence (`\n`). This will cause the next part you add to `text.innerText` to appear on a new line.
-*/
\ No newline at end of file
diff --git a/basic-javascript-role-playing-game/index865.js b/basic-javascript-role-playing-game/index865.js
deleted file mode 100644
index 6ac647426..000000000
--- a/basic-javascript-role-playing-game/index865.js
+++ /dev/null
@@ -1,299 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- },
- {
- name: "kill monster",
- "button text": ["Go to town square", "Go to town square", "Go to town square"],
- "button functions": [goTown, goTown, goTown],
- text: 'The monster screams "Arg!" as it dies. You gain experience points and find gold.'
- },
- {
- name: "lose",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You die. ☠️"
- },
- {
- name: "win",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You defeat the dragon! YOU WIN THE GAME! 🎉"
- },
- {
- name: "easter egg",
- "button text": ["2", "8", "Go to town square?"],
- "button functions": [pickTwo, pickEight, goTown],
- text: "You find a secret game. Pick a number above. Ten numbers will be randomly chosen between 0 and 10. If the number you choose matches one of the random numbers, you win!"
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- monsterStats.style.display = "none";
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health."
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon."
- }
- } else {
- text.innerText = "You already have the most powerful weapon!"
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= getMonsterAttackValue(monsters[fighting].level);
-
- if (isMonsterHit()) {
- monsterHealth -= weapons[currentWeapon].power + Math.floor((Math.random() * (xp - 2) + 1));
- } else {
- text.innerText += " You miss.";
- }
- healthText.innerText = health;
- monsterHealthText.innerText = monsterHealth;
- if (health <= 0) {
- lose();
- } else if (monsterHealth <= 0) {
- fighting === 2 ? winGame() : defeatMonster();
- }
-
- if (Math.random() <= .1 && inventory.length !== 1) {
- text.innerText += " Your " + inventory.pop() + " breaks.";
- currentWeapon--;
- }
-}
-
-function getMonsterAttackValue(level) {
- let hit = (level * 5) - (Math.floor(Math.random() * xp));
- console.log(hit);
- return hit;
-}
-
-function isMonsterHit() {
- return Math.random() > .2 || health < 20;
-}
-
-function dodge() {
- text.innerText = "You dodge the attack from the " + monsters[fighting].name + ".";
-}
-
-function defeatMonster() {
- gold += Math.floor(monsters[fighting].level * 6.7);
- xp += monsters[fighting].level;
- goldText.innerText = gold;
- xpText.innerText = xp;
- update(locations[4]);
-}
-
-function lose() {
- update(locations[5]);
-}
-
-function winGame() {
- update(locations[6]);
-}
-
-function restart() {
- xp = 0;
- health = 100;
- gold = 50;
- currentWeapon = 0;
- inventory = ["stick"];
- goldText.innerText = gold;
- healthText.innerText = health;
- xpText.innerText = xp;
- goTown();
-}
-
-function easterEgg() {
- update(locations[7]);
-}
-
-function pickTwo() {
- pick(2);
-}
-
-function pickEight() {
- pick(8);
-}
-
-function pick(guess) {
- let numbers = [];
- while(numbers.length < 10) {
- numbers.push(Math.floor(Math.random() * 11));
- }
-
- text.innerText = "You picked " + guess + ". Here are the random numbers:\n";
-}
-
-/* A "for loop" runs "for" a specific number of times. For loops are declared with three optional expressions separated by semicolons: `for ([initialization]; [condition]; [final-expression])`. The initialization statement is executed one time only before the loop starts and is often used to define and setup the loop variable. The condition statement is evaluated at the beginning of every loop iteration. The loop will continue as long as it evaluates to true. The final-expression is executed at the end of each loop iteration.
-
-At the end of the `pick` function, create a `for` loop. The initialization should be `let i = 0`. The condition should be `i < 10`. The final expression should be `i++`. Here's an example of a for loop:
-```
-let ourArray = [];
-for (let i = 0; i < 5; i++) {
- ourArray.push(i);
-}
-// ourArray will now contain [0,1,2,3,4]
-```
-*/
\ No newline at end of file
diff --git a/basic-javascript-role-playing-game/index870.js b/basic-javascript-role-playing-game/index870.js
deleted file mode 100644
index 1f0960a47..000000000
--- a/basic-javascript-role-playing-game/index870.js
+++ /dev/null
@@ -1,294 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- },
- {
- name: "kill monster",
- "button text": ["Go to town square", "Go to town square", "Go to town square"],
- "button functions": [goTown, goTown, goTown],
- text: 'The monster screams "Arg!" as it dies. You gain experience points and find gold.'
- },
- {
- name: "lose",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You die. ☠️"
- },
- {
- name: "win",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You defeat the dragon! YOU WIN THE GAME! 🎉"
- },
- {
- name: "easter egg",
- "button text": ["2", "8", "Go to town square?"],
- "button functions": [pickTwo, pickEight, goTown],
- text: "You find a secret game. Pick a number above. Ten numbers will be randomly chosen between 0 and 10. If the number you choose matches one of the random numbers, you win!"
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- monsterStats.style.display = "none";
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health."
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon."
- }
- } else {
- text.innerText = "You already have the most powerful weapon!"
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= getMonsterAttackValue(monsters[fighting].level);
-
- if (isMonsterHit()) {
- monsterHealth -= weapons[currentWeapon].power + Math.floor((Math.random() * (xp - 2) + 1));
- } else {
- text.innerText += " You miss.";
- }
- healthText.innerText = health;
- monsterHealthText.innerText = monsterHealth;
- if (health <= 0) {
- lose();
- } else if (monsterHealth <= 0) {
- fighting === 2 ? winGame() : defeatMonster();
- }
-
- if (Math.random() <= .1 && inventory.length !== 1) {
- text.innerText += " Your " + inventory.pop() + " breaks.";
- currentWeapon--;
- }
-}
-
-function getMonsterAttackValue(level) {
- let hit = (level * 5) - (Math.floor(Math.random() * xp));
- console.log(hit);
- return hit;
-}
-
-function isMonsterHit() {
- return Math.random() > .2 || health < 20;
-}
-
-function dodge() {
- text.innerText = "You dodge the attack from the " + monsters[fighting].name + ".";
-}
-
-function defeatMonster() {
- gold += Math.floor(monsters[fighting].level * 6.7);
- xp += monsters[fighting].level;
- goldText.innerText = gold;
- xpText.innerText = xp;
- update(locations[4]);
-}
-
-function lose() {
- update(locations[5]);
-}
-
-function winGame() {
- update(locations[6]);
-}
-
-function restart() {
- xp = 0;
- health = 100;
- gold = 50;
- currentWeapon = 0;
- inventory = ["stick"];
- goldText.innerText = gold;
- healthText.innerText = health;
- xpText.innerText = xp;
- goTown();
-}
-
-function easterEgg() {
- update(locations[7]);
-}
-
-function pickTwo() {
- pick(2);
-}
-
-function pickEight() {
- pick(8);
-}
-
-function pick(guess) {
- let numbers = [];
- while(numbers.length < 10) {
- numbers.push(Math.floor(Math.random() * 11));
- }
-
- text.innerText = "You picked " + guess + ". Here are the random numbers:\n";
-
- for (let i = 0; i < 10; i++) {
-
- }
-}
-
-/* Inside the for loop, use the `+=` operator to add to the end of `text.innerText`. Add the the number at index `i` in the `numbers` array with `numbers[i]`. Then add a new line. So the entire line inside the for loop should look like: `text.innerText += numbers[i] + "\n";`
-*/
\ No newline at end of file
diff --git a/basic-javascript-role-playing-game/index875.js b/basic-javascript-role-playing-game/index875.js
deleted file mode 100644
index 36f3047d4..000000000
--- a/basic-javascript-role-playing-game/index875.js
+++ /dev/null
@@ -1,294 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- },
- {
- name: "kill monster",
- "button text": ["Go to town square", "Go to town square", "Go to town square"],
- "button functions": [goTown, goTown, goTown],
- text: 'The monster screams "Arg!" as it dies. You gain experience points and find gold.'
- },
- {
- name: "lose",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You die. ☠️"
- },
- {
- name: "win",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You defeat the dragon! YOU WIN THE GAME! 🎉"
- },
- {
- name: "easter egg",
- "button text": ["2", "8", "Go to town square?"],
- "button functions": [pickTwo, pickEight, goTown],
- text: "You find a secret game. Pick a number above. Ten numbers will be randomly chosen between 0 and 10. If the number you choose matches one of the random numbers, you win!"
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- monsterStats.style.display = "none";
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health."
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon."
- }
- } else {
- text.innerText = "You already have the most powerful weapon!"
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= getMonsterAttackValue(monsters[fighting].level);
-
- if (isMonsterHit()) {
- monsterHealth -= weapons[currentWeapon].power + Math.floor((Math.random() * (xp - 2) + 1));
- } else {
- text.innerText += " You miss.";
- }
- healthText.innerText = health;
- monsterHealthText.innerText = monsterHealth;
- if (health <= 0) {
- lose();
- } else if (monsterHealth <= 0) {
- fighting === 2 ? winGame() : defeatMonster();
- }
-
- if (Math.random() <= .1 && inventory.length !== 1) {
- text.innerText += " Your " + inventory.pop() + " breaks.";
- currentWeapon--;
- }
-}
-
-function getMonsterAttackValue(level) {
- let hit = (level * 5) - (Math.floor(Math.random() * xp));
- console.log(hit);
- return hit;
-}
-
-function isMonsterHit() {
- return Math.random() > .2 || health < 20;
-}
-
-function dodge() {
- text.innerText = "You dodge the attack from the " + monsters[fighting].name + ".";
-}
-
-function defeatMonster() {
- gold += Math.floor(monsters[fighting].level * 6.7);
- xp += monsters[fighting].level;
- goldText.innerText = gold;
- xpText.innerText = xp;
- update(locations[4]);
-}
-
-function lose() {
- update(locations[5]);
-}
-
-function winGame() {
- update(locations[6]);
-}
-
-function restart() {
- xp = 0;
- health = 100;
- gold = 50;
- currentWeapon = 0;
- inventory = ["stick"];
- goldText.innerText = gold;
- healthText.innerText = health;
- xpText.innerText = xp;
- goTown();
-}
-
-function easterEgg() {
- update(locations[7]);
-}
-
-function pickTwo() {
- pick(2);
-}
-
-function pickEight() {
- pick(8);
-}
-
-function pick(guess) {
- let numbers = [];
- while(numbers.length < 10) {
- numbers.push(Math.floor(Math.random() * 11));
- }
-
- text.innerText = "You picked " + guess + ". Here are the random numbers:\n";
-
- for (let i = 0; i < 10; i++) {
- text.innerText += numbers[i] + "\n";
- }
-}
-
-/* The `indexOf()` array method returns the first index at which a given element can be found in the array, or -1 if it is not present. After the for loop, add an `if` expression to check if the guessed number is in the `numbers` array. The condition of the `if` expression should check if `numbers.indexOf(guess) !== -1`.
-*/
\ No newline at end of file
diff --git a/basic-javascript-role-playing-game/index880.js b/basic-javascript-role-playing-game/index880.js
deleted file mode 100644
index 931789330..000000000
--- a/basic-javascript-role-playing-game/index880.js
+++ /dev/null
@@ -1,298 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- },
- {
- name: "kill monster",
- "button text": ["Go to town square", "Go to town square", "Go to town square"],
- "button functions": [goTown, goTown, goTown],
- text: 'The monster screams "Arg!" as it dies. You gain experience points and find gold.'
- },
- {
- name: "lose",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You die. ☠️"
- },
- {
- name: "win",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You defeat the dragon! YOU WIN THE GAME! 🎉"
- },
- {
- name: "easter egg",
- "button text": ["2", "8", "Go to town square?"],
- "button functions": [pickTwo, pickEight, goTown],
- text: "You find a secret game. Pick a number above. Ten numbers will be randomly chosen between 0 and 10. If the number you choose matches one of the random numbers, you win!"
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- monsterStats.style.display = "none";
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health."
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon."
- }
- } else {
- text.innerText = "You already have the most powerful weapon!"
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= getMonsterAttackValue(monsters[fighting].level);
-
- if (isMonsterHit()) {
- monsterHealth -= weapons[currentWeapon].power + Math.floor((Math.random() * (xp - 2) + 1));
- } else {
- text.innerText += " You miss.";
- }
- healthText.innerText = health;
- monsterHealthText.innerText = monsterHealth;
- if (health <= 0) {
- lose();
- } else if (monsterHealth <= 0) {
- fighting === 2 ? winGame() : defeatMonster();
- }
-
- if (Math.random() <= .1 && inventory.length !== 1) {
- text.innerText += " Your " + inventory.pop() + " breaks.";
- currentWeapon--;
- }
-}
-
-function getMonsterAttackValue(level) {
- let hit = (level * 5) - (Math.floor(Math.random() * xp));
- console.log(hit);
- return hit;
-}
-
-function isMonsterHit() {
- return Math.random() > .2 || health < 20;
-}
-
-function dodge() {
- text.innerText = "You dodge the attack from the " + monsters[fighting].name + ".";
-}
-
-function defeatMonster() {
- gold += Math.floor(monsters[fighting].level * 6.7);
- xp += monsters[fighting].level;
- goldText.innerText = gold;
- xpText.innerText = xp;
- update(locations[4]);
-}
-
-function lose() {
- update(locations[5]);
-}
-
-function winGame() {
- update(locations[6]);
-}
-
-function restart() {
- xp = 0;
- health = 100;
- gold = 50;
- currentWeapon = 0;
- inventory = ["stick"];
- goldText.innerText = gold;
- healthText.innerText = health;
- xpText.innerText = xp;
- goTown();
-}
-
-function easterEgg() {
- update(locations[7]);
-}
-
-function pickTwo() {
- pick(2);
-}
-
-function pickEight() {
- pick(8);
-}
-
-function pick(guess) {
- let numbers = [];
- while(numbers.length < 10) {
- numbers.push(Math.floor(Math.random() * 11));
- }
-
- text.innerText = "You picked " + guess + ". Here are the random numbers:\n";
-
- for (let i = 0; i < 10; i++) {
- text.innerText += numbers[i] + "\n";
- }
-
- if (numbers.indexOf(guess) !== -1) {
-
- }
-}
-
-/* Inside the `if` expression, add the following string to the end of `text.innerText`: "Right! You win 20 gold!" Also, add 20 to the value of `gold` and update `goldText.innerText`.
-*/
\ No newline at end of file
diff --git a/basic-javascript-role-playing-game/index885.js b/basic-javascript-role-playing-game/index885.js
deleted file mode 100644
index ee4568b3f..000000000
--- a/basic-javascript-role-playing-game/index885.js
+++ /dev/null
@@ -1,300 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- },
- {
- name: "kill monster",
- "button text": ["Go to town square", "Go to town square", "Go to town square"],
- "button functions": [goTown, goTown, goTown],
- text: 'The monster screams "Arg!" as it dies. You gain experience points and find gold.'
- },
- {
- name: "lose",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You die. ☠️"
- },
- {
- name: "win",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You defeat the dragon! YOU WIN THE GAME! 🎉"
- },
- {
- name: "easter egg",
- "button text": ["2", "8", "Go to town square?"],
- "button functions": [pickTwo, pickEight, goTown],
- text: "You find a secret game. Pick a number above. Ten numbers will be randomly chosen between 0 and 10. If the number you choose matches one of the random numbers, you win!"
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- monsterStats.style.display = "none";
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health."
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon."
- }
- } else {
- text.innerText = "You already have the most powerful weapon!"
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= getMonsterAttackValue(monsters[fighting].level);
-
- if (isMonsterHit()) {
- monsterHealth -= weapons[currentWeapon].power + Math.floor((Math.random() * (xp - 2) + 1));
- } else {
- text.innerText += " You miss.";
- }
- healthText.innerText = health;
- monsterHealthText.innerText = monsterHealth;
- if (health <= 0) {
- lose();
- } else if (monsterHealth <= 0) {
- fighting === 2 ? winGame() : defeatMonster();
- }
-
- if (Math.random() <= .1 && inventory.length !== 1) {
- text.innerText += " Your " + inventory.pop() + " breaks.";
- currentWeapon--;
- }
-}
-
-function getMonsterAttackValue(level) {
- let hit = (level * 5) - (Math.floor(Math.random() * xp));
- console.log(hit);
- return hit;
-}
-
-function isMonsterHit() {
- return Math.random() > .2 || health < 20;
-}
-
-function dodge() {
- text.innerText = "You dodge the attack from the " + monsters[fighting].name + ".";
-}
-
-function defeatMonster() {
- gold += Math.floor(monsters[fighting].level * 6.7);
- xp += monsters[fighting].level;
- goldText.innerText = gold;
- xpText.innerText = xp;
- update(locations[4]);
-}
-
-function lose() {
- update(locations[5]);
-}
-
-function winGame() {
- update(locations[6]);
-}
-
-function restart() {
- xp = 0;
- health = 100;
- gold = 50;
- currentWeapon = 0;
- inventory = ["stick"];
- goldText.innerText = gold;
- healthText.innerText = health;
- xpText.innerText = xp;
- goTown();
-}
-
-function easterEgg() {
- update(locations[7]);
-}
-
-function pickTwo() {
- pick(2);
-}
-
-function pickEight() {
- pick(8);
-}
-
-function pick(guess) {
- let numbers = [];
- while(numbers.length < 10) {
- numbers.push(Math.floor(Math.random() * 11));
- }
-
- text.innerText = "You picked " + guess + ". Here are the random numbers:\n";
-
- for (let i = 0; i < 10; i++) {
- text.innerText += numbers[i] + "\n";
- }
-
- if (numbers.indexOf(guess) !== -1) {
- text.innerText += "Right! You win 20 gold!"
- gold += 20;
- goldText.innerText = gold;
- }
-}
-
-/* Add an `else` expression. Inside add "Wrong! You lose 10 health!" to the end of `text.innerText`. Also, subtract 10 from `health` and update `healthText.innerText`.
-*/
\ No newline at end of file
diff --git a/basic-javascript-role-playing-game/index890.js b/basic-javascript-role-playing-game/index890.js
deleted file mode 100644
index 86fe8353b..000000000
--- a/basic-javascript-role-playing-game/index890.js
+++ /dev/null
@@ -1,304 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- },
- {
- name: "kill monster",
- "button text": ["Go to town square", "Go to town square", "Go to town square"],
- "button functions": [goTown, goTown, goTown],
- text: 'The monster screams "Arg!" as it dies. You gain experience points and find gold.'
- },
- {
- name: "lose",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You die. ☠️"
- },
- {
- name: "win",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You defeat the dragon! YOU WIN THE GAME! 🎉"
- },
- {
- name: "easter egg",
- "button text": ["2", "8", "Go to town square?"],
- "button functions": [pickTwo, pickEight, goTown],
- text: "You find a secret game. Pick a number above. Ten numbers will be randomly chosen between 0 and 10. If the number you choose matches one of the random numbers, you win!"
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- monsterStats.style.display = "none";
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health."
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon."
- }
- } else {
- text.innerText = "You already have the most powerful weapon!"
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= getMonsterAttackValue(monsters[fighting].level);
-
- if (isMonsterHit()) {
- monsterHealth -= weapons[currentWeapon].power + Math.floor((Math.random() * (xp - 2) + 1));
- } else {
- text.innerText += " You miss.";
- }
- healthText.innerText = health;
- monsterHealthText.innerText = monsterHealth;
- if (health <= 0) {
- lose();
- } else if (monsterHealth <= 0) {
- fighting === 2 ? winGame() : defeatMonster();
- }
-
- if (Math.random() <= .1 && inventory.length !== 1) {
- text.innerText += " Your " + inventory.pop() + " breaks.";
- currentWeapon--;
- }
-}
-
-function getMonsterAttackValue(level) {
- let hit = (level * 5) - (Math.floor(Math.random() * xp));
- console.log(hit);
- return hit;
-}
-
-function isMonsterHit() {
- return Math.random() > .2 || health < 20;
-}
-
-function dodge() {
- text.innerText = "You dodge the attack from the " + monsters[fighting].name + ".";
-}
-
-function defeatMonster() {
- gold += Math.floor(monsters[fighting].level * 6.7);
- xp += monsters[fighting].level;
- goldText.innerText = gold;
- xpText.innerText = xp;
- update(locations[4]);
-}
-
-function lose() {
- update(locations[5]);
-}
-
-function winGame() {
- update(locations[6]);
-}
-
-function restart() {
- xp = 0;
- health = 100;
- gold = 50;
- currentWeapon = 0;
- inventory = ["stick"];
- goldText.innerText = gold;
- healthText.innerText = health;
- xpText.innerText = xp;
- goTown();
-}
-
-function easterEgg() {
- update(locations[7]);
-}
-
-function pickTwo() {
- pick(2);
-}
-
-function pickEight() {
- pick(8);
-}
-
-function pick(guess) {
- let numbers = [];
- while(numbers.length < 10) {
- numbers.push(Math.floor(Math.random() * 11));
- }
-
- text.innerText = "You picked " + guess + ". Here are the random numbers:\n";
-
- for (let i = 0; i < 10; i++) {
- text.innerText += numbers[i] + "\n";
- }
-
- if (numbers.indexOf(guess) !== -1) {
- text.innerText += "Right! You win 20 gold!"
- gold += 20;
- goldText.innerText = gold;
- } else {
- text.innerText += "Wrong! You lose 10 health!"
- health -= 10;
- healthText.innerText = health;
- }
-}
-
-/* At the end of the `else` statement, check if `health` is less than or equal to zero. If so, call the `lose()` function.
-*/
\ No newline at end of file
diff --git a/basic-javascript-role-playing-game/index895.js b/basic-javascript-role-playing-game/index895.js
deleted file mode 100644
index 7779be29a..000000000
--- a/basic-javascript-role-playing-game/index895.js
+++ /dev/null
@@ -1,307 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- },
- {
- name: "kill monster",
- "button text": ["Go to town square", "Go to town square", "Go to town square"],
- "button functions": [goTown, goTown, goTown],
- text: 'The monster screams "Arg!" as it dies. You gain experience points and find gold.'
- },
- {
- name: "lose",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You die. ☠️"
- },
- {
- name: "win",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You defeat the dragon! YOU WIN THE GAME! 🎉"
- },
- {
- name: "easter egg",
- "button text": ["2", "8", "Go to town square?"],
- "button functions": [pickTwo, pickEight, goTown],
- text: "You find a secret game. Pick a number above. Ten numbers will be randomly chosen between 0 and 10. If the number you choose matches one of the random numbers, you win!"
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- monsterStats.style.display = "none";
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health."
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon."
- }
- } else {
- text.innerText = "You already have the most powerful weapon!"
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= getMonsterAttackValue(monsters[fighting].level);
-
- if (isMonsterHit()) {
- monsterHealth -= weapons[currentWeapon].power + Math.floor((Math.random() * (xp - 2) + 1));
- } else {
- text.innerText += " You miss.";
- }
- healthText.innerText = health;
- monsterHealthText.innerText = monsterHealth;
- if (health <= 0) {
- lose();
- } else if (monsterHealth <= 0) {
- fighting === 2 ? winGame() : defeatMonster();
- }
-
- if (Math.random() <= .1 && inventory.length !== 1) {
- text.innerText += " Your " + inventory.pop() + " breaks.";
- currentWeapon--;
- }
-}
-
-function getMonsterAttackValue(level) {
- let hit = (level * 5) - (Math.floor(Math.random() * xp));
- console.log(hit);
- return hit;
-}
-
-function isMonsterHit() {
- return Math.random() > .2 || health < 20;
-}
-
-function dodge() {
- text.innerText = "You dodge the attack from the " + monsters[fighting].name + ".";
-}
-
-function defeatMonster() {
- gold += Math.floor(monsters[fighting].level * 6.7);
- xp += monsters[fighting].level;
- goldText.innerText = gold;
- xpText.innerText = xp;
- update(locations[4]);
-}
-
-function lose() {
- update(locations[5]);
-}
-
-function winGame() {
- update(locations[6]);
-}
-
-function restart() {
- xp = 0;
- health = 100;
- gold = 50;
- currentWeapon = 0;
- inventory = ["stick"];
- goldText.innerText = gold;
- healthText.innerText = health;
- xpText.innerText = xp;
- goTown();
-}
-
-function easterEgg() {
- update(locations[7]);
-}
-
-function pickTwo() {
- pick(2);
-}
-
-function pickEight() {
- pick(8);
-}
-
-function pick(guess) {
- let numbers = [];
- while(numbers.length < 10) {
- numbers.push(Math.floor(Math.random() * 11));
- }
-
- text.innerText = "You picked " + guess + ". Here are the random numbers:\n";
-
- for (let i = 0; i < 10; i++) {
- text.innerText += numbers[i] + "\n";
- }
-
- if (numbers.indexOf(guess) !== -1) {
- text.innerText += "Right! You win 20 gold!"
- gold += 20;
- goldText.innerText = gold;
- } else {
- text.innerText += "Wrong! You lose 10 health!"
- health -= 10;
- healthText.innerText = health;
- if (health <= 0) {
- lose();
- }
- }
-}
-
-/* Inside the `locations` array, on the `kill monster` object, "button functions" is currently set to `[goTown, goTown, goTown]`. Change the third `goTown` to `easterEgg`. This is how a player will access the hidden feature of the game.
-*/
\ No newline at end of file
diff --git a/basic-javascript-role-playing-game/index900.js b/basic-javascript-role-playing-game/index900.js
deleted file mode 100644
index 6f4bef356..000000000
--- a/basic-javascript-role-playing-game/index900.js
+++ /dev/null
@@ -1,307 +0,0 @@
-let xp = 0;
-let health = 100;
-let gold = 50;
-let currentWeapon = 0;
-let fighting;
-let monsterHealth;
-let inventory = ["stick"];
-
-const button1 = document.querySelector("#button1");
-const button2 = document.querySelector("#button2");
-const button3 = document.querySelector("#button3");
-const text = document.querySelector("#text");
-const xpText = document.querySelector("#xpText");
-const healthText = document.querySelector("#healthText");
-const goldText = document.querySelector("#goldText");
-const monsterStats = document.querySelector("#monsterStats");
-const monsterNameText = document.querySelector("#monsterName");
-const monsterHealthText = document.querySelector("#monsterHealth");
-
-const weapons = [
- {
- name: "stick",
- power: 5
- },
- {
- name: "dagger",
- power: 30
- },
- {
- name: "claw hammer",
- power: 50
- },
- {
- name: "sword",
- power: 100
- }
-];
-
-const monsters = [
- {
- name: "slime",
- level: 2,
- health: 15
- },
- {
- name: "fanged beast",
- level: 8,
- health: 60
- },
- {
- name: "dragon",
- level: 20,
- health: 300
- }
-];
-
-const locations = [
- {
- name: "town square",
- "button text": ["Go to store", "Go to cave", "Fight dragon"],
- "button functions": [goStore, goCave, fightDragon],
- text: "You are in the town square. You see a sign that says \"Store.\""
- },
- {
- name: "store",
- "button text": ["Buy 10 health (10 gold)", "Buy weapon (30 gold)", "Go to town square"],
- "button functions": [buyHealth, buyWeapon, goTown],
- text: "You enter the store."
- },
- {
- name: "cave",
- "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
- "button functions": [fightSlime, fightBeast, goTown],
- text: "You enter the cave. You see some monsters."
- },
- {
- name: "fight",
- "button text": ["Attack", "Dodge", "Run"],
- "button functions": [attack, dodge, goTown],
- text: "You are fighting a monster."
- },
- {
- name: "kill monster",
- "button text": ["Go to town square", "Go to town square", "Go to town square"],
- "button functions": [goTown, goTown, easterEgg],
- text: 'The monster screams "Arg!" as it dies. You gain experience points and find gold.'
- },
- {
- name: "lose",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You die. ☠️"
- },
- {
- name: "win",
- "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
- "button functions": [restart, restart, restart],
- text: "You defeat the dragon! YOU WIN THE GAME! 🎉"
- },
- {
- name: "easter egg",
- "button text": ["2", "8", "Go to town square?"],
- "button functions": [pickTwo, pickEight, goTown],
- text: "You find a secret game. Pick a number above. Ten numbers will be randomly chosen between 0 and 10. If the number you choose matches one of the random numbers, you win!"
- }
-];
-
-// initialize buttons
-button1.onclick = goStore;
-button2.onclick = goCave;
-button3.onclick = fightDragon;
-
-function update(location) {
- monsterStats.style.display = "none";
- button1.innerText = location["button text"][0];
- button2.innerText = location["button text"][1];
- button3.innerText = location["button text"][2];
- button1.onclick = location["button functions"][0];
- button2.onclick = location["button functions"][1];
- button3.onclick = location["button functions"][2];
- text.innerText = location.text;
-}
-
-function goTown() {
- update(locations[0]);
-}
-
-function goStore() {
- update(locations[1]);
-}
-
-function goCave() {
- update(locations[2]);
-}
-
-function buyHealth() {
- if (gold >= 10) {
- gold -= 10;
- health += 10;
- goldText.innerText = gold;
- healthText.innerText = health;
- } else {
- text.innerText = "You do not have enough gold to buy health."
- }
-}
-
-function buyWeapon() {
- if (currentWeapon < weapons.length - 1) {
- if (gold >= 30) {
- gold -= 30;
- currentWeapon++;
- goldText.innerText = gold;
- let newWeapon = weapons[currentWeapon].name;
- text.innerText = "You now have a " + newWeapon + ".";
- inventory.push(newWeapon);
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "You do not have enough gold to buy a weapon."
- }
- } else {
- text.innerText = "You already have the most powerful weapon!"
- button2.innerText = "Sell weapon for 15 gold";
- button2.onclick = sellWeapon;
- }
-}
-
-function sellWeapon() {
- if (inventory.length > 1) {
- gold += 15;
- goldText.innerText = gold;
- let currentWeapon = inventory.shift();
- text.innerText = "You sold a " + currentWeapon + ".";
- text.innerText += " In your inventory you have: " + inventory;
- } else {
- text.innerText = "Don't sell your only weapon!";
- }
-}
-
-function fightSlime() {
- fighting = 0;
- goFight();
-}
-
-function fightBeast() {
- fighting = 1;
- goFight();
-}
-
-function fightDragon() {
- fighting = 2;
- goFight();
-}
-
-function goFight() {
- update(locations[3]);
- monsterHealth = monsters[fighting].health;
- monsterStats.style.display = "block";
- monsterNameText.innerText = monsters[fighting].name;
- monsterHealthText.innerText = monsterHealth;
-}
-
-function attack() {
- text.innerText = "The " + monsters[fighting].name + " attacks.";
- text.innerText += " You attack it with your " + weapons[currentWeapon].name + ".";
- health -= getMonsterAttackValue(monsters[fighting].level);
-
- if (isMonsterHit()) {
- monsterHealth -= weapons[currentWeapon].power + Math.floor((Math.random() * (xp - 2) + 1));
- } else {
- text.innerText += " You miss.";
- }
- healthText.innerText = health;
- monsterHealthText.innerText = monsterHealth;
- if (health <= 0) {
- lose();
- } else if (monsterHealth <= 0) {
- fighting === 2 ? winGame() : defeatMonster();
- }
-
- if (Math.random() <= .1 && inventory.length !== 1) {
- text.innerText += " Your " + inventory.pop() + " breaks.";
- currentWeapon--;
- }
-}
-
-function getMonsterAttackValue(level) {
- let hit = (level * 5) - (Math.floor(Math.random() * xp));
- console.log(hit);
- return hit;
-}
-
-function isMonsterHit() {
- return Math.random() > .2 || health < 20;
-}
-
-function dodge() {
- text.innerText = "You dodge the attack from the " + monsters[fighting].name + ".";
-}
-
-function defeatMonster() {
- gold += Math.floor(monsters[fighting].level * 6.7);
- xp += monsters[fighting].level;
- goldText.innerText = gold;
- xpText.innerText = xp;
- update(locations[4]);
-}
-
-function lose() {
- update(locations[5]);
-}
-
-function winGame() {
- update(locations[6]);
-}
-
-function restart() {
- xp = 0;
- health = 100;
- gold = 50;
- currentWeapon = 0;
- inventory = ["stick"];
- goldText.innerText = gold;
- healthText.innerText = health;
- xpText.innerText = xp;
- goTown();
-}
-
-function easterEgg() {
- update(locations[7]);
-}
-
-function pickTwo() {
- pick(2);
-}
-
-function pickEight() {
- pick(8);
-}
-
-function pick(guess) {
- let numbers = [];
- while(numbers.length < 10) {
- numbers.push(Math.floor(Math.random() * 11));
- }
-
- text.innerText = "You picked " + guess + ". Here are the random numbers:\n";
-
- for (let i = 0; i < 10; i++) {
- text.innerText += numbers[i] + "\n";
- }
-
- if (numbers.indexOf(guess) !== -1) {
- text.innerText += "Right! You win 20 gold!"
- gold += 20;
- goldText.innerText = gold;
- } else {
- text.innerText += "Wrong! You lose 10 health!"
- health -= 10;
- healthText.innerText = health;
- if (health <= 0) {
- lose();
- }
- }
-}
-
-/* Congratulations! You are finished! Now try out the game.
-*/
\ No newline at end of file
diff --git a/coding-challenges/customer-review-section/index.html b/coding-challenges/customer-review-section/index.html
new file mode 100644
index 000000000..386bb26b8
--- /dev/null
+++ b/coding-challenges/customer-review-section/index.html
@@ -0,0 +1,150 @@
+
+
+
+
+
+ Customer Reviews Section
+
+
+
+
+
Customer Reviews
+
+
+
+
+
+
+
+
+
4.7 out of 5
+
+
48,854 global ratings
+
+
+
5 star
+
+
84%
+
+
+
4 star
+
+
9%
+
+
+
3 star
+
+
4%
+
+
+
2 star
+
+
1%
+
+
+
1 star
+
+
2%
+
+
+
+
+
diff --git a/coding-challenges/customer-review-section/styles.css b/coding-challenges/customer-review-section/styles.css
new file mode 100644
index 000000000..5760187b1
--- /dev/null
+++ b/coding-challenges/customer-review-section/styles.css
@@ -0,0 +1,86 @@
+*,
+*::before,
+*::after {
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
+}
+
+:root {
+ --gold: #ed8a19;
+ --light-grey: #efefef;
+ --white: #fff;
+}
+
+body {
+ background-color: var(--light-grey);
+}
+
+main {
+ background-color: var(--white);
+ margin: 10px auto;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ padding: 10px;
+ border-radius: 10px;
+ width: 80%;
+}
+
+@media (min-width: 768px) {
+ main {
+ width: 30%;
+ }
+}
+
+.avg-review-container,
+.star-rating-container {
+ display: flex;
+ gap: 10px;
+ margin: 10px 0;
+}
+
+.avg-review-text {
+ font-weight: 600;
+}
+
+.star-icon {
+ width: 20px;
+ height: 20px;
+}
+
+.half-filled-star .star-border {
+ fill: none;
+ stroke: var(--gold);
+ stroke-width: 2;
+}
+
+.half-filled-star .star-fill {
+ fill: var(--gold);
+ mask-image: linear-gradient(to left, transparent 50%, var(--gold) 50%);
+}
+
+progress {
+ width: 250px;
+ height: 20px;
+ background-color: var(--gold);
+ border: 1px solid var(--light-grey);
+ border-radius: 45px;
+}
+
+/* Chrome and Safari */
+progress::-webkit-progress-bar {
+ background-color: var(--white);
+ border-radius: 45px;
+}
+
+progress::-webkit-progress-value {
+ background-color: var(--gold);
+ border-radius: 45px;
+}
+
+/* Firefox */
+progress::-moz-progress-bar {
+ background-color: var(--gold);
+}
diff --git a/coding-challenges/customer-review-section/user-stories.md b/coding-challenges/customer-review-section/user-stories.md
new file mode 100644
index 000000000..531bdbf3c
--- /dev/null
+++ b/coding-challenges/customer-review-section/user-stories.md
@@ -0,0 +1,6 @@
+# User Stories
+
+1. I should see a title that says "Customer Reviews".
+2. I should see a section with 5 stars in a row. Four of those stars should be filled and one star should be filled halfway(from left to right).
+3. Next to the star container, I should see text that says "4.7 out of 5".
+4. I should see a rating container that includes five separate breakdowns for ratings, ranging from 1 to 5 stars. Inside this container, I should see smaller sections for each rating that display the rating, percentage indicator, and the actual percentage.
diff --git a/coding-challenges/faq-component/index.html b/coding-challenges/faq-component/index.html
new file mode 100644
index 000000000..fb31b8f4c
--- /dev/null
+++ b/coding-challenges/faq-component/index.html
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+ FAQ Page
+
+
+
+
+
+
+
+
FAQ
+
+
+ How can I subscribe to a plan?
+ You can subscribe to a plan by clicking on the "Subscribe" button on the pricing page.
+
+
+
+ How do I cancel my subscription?
+ You can cancel your subscription by contacting our support team.
+
+
+
+ Can I change my plan?
+ Yes, you can change your plan by selecting a new plan from the pricing page.
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/coding-challenges/faq-component/styles.css b/coding-challenges/faq-component/styles.css
new file mode 100644
index 000000000..bf3930d8f
--- /dev/null
+++ b/coding-challenges/faq-component/styles.css
@@ -0,0 +1,44 @@
+body {
+ font-family: Arial, sans-serif;
+ background-color: #e0d9d9;
+ margin: 0;
+ padding: 0;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ height: 100vh;
+}
+
+.faq-main-container {
+ background: white;
+ padding: 20px;
+ border-radius: 10px;
+ width: 400px;
+ box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
+}
+
+h1 {
+ font-size: 1.5rem;
+ margin-bottom: 20px;
+ text-align: center;
+
+}
+
+details {
+ margin-bottom: 1rem;
+ padding: 1rem;
+ border-bottom: 1px solid #ddd;
+}
+
+summary {
+ font-weight: bold;
+ padding: 0.5rem 0;
+ cursor: pointer;
+}
+
+details>*:not(summary) {
+ padding-left: 1rem;
+ text-align: left;
+ display: block;
+ margin-top: 0.5rem;
+}
\ No newline at end of file
diff --git a/coding-challenges/faq-component/user-stories.md b/coding-challenges/faq-component/user-stories.md
new file mode 100644
index 000000000..f5cc11f5d
--- /dev/null
+++ b/coding-challenges/faq-component/user-stories.md
@@ -0,0 +1,11 @@
+A frequently asked questions page is a collection of commonly asked questions and answers. This will help users find answers to common queries quickly without needing to reach out to customer support for help.
+
+- I should see a list of frequently asked questions with answers.
+
+- I can click on a question to reveal the answer.
+
+- I can click the question again to hide the answer so that the page remains clean and easy to navigate.
+
+- The first answer should be revealed by default while the others remain hidden.
+
+- I should see a visual cue (e.g., an arrow or highlight) when a question is expanded so that I know which question is currently active.
\ No newline at end of file
diff --git a/coding-challenges/pong-game/index.html b/coding-challenges/pong-game/index.html
new file mode 100644
index 000000000..9b971a48b
--- /dev/null
+++ b/coding-challenges/pong-game/index.html
@@ -0,0 +1,47 @@
+
+
+
+
+
+ Pong
+
+
+
+
Pong Game
+
+
Try to score against the unbeatable computer opponent!
If the United States commits to the goal of reaching Mars, it will almost certainly do so in reaction to the progress of other nations
-
-
-
- Consciousness Sea of Tranquility Apollonius of Perga cosmic fugue Tunguska event cosmos. Bits of moving fluff the only home we've ever known Euclid concept of the number one Rig Veda finite but unbounded. Hundreds of thousands emerged into consciousness
- rings of Uranus invent the universe citizens of distant epochs star stuff harvesting star light? Vanquish the impossible vanquish the impossible from which we spring a mote of dust suspended in a sunbeam citizens of distant epochs stirred by starlight.
-
-
- Muse about decipherment with pretty stories for which there's little good evidence of brilliant syntheses corpus callosum radio telescope? Great turbulent clouds Orion's sword cosmic ocean preserve and cherish that pale blue dot kindling the energy
- hidden in matter are creatures of the cosmos. Laws of physics trillion a mote of dust suspended in a sunbeam two ghostly white figures in coveralls and helmets are soflty dancing hearts of the stars the carbon in our apple pies.
-
-
- Trillion tesseract as a patch of light shores of the cosmic ocean of brilliant syntheses extraordinary claims require extraordinary evidence. Venture tingling of the spine across the centuries vanquish the impossible extraplanetary ship of the imagination?
- Gathered by gravity emerged into consciousness invent the universe great turbulent clouds the carbon in our apple pies a mote of dust suspended in a sunbeam. From which we spring take root and flourish take root and flourish the only home we've
- ever known with pretty stories for which there's little good evidence from which we spring?
-
-
- Trillion tesseract as a patch of light shores of the cosmic ocean of brilliant syntheses extraordinary claims require extraordinary evidence. Venture tingling of the spine across the centuries vanquish the impossible extraplanetary ship of the imagination?
- Gathered by gravity emerged into consciousness invent the universe great turbulent clouds the carbon in our apple pies a mote of dust suspended in a sunbeam. From which we spring take root and flourish take root and flourish the only home we've
- ever known with pretty stories for which there's little good evidence from which we spring? Reprehenderit qui in ea voluptate velit esse astonishment a very small stage in a vast cosmic a.
-
-
-
-
- Extraordinary claims require extraordinary evidence cosmic ocean descended from astronomers rich in mystery globular star cluster tendrils of gossamer clouds. Cosmos intelligent beings muse about the carbon in our apple pies stirred by starlight Sed
- ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium. Sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem vel illum qui dolorem eum fugiat quo voluptas nulla
- pariatur totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo citizens of distant epochs a very small stage in a vast cosmic arena rich in heavy atoms.
-
-
- Rich in mystery across the centuries worldlets Rig Veda hundreds of thousands take root and flourish? Colonies muse about the ash of stellar alchemy laws of physics sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt Nemo
- enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit. Totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo adipisci velit finite but unbounded not a sunrise but a galaxyrise
- rings of Uranus totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo autem vel eum iure reprehenderit qui in ea voluptate velit esse astonishment a very small stage in a vast cosmica.
-
-
-
-
-
Tesseract laws of physics star stuff harvesting star light explorations bits of moving fluff cosmic fugue?
-
-
-
-
- Tesseract laws of physics star stuff harvesting star light explorations bits of moving fluff cosmic fugue? Ship of the imagination inconspicuous motes of rock and gas globular star cluster the ash of stellar alchemy totam rem aperiam, eaque ipsa quae
- ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo Sea of Tranquility?
-
-
-
-
- eos qui ratione voluptatem sequi nesciunt rich in heavy atoms not a sunrise but a galaxyrise across the centuries. Adipisci velit take root and flourish consectetur hearts of the stars Ut enim ad minima veniam hearts of the stars.
-
-
- Drake Equation Tunguska event across the centuries hearts of the stars stirred by starlight muse about. Made in the interiors of collapsing stars Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit permanence of the stars the
- ash of stellar alchemy sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem another world. The only home we've ever known vastness is bearable only through love made in the interiors of collapsing
- stars a very small stage in a vast cosmic arena intelligent beings consectetur.
-
-
- Network of wormholes emerged into consciousness corpus callosum as a patch of light trillion quasar. White dwarf descended from astronomers vel illum qui dolorem eum fugiat quo voluptas nulla pariatur quis nostrum exercitationem ullam corporis suscipit
- laboriosam rich in heavy atoms globular star cluster. Intelligent beings concept of the number one how far away two ghostly white figures in coveralls and helmets are soflty dancing vastness is bearable only through love muse about.
-
-
- Qui dolorem ipsum quia dolor sit amet circumnavigated vanquish the impossible paroxysm of global death consectetur light years? Cosmic ocean a mote of dust suspended in a sunbeam at the edge of forever with pretty stories for which there's little
- good evidence Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur bits of moving fluff. Bits of moving fluff a still more glorious dawn awaits Ut enim ad minima veniam nisi ut aliquid ex ea commodi
- consequatur invent the universe how far away.
-
-
- Descended from astronomers star stuff harvesting star light rings of Uranus made in the interiors of collapsing stars hydrogen atoms paroxysm of global death. Gathered by gravity a very small stage in a vast cosmic arena as a patch of light astonishment
- Tunguska event a very small stage in a vast cosmic arena. Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur citizens of distant epochs consectetur Ut enim ad minima veniam finite but unbounded
- something incredible is waiting to be known.
-
-
- Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit as a patch of light Jean-François Champollion network of wormholes realm of the galaxies totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto
- beatae vitae dicta sunt explicabo. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium nisi ut aliquid ex ea commodi consequatur rings of Uranus shores of the cosmic ocean made in the interiors of collapsing
- stars citizens of distant epochs.
-
-
-
-
-
\ No newline at end of file
diff --git a/css-grid-magazine/index04.css b/css-grid-magazine/index04.css
deleted file mode 100644
index 9cfa2a213..000000000
--- a/css-grid-magazine/index04.css
+++ /dev/null
@@ -1,8 +0,0 @@
-.magazine {
- display: grid;
- /* To declare the number of columns i.e. vertical divisions a grid has, we use the
- grid-template-columns property. We use a unit called fr that represents a fraction of the free space.
- For example: grid-template-columns: 1fr 3fr; would divide the grid into 1+3=4 parts, the first column
- would occupy 25% of the space and the second one would occupy 75%
- Use the property to declare 6 columns each having 1/6th of the total space*/
-}
\ No newline at end of file
diff --git a/css-grid-magazine/index04.html b/css-grid-magazine/index04.html
deleted file mode 100644
index cc3b9820d..000000000
--- a/css-grid-magazine/index04.html
+++ /dev/null
@@ -1,111 +0,0 @@
-
-
-
-
- CSS Grid Magazine
-
-
-
-
-
-
-
If the United States commits to the goal of reaching Mars, it will almost certainly do so in reaction to the progress of other nations
-
-
-
- Consciousness Sea of Tranquility Apollonius of Perga cosmic fugue Tunguska event cosmos. Bits of moving fluff the only home we've ever known Euclid concept of the number one Rig Veda finite but unbounded. Hundreds of thousands emerged into consciousness
- rings of Uranus invent the universe citizens of distant epochs star stuff harvesting star light? Vanquish the impossible vanquish the impossible from which we spring a mote of dust suspended in a sunbeam citizens of distant epochs stirred by starlight.
-
-
- Muse about decipherment with pretty stories for which there's little good evidence of brilliant syntheses corpus callosum radio telescope? Great turbulent clouds Orion's sword cosmic ocean preserve and cherish that pale blue dot kindling the energy
- hidden in matter are creatures of the cosmos. Laws of physics trillion a mote of dust suspended in a sunbeam two ghostly white figures in coveralls and helmets are soflty dancing hearts of the stars the carbon in our apple pies.
-
-
- Trillion tesseract as a patch of light shores of the cosmic ocean of brilliant syntheses extraordinary claims require extraordinary evidence. Venture tingling of the spine across the centuries vanquish the impossible extraplanetary ship of the imagination?
- Gathered by gravity emerged into consciousness invent the universe great turbulent clouds the carbon in our apple pies a mote of dust suspended in a sunbeam. From which we spring take root and flourish take root and flourish the only home we've
- ever known with pretty stories for which there's little good evidence from which we spring?
-
-
- Trillion tesseract as a patch of light shores of the cosmic ocean of brilliant syntheses extraordinary claims require extraordinary evidence. Venture tingling of the spine across the centuries vanquish the impossible extraplanetary ship of the imagination?
- Gathered by gravity emerged into consciousness invent the universe great turbulent clouds the carbon in our apple pies a mote of dust suspended in a sunbeam. From which we spring take root and flourish take root and flourish the only home we've
- ever known with pretty stories for which there's little good evidence from which we spring? Reprehenderit qui in ea voluptate velit esse astonishment a very small stage in a vast cosmic a.
-
-
-
-
- Extraordinary claims require extraordinary evidence cosmic ocean descended from astronomers rich in mystery globular star cluster tendrils of gossamer clouds. Cosmos intelligent beings muse about the carbon in our apple pies stirred by starlight Sed
- ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium. Sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem vel illum qui dolorem eum fugiat quo voluptas nulla
- pariatur totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo citizens of distant epochs a very small stage in a vast cosmic arena rich in heavy atoms.
-
-
- Rich in mystery across the centuries worldlets Rig Veda hundreds of thousands take root and flourish? Colonies muse about the ash of stellar alchemy laws of physics sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt Nemo
- enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit. Totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo adipisci velit finite but unbounded not a sunrise but a galaxyrise
- rings of Uranus totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo autem vel eum iure reprehenderit qui in ea voluptate velit esse astonishment a very small stage in a vast cosmica.
-
-
-
-
-
Tesseract laws of physics star stuff harvesting star light explorations bits of moving fluff cosmic fugue?
-
-
-
-
- Tesseract laws of physics star stuff harvesting star light explorations bits of moving fluff cosmic fugue? Ship of the imagination inconspicuous motes of rock and gas globular star cluster the ash of stellar alchemy totam rem aperiam, eaque ipsa quae
- ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo Sea of Tranquility?
-
-
-
-
- eos qui ratione voluptatem sequi nesciunt rich in heavy atoms not a sunrise but a galaxyrise across the centuries. Adipisci velit take root and flourish consectetur hearts of the stars Ut enim ad minima veniam hearts of the stars.
-
-
- Drake Equation Tunguska event across the centuries hearts of the stars stirred by starlight muse about. Made in the interiors of collapsing stars Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit permanence of the stars the
- ash of stellar alchemy sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem another world. The only home we've ever known vastness is bearable only through love made in the interiors of collapsing
- stars a very small stage in a vast cosmic arena intelligent beings consectetur.
-
-
- Network of wormholes emerged into consciousness corpus callosum as a patch of light trillion quasar. White dwarf descended from astronomers vel illum qui dolorem eum fugiat quo voluptas nulla pariatur quis nostrum exercitationem ullam corporis suscipit
- laboriosam rich in heavy atoms globular star cluster. Intelligent beings concept of the number one how far away two ghostly white figures in coveralls and helmets are soflty dancing vastness is bearable only through love muse about.
-
-
- Qui dolorem ipsum quia dolor sit amet circumnavigated vanquish the impossible paroxysm of global death consectetur light years? Cosmic ocean a mote of dust suspended in a sunbeam at the edge of forever with pretty stories for which there's little
- good evidence Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur bits of moving fluff. Bits of moving fluff a still more glorious dawn awaits Ut enim ad minima veniam nisi ut aliquid ex ea commodi
- consequatur invent the universe how far away.
-
-
- Descended from astronomers star stuff harvesting star light rings of Uranus made in the interiors of collapsing stars hydrogen atoms paroxysm of global death. Gathered by gravity a very small stage in a vast cosmic arena as a patch of light astonishment
- Tunguska event a very small stage in a vast cosmic arena. Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur citizens of distant epochs consectetur Ut enim ad minima veniam finite but unbounded
- something incredible is waiting to be known.
-
-
- Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit as a patch of light Jean-François Champollion network of wormholes realm of the galaxies totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto
- beatae vitae dicta sunt explicabo. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium nisi ut aliquid ex ea commodi consequatur rings of Uranus shores of the cosmic ocean made in the interiors of collapsing
- stars citizens of distant epochs.
-
-
-
-
-
\ No newline at end of file
diff --git a/css-grid-magazine/index05.css b/css-grid-magazine/index05.css
deleted file mode 100644
index 14c30cf0c..000000000
--- a/css-grid-magazine/index05.css
+++ /dev/null
@@ -1,7 +0,0 @@
-.magazine {
- display: grid;
- grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
- /* The repeat() function allows you to reduce repetition like above. It is used in the following format:
- repeat(number of times, value to be repeated)
- Use the repeat() function to reduce repetition in the above declaration */
-}
\ No newline at end of file
diff --git a/css-grid-magazine/index05.html b/css-grid-magazine/index05.html
deleted file mode 100644
index 4c865026f..000000000
--- a/css-grid-magazine/index05.html
+++ /dev/null
@@ -1,111 +0,0 @@
-
-
-
-
- CSS Grid Magazine
-
-
-
-
-
-
-
If the United States commits to the goal of reaching Mars, it will almost certainly do so in reaction to the progress of other nations
-
-
-
- Consciousness Sea of Tranquility Apollonius of Perga cosmic fugue Tunguska event cosmos. Bits of moving fluff the only home we've ever known Euclid concept of the number one Rig Veda finite but unbounded. Hundreds of thousands emerged into consciousness
- rings of Uranus invent the universe citizens of distant epochs star stuff harvesting star light? Vanquish the impossible vanquish the impossible from which we spring a mote of dust suspended in a sunbeam citizens of distant epochs stirred by starlight.
-
-
- Muse about decipherment with pretty stories for which there's little good evidence of brilliant syntheses corpus callosum radio telescope? Great turbulent clouds Orion's sword cosmic ocean preserve and cherish that pale blue dot kindling the energy
- hidden in matter are creatures of the cosmos. Laws of physics trillion a mote of dust suspended in a sunbeam two ghostly white figures in coveralls and helmets are soflty dancing hearts of the stars the carbon in our apple pies.
-
-
- Trillion tesseract as a patch of light shores of the cosmic ocean of brilliant syntheses extraordinary claims require extraordinary evidence. Venture tingling of the spine across the centuries vanquish the impossible extraplanetary ship of the imagination?
- Gathered by gravity emerged into consciousness invent the universe great turbulent clouds the carbon in our apple pies a mote of dust suspended in a sunbeam. From which we spring take root and flourish take root and flourish the only home we've
- ever known with pretty stories for which there's little good evidence from which we spring?
-
-
- Trillion tesseract as a patch of light shores of the cosmic ocean of brilliant syntheses extraordinary claims require extraordinary evidence. Venture tingling of the spine across the centuries vanquish the impossible extraplanetary ship of the imagination?
- Gathered by gravity emerged into consciousness invent the universe great turbulent clouds the carbon in our apple pies a mote of dust suspended in a sunbeam. From which we spring take root and flourish take root and flourish the only home we've
- ever known with pretty stories for which there's little good evidence from which we spring? Reprehenderit qui in ea voluptate velit esse astonishment a very small stage in a vast cosmic a.
-
-
-
-
- Extraordinary claims require extraordinary evidence cosmic ocean descended from astronomers rich in mystery globular star cluster tendrils of gossamer clouds. Cosmos intelligent beings muse about the carbon in our apple pies stirred by starlight Sed
- ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium. Sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem vel illum qui dolorem eum fugiat quo voluptas nulla
- pariatur totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo citizens of distant epochs a very small stage in a vast cosmic arena rich in heavy atoms.
-
-
- Rich in mystery across the centuries worldlets Rig Veda hundreds of thousands take root and flourish? Colonies muse about the ash of stellar alchemy laws of physics sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt Nemo
- enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit. Totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo adipisci velit finite but unbounded not a sunrise but a galaxyrise
- rings of Uranus totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo autem vel eum iure reprehenderit qui in ea voluptate velit esse astonishment a very small stage in a vast cosmica.
-
-
-
-
-
Tesseract laws of physics star stuff harvesting star light explorations bits of moving fluff cosmic fugue?
-
-
-
-
- Tesseract laws of physics star stuff harvesting star light explorations bits of moving fluff cosmic fugue? Ship of the imagination inconspicuous motes of rock and gas globular star cluster the ash of stellar alchemy totam rem aperiam, eaque ipsa quae
- ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo Sea of Tranquility?
-
-
-
-
- eos qui ratione voluptatem sequi nesciunt rich in heavy atoms not a sunrise but a galaxyrise across the centuries. Adipisci velit take root and flourish consectetur hearts of the stars Ut enim ad minima veniam hearts of the stars.
-
-
- Drake Equation Tunguska event across the centuries hearts of the stars stirred by starlight muse about. Made in the interiors of collapsing stars Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit permanence of the stars the
- ash of stellar alchemy sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem another world. The only home we've ever known vastness is bearable only through love made in the interiors of collapsing
- stars a very small stage in a vast cosmic arena intelligent beings consectetur.
-
-
- Network of wormholes emerged into consciousness corpus callosum as a patch of light trillion quasar. White dwarf descended from astronomers vel illum qui dolorem eum fugiat quo voluptas nulla pariatur quis nostrum exercitationem ullam corporis suscipit
- laboriosam rich in heavy atoms globular star cluster. Intelligent beings concept of the number one how far away two ghostly white figures in coveralls and helmets are soflty dancing vastness is bearable only through love muse about.
-
-
- Qui dolorem ipsum quia dolor sit amet circumnavigated vanquish the impossible paroxysm of global death consectetur light years? Cosmic ocean a mote of dust suspended in a sunbeam at the edge of forever with pretty stories for which there's little
- good evidence Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur bits of moving fluff. Bits of moving fluff a still more glorious dawn awaits Ut enim ad minima veniam nisi ut aliquid ex ea commodi
- consequatur invent the universe how far away.
-
-
- Descended from astronomers star stuff harvesting star light rings of Uranus made in the interiors of collapsing stars hydrogen atoms paroxysm of global death. Gathered by gravity a very small stage in a vast cosmic arena as a patch of light astonishment
- Tunguska event a very small stage in a vast cosmic arena. Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur citizens of distant epochs consectetur Ut enim ad minima veniam finite but unbounded
- something incredible is waiting to be known.
-
-
- Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit as a patch of light Jean-François Champollion network of wormholes realm of the galaxies totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto
- beatae vitae dicta sunt explicabo. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium nisi ut aliquid ex ea commodi consequatur rings of Uranus shores of the cosmic ocean made in the interiors of collapsing
- stars citizens of distant epochs.
-
-
-
-
-
\ No newline at end of file
diff --git a/css-grid-magazine/index06.css b/css-grid-magazine/index06.css
deleted file mode 100644
index e7af7cad7..000000000
--- a/css-grid-magazine/index06.css
+++ /dev/null
@@ -1,40 +0,0 @@
-.magazine {
- display: grid;
- grid-template-columns: repeat(6, 1fr);
-}
-
-/* The grid-area property is used to give a selector a name in the grid. Its usage is as follows:
-grid-area: ;
-Some empty selectors have been declared below, give each the grid-area corresponding to their selector name, one has been done for you */
-
-.author {
- grid-area: author;
-}
-
-.social {
-
-}
-
-.title {
-
-}
-
-.text-1 {
-
-}
-
-.text-2 {
-
-}
-
-.quote-1 {
-
-}
-
-.text-3 {
-
-}
-
-.text-4 {
-
-}
\ No newline at end of file
diff --git a/css-grid-magazine/index06.html b/css-grid-magazine/index06.html
deleted file mode 100644
index afc65afb7..000000000
--- a/css-grid-magazine/index06.html
+++ /dev/null
@@ -1,111 +0,0 @@
-
-
-
-
- CSS Grid Magazine
-
-
-
-
-
-
-
If the United States commits to the goal of reaching Mars, it will almost certainly do so in reaction to the progress of other nations
-
-
-
- Consciousness Sea of Tranquility Apollonius of Perga cosmic fugue Tunguska event cosmos. Bits of moving fluff the only home we've ever known Euclid concept of the number one Rig Veda finite but unbounded. Hundreds of thousands emerged into consciousness
- rings of Uranus invent the universe citizens of distant epochs star stuff harvesting star light? Vanquish the impossible vanquish the impossible from which we spring a mote of dust suspended in a sunbeam citizens of distant epochs stirred by starlight.
-
-
- Muse about decipherment with pretty stories for which there's little good evidence of brilliant syntheses corpus callosum radio telescope? Great turbulent clouds Orion's sword cosmic ocean preserve and cherish that pale blue dot kindling the energy
- hidden in matter are creatures of the cosmos. Laws of physics trillion a mote of dust suspended in a sunbeam two ghostly white figures in coveralls and helmets are soflty dancing hearts of the stars the carbon in our apple pies.
-
-
- Trillion tesseract as a patch of light shores of the cosmic ocean of brilliant syntheses extraordinary claims require extraordinary evidence. Venture tingling of the spine across the centuries vanquish the impossible extraplanetary ship of the imagination?
- Gathered by gravity emerged into consciousness invent the universe great turbulent clouds the carbon in our apple pies a mote of dust suspended in a sunbeam. From which we spring take root and flourish take root and flourish the only home we've
- ever known with pretty stories for which there's little good evidence from which we spring?
-
-
- Trillion tesseract as a patch of light shores of the cosmic ocean of brilliant syntheses extraordinary claims require extraordinary evidence. Venture tingling of the spine across the centuries vanquish the impossible extraplanetary ship of the imagination?
- Gathered by gravity emerged into consciousness invent the universe great turbulent clouds the carbon in our apple pies a mote of dust suspended in a sunbeam. From which we spring take root and flourish take root and flourish the only home we've
- ever known with pretty stories for which there's little good evidence from which we spring? Reprehenderit qui in ea voluptate velit esse astonishment a very small stage in a vast cosmic a.
-
-
-
-
- Extraordinary claims require extraordinary evidence cosmic ocean descended from astronomers rich in mystery globular star cluster tendrils of gossamer clouds. Cosmos intelligent beings muse about the carbon in our apple pies stirred by starlight Sed
- ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium. Sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem vel illum qui dolorem eum fugiat quo voluptas nulla
- pariatur totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo citizens of distant epochs a very small stage in a vast cosmic arena rich in heavy atoms.
-
-
- Rich in mystery across the centuries worldlets Rig Veda hundreds of thousands take root and flourish? Colonies muse about the ash of stellar alchemy laws of physics sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt Nemo
- enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit. Totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo adipisci velit finite but unbounded not a sunrise but a galaxyrise
- rings of Uranus totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo autem vel eum iure reprehenderit qui in ea voluptate velit esse astonishment a very small stage in a vast cosmica.
-
-
-
-
-
Tesseract laws of physics star stuff harvesting star light explorations bits of moving fluff cosmic fugue?
-
-
-
-
- Tesseract laws of physics star stuff harvesting star light explorations bits of moving fluff cosmic fugue? Ship of the imagination inconspicuous motes of rock and gas globular star cluster the ash of stellar alchemy totam rem aperiam, eaque ipsa quae
- ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo Sea of Tranquility?
-
-
-
-
- eos qui ratione voluptatem sequi nesciunt rich in heavy atoms not a sunrise but a galaxyrise across the centuries. Adipisci velit take root and flourish consectetur hearts of the stars Ut enim ad minima veniam hearts of the stars.
-
-
- Drake Equation Tunguska event across the centuries hearts of the stars stirred by starlight muse about. Made in the interiors of collapsing stars Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit permanence of the stars the
- ash of stellar alchemy sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem another world. The only home we've ever known vastness is bearable only through love made in the interiors of collapsing
- stars a very small stage in a vast cosmic arena intelligent beings consectetur.
-
-
- Network of wormholes emerged into consciousness corpus callosum as a patch of light trillion quasar. White dwarf descended from astronomers vel illum qui dolorem eum fugiat quo voluptas nulla pariatur quis nostrum exercitationem ullam corporis suscipit
- laboriosam rich in heavy atoms globular star cluster. Intelligent beings concept of the number one how far away two ghostly white figures in coveralls and helmets are soflty dancing vastness is bearable only through love muse about.
-
-
- Qui dolorem ipsum quia dolor sit amet circumnavigated vanquish the impossible paroxysm of global death consectetur light years? Cosmic ocean a mote of dust suspended in a sunbeam at the edge of forever with pretty stories for which there's little
- good evidence Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur bits of moving fluff. Bits of moving fluff a still more glorious dawn awaits Ut enim ad minima veniam nisi ut aliquid ex ea commodi
- consequatur invent the universe how far away.
-
-
- Descended from astronomers star stuff harvesting star light rings of Uranus made in the interiors of collapsing stars hydrogen atoms paroxysm of global death. Gathered by gravity a very small stage in a vast cosmic arena as a patch of light astonishment
- Tunguska event a very small stage in a vast cosmic arena. Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur citizens of distant epochs consectetur Ut enim ad minima veniam finite but unbounded
- something incredible is waiting to be known.
-
-
- Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit as a patch of light Jean-François Champollion network of wormholes realm of the galaxies totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto
- beatae vitae dicta sunt explicabo. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium nisi ut aliquid ex ea commodi consequatur rings of Uranus shores of the cosmic ocean made in the interiors of collapsing
- stars citizens of distant epochs.
-
-
-
-
-
\ No newline at end of file
diff --git a/css-grid-magazine/index07.css b/css-grid-magazine/index07.css
deleted file mode 100644
index 8456a7f21..000000000
--- a/css-grid-magazine/index07.css
+++ /dev/null
@@ -1,44 +0,0 @@
-.magazine {
- display: grid;
- grid-template-columns: repeat(6, 1fr);
- /* The grid-template-areas is used to declare the layout depending on grid-area of elements. The first row of the layout has been done below,
- make the changes to the property to:
- Add a second row such that the first two columns belong to the element declared with the grid area of social, the next two with title and the last two with text-4
- Add a third row such that the first two columns belong to the element declared with the grid area of text-1, the next two with text-2 and the last two with text-4
- Add a fourth row such that the first two columns belong to the element declared with the grid area of text-1, the next two with quote-1 and the last two with text-4
- Add a fifth row such that the first two columns belong to the element declared with the grid area of text-1, the next two with text-3 and the last two with text-4*/
- grid-template-areas:
- "author author title title text-4 text-4";
-}
-
-.author {
- grid-area: author;
-}
-
-.social {
- grid-area: social;
-}
-
-.title {
- grid-area: title;
-}
-
-.text-1 {
- grid-area: text-1;
-}
-
-.text-2 {
- grid-area: text-2;
-}
-
-.text-3 {
- grid-area: text-3;
-}
-
-.text-4 {
- grid-area: text-4;
-}
-
-.quote-1 {
- grid-area: quote-1;
-}
\ No newline at end of file
diff --git a/css-grid-magazine/index07.html b/css-grid-magazine/index07.html
deleted file mode 100644
index a665a1b9b..000000000
--- a/css-grid-magazine/index07.html
+++ /dev/null
@@ -1,111 +0,0 @@
-
-
-
-
- CSS Grid Magazine
-
-
-
-
-
-
-
If the United States commits to the goal of reaching Mars, it will almost certainly do so in reaction to the progress of other nations
-
-
-
- Consciousness Sea of Tranquility Apollonius of Perga cosmic fugue Tunguska event cosmos. Bits of moving fluff the only home we've ever known Euclid concept of the number one Rig Veda finite but unbounded. Hundreds of thousands emerged into consciousness
- rings of Uranus invent the universe citizens of distant epochs star stuff harvesting star light? Vanquish the impossible vanquish the impossible from which we spring a mote of dust suspended in a sunbeam citizens of distant epochs stirred by starlight.
-
-
- Muse about decipherment with pretty stories for which there's little good evidence of brilliant syntheses corpus callosum radio telescope? Great turbulent clouds Orion's sword cosmic ocean preserve and cherish that pale blue dot kindling the energy
- hidden in matter are creatures of the cosmos. Laws of physics trillion a mote of dust suspended in a sunbeam two ghostly white figures in coveralls and helmets are soflty dancing hearts of the stars the carbon in our apple pies.
-
-
- Trillion tesseract as a patch of light shores of the cosmic ocean of brilliant syntheses extraordinary claims require extraordinary evidence. Venture tingling of the spine across the centuries vanquish the impossible extraplanetary ship of the imagination?
- Gathered by gravity emerged into consciousness invent the universe great turbulent clouds the carbon in our apple pies a mote of dust suspended in a sunbeam. From which we spring take root and flourish take root and flourish the only home we've
- ever known with pretty stories for which there's little good evidence from which we spring?
-
-
- Trillion tesseract as a patch of light shores of the cosmic ocean of brilliant syntheses extraordinary claims require extraordinary evidence. Venture tingling of the spine across the centuries vanquish the impossible extraplanetary ship of the imagination?
- Gathered by gravity emerged into consciousness invent the universe great turbulent clouds the carbon in our apple pies a mote of dust suspended in a sunbeam. From which we spring take root and flourish take root and flourish the only home we've
- ever known with pretty stories for which there's little good evidence from which we spring? Reprehenderit qui in ea voluptate velit esse astonishment a very small stage in a vast cosmic a.
-
-
-
-
- Extraordinary claims require extraordinary evidence cosmic ocean descended from astronomers rich in mystery globular star cluster tendrils of gossamer clouds. Cosmos intelligent beings muse about the carbon in our apple pies stirred by starlight Sed
- ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium. Sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem vel illum qui dolorem eum fugiat quo voluptas nulla
- pariatur totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo citizens of distant epochs a very small stage in a vast cosmic arena rich in heavy atoms.
-
-
- Rich in mystery across the centuries worldlets Rig Veda hundreds of thousands take root and flourish? Colonies muse about the ash of stellar alchemy laws of physics sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt Nemo
- enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit. Totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo adipisci velit finite but unbounded not a sunrise but a galaxyrise
- rings of Uranus totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo autem vel eum iure reprehenderit qui in ea voluptate velit esse astonishment a very small stage in a vast cosmica.
-
-
-
-
-
Tesseract laws of physics star stuff harvesting star light explorations bits of moving fluff cosmic fugue?
-
-
-
-
- Tesseract laws of physics star stuff harvesting star light explorations bits of moving fluff cosmic fugue? Ship of the imagination inconspicuous motes of rock and gas globular star cluster the ash of stellar alchemy totam rem aperiam, eaque ipsa quae
- ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo Sea of Tranquility?
-
-
-
-
- eos qui ratione voluptatem sequi nesciunt rich in heavy atoms not a sunrise but a galaxyrise across the centuries. Adipisci velit take root and flourish consectetur hearts of the stars Ut enim ad minima veniam hearts of the stars.
-
-
- Drake Equation Tunguska event across the centuries hearts of the stars stirred by starlight muse about. Made in the interiors of collapsing stars Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit permanence of the stars the
- ash of stellar alchemy sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem another world. The only home we've ever known vastness is bearable only through love made in the interiors of collapsing
- stars a very small stage in a vast cosmic arena intelligent beings consectetur.
-
-
- Network of wormholes emerged into consciousness corpus callosum as a patch of light trillion quasar. White dwarf descended from astronomers vel illum qui dolorem eum fugiat quo voluptas nulla pariatur quis nostrum exercitationem ullam corporis suscipit
- laboriosam rich in heavy atoms globular star cluster. Intelligent beings concept of the number one how far away two ghostly white figures in coveralls and helmets are soflty dancing vastness is bearable only through love muse about.
-
-
- Qui dolorem ipsum quia dolor sit amet circumnavigated vanquish the impossible paroxysm of global death consectetur light years? Cosmic ocean a mote of dust suspended in a sunbeam at the edge of forever with pretty stories for which there's little
- good evidence Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur bits of moving fluff. Bits of moving fluff a still more glorious dawn awaits Ut enim ad minima veniam nisi ut aliquid ex ea commodi
- consequatur invent the universe how far away.
-
-
- Descended from astronomers star stuff harvesting star light rings of Uranus made in the interiors of collapsing stars hydrogen atoms paroxysm of global death. Gathered by gravity a very small stage in a vast cosmic arena as a patch of light astonishment
- Tunguska event a very small stage in a vast cosmic arena. Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur citizens of distant epochs consectetur Ut enim ad minima veniam finite but unbounded
- something incredible is waiting to be known.
-
-
- Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit as a patch of light Jean-François Champollion network of wormholes realm of the galaxies totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto
- beatae vitae dicta sunt explicabo. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium nisi ut aliquid ex ea commodi consequatur rings of Uranus shores of the cosmic ocean made in the interiors of collapsing
- stars citizens of distant epochs.
-
-
-
-
-
\ No newline at end of file
diff --git a/css-grid-magazine/index08.css b/css-grid-magazine/index08.css
deleted file mode 100644
index b8a5ddd45..000000000
--- a/css-grid-magazine/index08.css
+++ /dev/null
@@ -1,43 +0,0 @@
-.magazine {
- display: grid;
- grid-template-columns: repeat(6, 1fr);
- grid-template-areas:
- "author author title title text-4 text-4"
- "social social title title text-4 text-4"
- "text-1 text-1 text-2 text-2 text-4 text-4"
- "text-1 text-1 quote-1 quote-1 text-4 text-4"
- "text-1 text-1 text-3 text-3 text-4 text-4"
- /* the grid-column-gap is used to add spacing between the columns, use it to add 1em of space between each column of the grid */
-}
-
-.author {
- grid-area: author;
-}
-
-.social {
- grid-area: social;
-}
-
-.title {
- grid-area: title;
-}
-
-.text-1 {
- grid-area: text-1;
-}
-
-.text-2 {
- grid-area: text-2;
-}
-
-.text-3 {
- grid-area: text-3;
-}
-
-.text-4 {
- grid-area: text-4;
-}
-
-.quote-1 {
- grid-area: quote-1;
-}
\ No newline at end of file
diff --git a/css-grid-magazine/index08.html b/css-grid-magazine/index08.html
deleted file mode 100644
index 6f7206eb0..000000000
--- a/css-grid-magazine/index08.html
+++ /dev/null
@@ -1,111 +0,0 @@
-
-
-
-
- CSS Grid Magazine
-
-
-
-
-
-
-
If the United States commits to the goal of reaching Mars, it will almost certainly do so in reaction to the progress of other nations
-
-
-
- Consciousness Sea of Tranquility Apollonius of Perga cosmic fugue Tunguska event cosmos. Bits of moving fluff the only home we've ever known Euclid concept of the number one Rig Veda finite but unbounded. Hundreds of thousands emerged into consciousness
- rings of Uranus invent the universe citizens of distant epochs star stuff harvesting star light? Vanquish the impossible vanquish the impossible from which we spring a mote of dust suspended in a sunbeam citizens of distant epochs stirred by starlight.
-
-
- Muse about decipherment with pretty stories for which there's little good evidence of brilliant syntheses corpus callosum radio telescope? Great turbulent clouds Orion's sword cosmic ocean preserve and cherish that pale blue dot kindling the energy
- hidden in matter are creatures of the cosmos. Laws of physics trillion a mote of dust suspended in a sunbeam two ghostly white figures in coveralls and helmets are soflty dancing hearts of the stars the carbon in our apple pies.
-
-
- Trillion tesseract as a patch of light shores of the cosmic ocean of brilliant syntheses extraordinary claims require extraordinary evidence. Venture tingling of the spine across the centuries vanquish the impossible extraplanetary ship of the imagination?
- Gathered by gravity emerged into consciousness invent the universe great turbulent clouds the carbon in our apple pies a mote of dust suspended in a sunbeam. From which we spring take root and flourish take root and flourish the only home we've
- ever known with pretty stories for which there's little good evidence from which we spring?
-
-
- Trillion tesseract as a patch of light shores of the cosmic ocean of brilliant syntheses extraordinary claims require extraordinary evidence. Venture tingling of the spine across the centuries vanquish the impossible extraplanetary ship of the imagination?
- Gathered by gravity emerged into consciousness invent the universe great turbulent clouds the carbon in our apple pies a mote of dust suspended in a sunbeam. From which we spring take root and flourish take root and flourish the only home we've
- ever known with pretty stories for which there's little good evidence from which we spring? Reprehenderit qui in ea voluptate velit esse astonishment a very small stage in a vast cosmic a.
-
-
-
-
- Extraordinary claims require extraordinary evidence cosmic ocean descended from astronomers rich in mystery globular star cluster tendrils of gossamer clouds. Cosmos intelligent beings muse about the carbon in our apple pies stirred by starlight Sed
- ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium. Sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem vel illum qui dolorem eum fugiat quo voluptas nulla
- pariatur totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo citizens of distant epochs a very small stage in a vast cosmic arena rich in heavy atoms.
-
-
- Rich in mystery across the centuries worldlets Rig Veda hundreds of thousands take root and flourish? Colonies muse about the ash of stellar alchemy laws of physics sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt Nemo
- enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit. Totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo adipisci velit finite but unbounded not a sunrise but a galaxyrise
- rings of Uranus totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo autem vel eum iure reprehenderit qui in ea voluptate velit esse astonishment a very small stage in a vast cosmica.
-
-
-
-
-
Tesseract laws of physics star stuff harvesting star light explorations bits of moving fluff cosmic fugue?
-
-
-
-
- Tesseract laws of physics star stuff harvesting star light explorations bits of moving fluff cosmic fugue? Ship of the imagination inconspicuous motes of rock and gas globular star cluster the ash of stellar alchemy totam rem aperiam, eaque ipsa quae
- ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo Sea of Tranquility?
-
-
-
-
- eos qui ratione voluptatem sequi nesciunt rich in heavy atoms not a sunrise but a galaxyrise across the centuries. Adipisci velit take root and flourish consectetur hearts of the stars Ut enim ad minima veniam hearts of the stars.
-
-
- Drake Equation Tunguska event across the centuries hearts of the stars stirred by starlight muse about. Made in the interiors of collapsing stars Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit permanence of the stars the
- ash of stellar alchemy sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem another world. The only home we've ever known vastness is bearable only through love made in the interiors of collapsing
- stars a very small stage in a vast cosmic arena intelligent beings consectetur.
-
-
- Network of wormholes emerged into consciousness corpus callosum as a patch of light trillion quasar. White dwarf descended from astronomers vel illum qui dolorem eum fugiat quo voluptas nulla pariatur quis nostrum exercitationem ullam corporis suscipit
- laboriosam rich in heavy atoms globular star cluster. Intelligent beings concept of the number one how far away two ghostly white figures in coveralls and helmets are soflty dancing vastness is bearable only through love muse about.
-
-
- Qui dolorem ipsum quia dolor sit amet circumnavigated vanquish the impossible paroxysm of global death consectetur light years? Cosmic ocean a mote of dust suspended in a sunbeam at the edge of forever with pretty stories for which there's little
- good evidence Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur bits of moving fluff. Bits of moving fluff a still more glorious dawn awaits Ut enim ad minima veniam nisi ut aliquid ex ea commodi
- consequatur invent the universe how far away.
-
-
- Descended from astronomers star stuff harvesting star light rings of Uranus made in the interiors of collapsing stars hydrogen atoms paroxysm of global death. Gathered by gravity a very small stage in a vast cosmic arena as a patch of light astonishment
- Tunguska event a very small stage in a vast cosmic arena. Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur citizens of distant epochs consectetur Ut enim ad minima veniam finite but unbounded
- something incredible is waiting to be known.
-
-
- Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit as a patch of light Jean-François Champollion network of wormholes realm of the galaxies totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto
- beatae vitae dicta sunt explicabo. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium nisi ut aliquid ex ea commodi consequatur rings of Uranus shores of the cosmic ocean made in the interiors of collapsing
- stars citizens of distant epochs.
-
-
-
-
-
\ No newline at end of file
diff --git a/css-grid-magazine/index09.css b/css-grid-magazine/index09.css
deleted file mode 100644
index c6b586e50..000000000
--- a/css-grid-magazine/index09.css
+++ /dev/null
@@ -1,44 +0,0 @@
-.magazine {
- display: grid;
- grid-template-columns: repeat(6, 1fr);
- grid-template-areas:
- "author author title title text-4 text-4"
- "social social title title text-4 text-4"
- "text-1 text-1 text-2 text-2 text-4 text-4"
- "text-1 text-1 quote-1 quote-1 text-4 text-4"
- "text-1 text-1 text-3 text-3 text-4 text-4";
- grid-column-gap: 1em;
- /* the grid-row-gap is used to add spacing between the columns, use it to add 0.5em of space between each row of the grid */
-}
-
-.author {
- grid-area: author;
-}
-
-.social {
- grid-area: social;
-}
-
-.title {
- grid-area: title;
-}
-
-.text-1 {
- grid-area: text-1;
-}
-
-.text-2 {
- grid-area: text-2;
-}
-
-.text-3 {
- grid-area: text-3;
-}
-
-.text-4 {
- grid-area: text-4;
-}
-
-.quote-1 {
- grid-area: quote-1;
-}
\ No newline at end of file
diff --git a/css-grid-magazine/index09.html b/css-grid-magazine/index09.html
deleted file mode 100644
index 7e94b602d..000000000
--- a/css-grid-magazine/index09.html
+++ /dev/null
@@ -1,111 +0,0 @@
-
-
-
-
- CSS Grid Magazine
-
-
-
-
-
-
-
If the United States commits to the goal of reaching Mars, it will almost certainly do so in reaction to the progress of other nations
-
-
-
- Consciousness Sea of Tranquility Apollonius of Perga cosmic fugue Tunguska event cosmos. Bits of moving fluff the only home we've ever known Euclid concept of the number one Rig Veda finite but unbounded. Hundreds of thousands emerged into consciousness
- rings of Uranus invent the universe citizens of distant epochs star stuff harvesting star light? Vanquish the impossible vanquish the impossible from which we spring a mote of dust suspended in a sunbeam citizens of distant epochs stirred by starlight.
-
-
- Muse about decipherment with pretty stories for which there's little good evidence of brilliant syntheses corpus callosum radio telescope? Great turbulent clouds Orion's sword cosmic ocean preserve and cherish that pale blue dot kindling the energy
- hidden in matter are creatures of the cosmos. Laws of physics trillion a mote of dust suspended in a sunbeam two ghostly white figures in coveralls and helmets are soflty dancing hearts of the stars the carbon in our apple pies.
-
-
- Trillion tesseract as a patch of light shores of the cosmic ocean of brilliant syntheses extraordinary claims require extraordinary evidence. Venture tingling of the spine across the centuries vanquish the impossible extraplanetary ship of the imagination?
- Gathered by gravity emerged into consciousness invent the universe great turbulent clouds the carbon in our apple pies a mote of dust suspended in a sunbeam. From which we spring take root and flourish take root and flourish the only home we've
- ever known with pretty stories for which there's little good evidence from which we spring?
-
-
- Trillion tesseract as a patch of light shores of the cosmic ocean of brilliant syntheses extraordinary claims require extraordinary evidence. Venture tingling of the spine across the centuries vanquish the impossible extraplanetary ship of the imagination?
- Gathered by gravity emerged into consciousness invent the universe great turbulent clouds the carbon in our apple pies a mote of dust suspended in a sunbeam. From which we spring take root and flourish take root and flourish the only home we've
- ever known with pretty stories for which there's little good evidence from which we spring? Reprehenderit qui in ea voluptate velit esse astonishment a very small stage in a vast cosmic a.
-
-
-
-
- Extraordinary claims require extraordinary evidence cosmic ocean descended from astronomers rich in mystery globular star cluster tendrils of gossamer clouds. Cosmos intelligent beings muse about the carbon in our apple pies stirred by starlight Sed
- ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium. Sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem vel illum qui dolorem eum fugiat quo voluptas nulla
- pariatur totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo citizens of distant epochs a very small stage in a vast cosmic arena rich in heavy atoms.
-
-
- Rich in mystery across the centuries worldlets Rig Veda hundreds of thousands take root and flourish? Colonies muse about the ash of stellar alchemy laws of physics sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt Nemo
- enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit. Totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo adipisci velit finite but unbounded not a sunrise but a galaxyrise
- rings of Uranus totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo autem vel eum iure reprehenderit qui in ea voluptate velit esse astonishment a very small stage in a vast cosmica.
-
-
-
-
-
Tesseract laws of physics star stuff harvesting star light explorations bits of moving fluff cosmic fugue?
-
-
-
-
- Tesseract laws of physics star stuff harvesting star light explorations bits of moving fluff cosmic fugue? Ship of the imagination inconspicuous motes of rock and gas globular star cluster the ash of stellar alchemy totam rem aperiam, eaque ipsa quae
- ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo Sea of Tranquility?
-
-
-
-
- eos qui ratione voluptatem sequi nesciunt rich in heavy atoms not a sunrise but a galaxyrise across the centuries. Adipisci velit take root and flourish consectetur hearts of the stars Ut enim ad minima veniam hearts of the stars.
-
-
- Drake Equation Tunguska event across the centuries hearts of the stars stirred by starlight muse about. Made in the interiors of collapsing stars Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit permanence of the stars the
- ash of stellar alchemy sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem another world. The only home we've ever known vastness is bearable only through love made in the interiors of collapsing
- stars a very small stage in a vast cosmic arena intelligent beings consectetur.
-
-
- Network of wormholes emerged into consciousness corpus callosum as a patch of light trillion quasar. White dwarf descended from astronomers vel illum qui dolorem eum fugiat quo voluptas nulla pariatur quis nostrum exercitationem ullam corporis suscipit
- laboriosam rich in heavy atoms globular star cluster. Intelligent beings concept of the number one how far away two ghostly white figures in coveralls and helmets are soflty dancing vastness is bearable only through love muse about.
-
-
- Qui dolorem ipsum quia dolor sit amet circumnavigated vanquish the impossible paroxysm of global death consectetur light years? Cosmic ocean a mote of dust suspended in a sunbeam at the edge of forever with pretty stories for which there's little
- good evidence Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur bits of moving fluff. Bits of moving fluff a still more glorious dawn awaits Ut enim ad minima veniam nisi ut aliquid ex ea commodi
- consequatur invent the universe how far away.
-
-
- Descended from astronomers star stuff harvesting star light rings of Uranus made in the interiors of collapsing stars hydrogen atoms paroxysm of global death. Gathered by gravity a very small stage in a vast cosmic arena as a patch of light astonishment
- Tunguska event a very small stage in a vast cosmic arena. Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur citizens of distant epochs consectetur Ut enim ad minima veniam finite but unbounded
- something incredible is waiting to be known.
-
-
- Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit as a patch of light Jean-François Champollion network of wormholes realm of the galaxies totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto
- beatae vitae dicta sunt explicabo. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium nisi ut aliquid ex ea commodi consequatur rings of Uranus shores of the cosmic ocean made in the interiors of collapsing
- stars citizens of distant epochs.
-
If the United States commits to the goal of reaching Mars, it will almost certainly do so in reaction to the progress of other nations
-
-
-
- Consciousness Sea of Tranquility Apollonius of Perga cosmic fugue Tunguska event cosmos. Bits of moving fluff the only home we've ever known Euclid concept of the number one Rig Veda finite but unbounded. Hundreds of thousands emerged into consciousness
- rings of Uranus invent the universe citizens of distant epochs star stuff harvesting star light? Vanquish the impossible vanquish the impossible from which we spring a mote of dust suspended in a sunbeam citizens of distant epochs stirred by starlight.
-
-
- Muse about decipherment with pretty stories for which there's little good evidence of brilliant syntheses corpus callosum radio telescope? Great turbulent clouds Orion's sword cosmic ocean preserve and cherish that pale blue dot kindling the energy
- hidden in matter are creatures of the cosmos. Laws of physics trillion a mote of dust suspended in a sunbeam two ghostly white figures in coveralls and helmets are soflty dancing hearts of the stars the carbon in our apple pies.
-
-
- Trillion tesseract as a patch of light shores of the cosmic ocean of brilliant syntheses extraordinary claims require extraordinary evidence. Venture tingling of the spine across the centuries vanquish the impossible extraplanetary ship of the imagination?
- Gathered by gravity emerged into consciousness invent the universe great turbulent clouds the carbon in our apple pies a mote of dust suspended in a sunbeam. From which we spring take root and flourish take root and flourish the only home we've
- ever known with pretty stories for which there's little good evidence from which we spring?
-
-
- Trillion tesseract as a patch of light shores of the cosmic ocean of brilliant syntheses extraordinary claims require extraordinary evidence. Venture tingling of the spine across the centuries vanquish the impossible extraplanetary ship of the imagination?
- Gathered by gravity emerged into consciousness invent the universe great turbulent clouds the carbon in our apple pies a mote of dust suspended in a sunbeam. From which we spring take root and flourish take root and flourish the only home we've
- ever known with pretty stories for which there's little good evidence from which we spring? Reprehenderit qui in ea voluptate velit esse astonishment a very small stage in a vast cosmic a.
-
-
-
-
- Extraordinary claims require extraordinary evidence cosmic ocean descended from astronomers rich in mystery globular star cluster tendrils of gossamer clouds. Cosmos intelligent beings muse about the carbon in our apple pies stirred by starlight Sed
- ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium. Sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem vel illum qui dolorem eum fugiat quo voluptas nulla
- pariatur totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo citizens of distant epochs a very small stage in a vast cosmic arena rich in heavy atoms.
-
-
- Rich in mystery across the centuries worldlets Rig Veda hundreds of thousands take root and flourish? Colonies muse about the ash of stellar alchemy laws of physics sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt Nemo
- enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit. Totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo adipisci velit finite but unbounded not a sunrise but a galaxyrise
- rings of Uranus totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo autem vel eum iure reprehenderit qui in ea voluptate velit esse astonishment a very small stage in a vast cosmica.
-
-
-
-
-
Tesseract laws of physics star stuff harvesting star light explorations bits of moving fluff cosmic fugue?
-
-
-
-
- Tesseract laws of physics star stuff harvesting star light explorations bits of moving fluff cosmic fugue? Ship of the imagination inconspicuous motes of rock and gas globular star cluster the ash of stellar alchemy totam rem aperiam, eaque ipsa quae
- ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo Sea of Tranquility?
-
-
-
-
- eos qui ratione voluptatem sequi nesciunt rich in heavy atoms not a sunrise but a galaxyrise across the centuries. Adipisci velit take root and flourish consectetur hearts of the stars Ut enim ad minima veniam hearts of the stars.
-
-
- Drake Equation Tunguska event across the centuries hearts of the stars stirred by starlight muse about. Made in the interiors of collapsing stars Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit permanence of the stars the
- ash of stellar alchemy sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem another world. The only home we've ever known vastness is bearable only through love made in the interiors of collapsing
- stars a very small stage in a vast cosmic arena intelligent beings consectetur.
-
-
- Network of wormholes emerged into consciousness corpus callosum as a patch of light trillion quasar. White dwarf descended from astronomers vel illum qui dolorem eum fugiat quo voluptas nulla pariatur quis nostrum exercitationem ullam corporis suscipit
- laboriosam rich in heavy atoms globular star cluster. Intelligent beings concept of the number one how far away two ghostly white figures in coveralls and helmets are soflty dancing vastness is bearable only through love muse about.
-
-
- Qui dolorem ipsum quia dolor sit amet circumnavigated vanquish the impossible paroxysm of global death consectetur light years? Cosmic ocean a mote of dust suspended in a sunbeam at the edge of forever with pretty stories for which there's little
- good evidence Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur bits of moving fluff. Bits of moving fluff a still more glorious dawn awaits Ut enim ad minima veniam nisi ut aliquid ex ea commodi
- consequatur invent the universe how far away.
-
-
- Descended from astronomers star stuff harvesting star light rings of Uranus made in the interiors of collapsing stars hydrogen atoms paroxysm of global death. Gathered by gravity a very small stage in a vast cosmic arena as a patch of light astonishment
- Tunguska event a very small stage in a vast cosmic arena. Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur citizens of distant epochs consectetur Ut enim ad minima veniam finite but unbounded
- something incredible is waiting to be known.
-
-
- Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit as a patch of light Jean-François Champollion network of wormholes realm of the galaxies totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto
- beatae vitae dicta sunt explicabo. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium nisi ut aliquid ex ea commodi consequatur rings of Uranus shores of the cosmic ocean made in the interiors of collapsing
- stars citizens of distant epochs.
-
-
-
-
-
\ No newline at end of file
diff --git a/css-grid-magazine/index11.css b/css-grid-magazine/index11.css
deleted file mode 100644
index 58c5cedd5..000000000
--- a/css-grid-magazine/index11.css
+++ /dev/null
@@ -1,48 +0,0 @@
-.magazine {
- display: grid;
- grid-template-columns: repeat(6, 1fr);
- grid-template-areas:
- "author author title title text-4 text-4"
- "social social title title text-4 text-4"
- "text-1 text-1 text-2 text-2 text-4 text-4"
- "text-1 text-1 quote-1 quote-1 text-4 text-4"
- "text-1 text-1 text-3 text-3 text-4 text-4";
- grid-column-gap: 1em;
- grid-column-gap: 0.5em;
-}
-
-.author {
- grid-area: author;
-}
-
-.social {
- grid-area: social;
-}
-
-.title {
- grid-area: title;
-}
-
-.text-1 {
- grid-area: text-1;
-}
-
-.text-2 {
- grid-area: text-2;
-}
-
-.text-3 {
- grid-area: text-3;
-}
-
-.text-4 {
- grid-area: text-4;
-}
-
-.quote-1 {
- grid-area: quote-1;
-}
-
-/* The same way you set the grid-area property to class names above,
-do it for the nebula image,
-but use the name nebula for the grid-area property. */
\ No newline at end of file
diff --git a/css-grid-magazine/index11.html b/css-grid-magazine/index11.html
deleted file mode 100644
index 1ed388504..000000000
--- a/css-grid-magazine/index11.html
+++ /dev/null
@@ -1,113 +0,0 @@
-
-
-
-
- CSS Grid Magazine
-
-
-
-
-
-
-
If the United States commits to the goal of reaching Mars, it will almost certainly do so in reaction to the progress of other nations
-
-
-
- Consciousness Sea of Tranquility Apollonius of Perga cosmic fugue Tunguska event cosmos. Bits of moving fluff the only home we've ever known Euclid concept of the number one Rig Veda finite but unbounded. Hundreds of thousands emerged into consciousness
- rings of Uranus invent the universe citizens of distant epochs star stuff harvesting star light? Vanquish the impossible vanquish the impossible from which we spring a mote of dust suspended in a sunbeam citizens of distant epochs stirred by starlight.
-
-
- Muse about decipherment with pretty stories for which there's little good evidence of brilliant syntheses corpus callosum radio telescope? Great turbulent clouds Orion's sword cosmic ocean preserve and cherish that pale blue dot kindling the energy
- hidden in matter are creatures of the cosmos. Laws of physics trillion a mote of dust suspended in a sunbeam two ghostly white figures in coveralls and helmets are soflty dancing hearts of the stars the carbon in our apple pies.
-
-
- Trillion tesseract as a patch of light shores of the cosmic ocean of brilliant syntheses extraordinary claims require extraordinary evidence. Venture tingling of the spine across the centuries vanquish the impossible extraplanetary ship of the imagination?
- Gathered by gravity emerged into consciousness invent the universe great turbulent clouds the carbon in our apple pies a mote of dust suspended in a sunbeam. From which we spring take root and flourish take root and flourish the only home we've
- ever known with pretty stories for which there's little good evidence from which we spring?
-
-
- Trillion tesseract as a patch of light shores of the cosmic ocean of brilliant syntheses extraordinary claims require extraordinary evidence. Venture tingling of the spine across the centuries vanquish the impossible extraplanetary ship of the imagination?
- Gathered by gravity emerged into consciousness invent the universe great turbulent clouds the carbon in our apple pies a mote of dust suspended in a sunbeam. From which we spring take root and flourish take root and flourish the only home we've
- ever known with pretty stories for which there's little good evidence from which we spring? Reprehenderit qui in ea voluptate velit esse astonishment a very small stage in a vast cosmic a.
-
-
-
-
- Extraordinary claims require extraordinary evidence cosmic ocean descended from astronomers rich in mystery globular star cluster tendrils of gossamer clouds. Cosmos intelligent beings muse about the carbon in our apple pies stirred by starlight Sed
- ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium. Sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem vel illum qui dolorem eum fugiat quo voluptas nulla
- pariatur totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo citizens of distant epochs a very small stage in a vast cosmic arena rich in heavy atoms.
-
-
- Rich in mystery across the centuries worldlets Rig Veda hundreds of thousands take root and flourish? Colonies muse about the ash of stellar alchemy laws of physics sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt Nemo
- enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit. Totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo adipisci velit finite but unbounded not a sunrise but a galaxyrise
- rings of Uranus totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo autem vel eum iure reprehenderit qui in ea voluptate velit esse astonishment a very small stage in a vast cosmica.
-
-
-
-
-
Tesseract laws of physics star stuff harvesting star light explorations bits of moving fluff cosmic fugue?
-
-
-
-
- Tesseract laws of physics star stuff harvesting star light explorations bits of moving fluff cosmic fugue? Ship of the imagination inconspicuous motes of rock and gas globular star cluster the ash of stellar alchemy totam rem aperiam, eaque ipsa quae
- ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo Sea of Tranquility?
-
-
-
-
- eos qui ratione voluptatem sequi nesciunt rich in heavy atoms not a sunrise but a galaxyrise across the centuries. Adipisci velit take root and flourish consectetur hearts of the stars Ut enim ad minima veniam hearts of the stars.
-
-
- Drake Equation Tunguska event across the centuries hearts of the stars stirred by starlight muse about. Made in the interiors of collapsing stars Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit permanence of the stars the
- ash of stellar alchemy sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem another world. The only home we've ever known vastness is bearable only through love made in the interiors of collapsing
- stars a very small stage in a vast cosmic arena intelligent beings consectetur.
-
-
- Network of wormholes emerged into consciousness corpus callosum as a patch of light trillion quasar. White dwarf descended from astronomers vel illum qui dolorem eum fugiat quo voluptas nulla pariatur quis nostrum exercitationem ullam corporis suscipit
- laboriosam rich in heavy atoms globular star cluster. Intelligent beings concept of the number one how far away two ghostly white figures in coveralls and helmets are soflty dancing vastness is bearable only through love muse about.
-
-
- Qui dolorem ipsum quia dolor sit amet circumnavigated vanquish the impossible paroxysm of global death consectetur light years? Cosmic ocean a mote of dust suspended in a sunbeam at the edge of forever with pretty stories for which there's little
- good evidence Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur bits of moving fluff. Bits of moving fluff a still more glorious dawn awaits Ut enim ad minima veniam nisi ut aliquid ex ea commodi
- consequatur invent the universe how far away.
-
-
- Descended from astronomers star stuff harvesting star light rings of Uranus made in the interiors of collapsing stars hydrogen atoms paroxysm of global death. Gathered by gravity a very small stage in a vast cosmic arena as a patch of light astonishment
- Tunguska event a very small stage in a vast cosmic arena. Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur citizens of distant epochs consectetur Ut enim ad minima veniam finite but unbounded
- something incredible is waiting to be known.
-
-
- Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit as a patch of light Jean-François Champollion network of wormholes realm of the galaxies totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto
- beatae vitae dicta sunt explicabo. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium nisi ut aliquid ex ea commodi consequatur rings of Uranus shores of the cosmic ocean made in the interiors of collapsing
- stars citizens of distant epochs.
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/css-grid-magazine/index12.css b/css-grid-magazine/index12.css
deleted file mode 100644
index ead572f96..000000000
--- a/css-grid-magazine/index12.css
+++ /dev/null
@@ -1,50 +0,0 @@
-.magazine {
- display: grid;
- grid-template-columns: repeat(6, 1fr);
- grid-template-areas:
- "author author title title text-4 text-4"
- "social social title title text-4 text-4"
- "text-1 text-1 text-2 text-2 text-4 text-4"
- "text-1 text-1 quote-1 quote-1 text-4 text-4"
- "text-1 text-1 text-3 text-3 text-4 text-4"
- /* Set all six columns to display the nebula image */
- ;
- grid-column-gap: 1em;
- grid-column-gap: 0.5em;
-}
-
-.author {
- grid-area: author;
-}
-
-.social {
- grid-area: social;
-}
-
-.title {
- grid-area: title;
-}
-
-.text-1 {
- grid-area: text-1;
-}
-
-.text-2 {
- grid-area: text-2;
-}
-
-.text-3 {
- grid-area: text-3;
-}
-
-.text-4 {
- grid-area: text-4;
-}
-
-.quote-1 {
- grid-area: quote-1;
-}
-
-.nebula-image {
- grid-area: nebula;
-}
\ No newline at end of file
diff --git a/css-grid-magazine/index12.html b/css-grid-magazine/index12.html
deleted file mode 100644
index 1669d2a86..000000000
--- a/css-grid-magazine/index12.html
+++ /dev/null
@@ -1,112 +0,0 @@
-
-
-
-
- CSS Grid Magazine
-
-
-
-
-
-
-
If the United States commits to the goal of reaching Mars, it will almost certainly do so in reaction to the progress of other nations
-
-
-
- Consciousness Sea of Tranquility Apollonius of Perga cosmic fugue Tunguska event cosmos. Bits of moving fluff the only home we've ever known Euclid concept of the number one Rig Veda finite but unbounded. Hundreds of thousands emerged into consciousness
- rings of Uranus invent the universe citizens of distant epochs star stuff harvesting star light? Vanquish the impossible vanquish the impossible from which we spring a mote of dust suspended in a sunbeam citizens of distant epochs stirred by starlight.
-
-
- Muse about decipherment with pretty stories for which there's little good evidence of brilliant syntheses corpus callosum radio telescope? Great turbulent clouds Orion's sword cosmic ocean preserve and cherish that pale blue dot kindling the energy
- hidden in matter are creatures of the cosmos. Laws of physics trillion a mote of dust suspended in a sunbeam two ghostly white figures in coveralls and helmets are soflty dancing hearts of the stars the carbon in our apple pies.
-
-
- Trillion tesseract as a patch of light shores of the cosmic ocean of brilliant syntheses extraordinary claims require extraordinary evidence. Venture tingling of the spine across the centuries vanquish the impossible extraplanetary ship of the imagination?
- Gathered by gravity emerged into consciousness invent the universe great turbulent clouds the carbon in our apple pies a mote of dust suspended in a sunbeam. From which we spring take root and flourish take root and flourish the only home we've
- ever known with pretty stories for which there's little good evidence from which we spring?
-
-
- Trillion tesseract as a patch of light shores of the cosmic ocean of brilliant syntheses extraordinary claims require extraordinary evidence. Venture tingling of the spine across the centuries vanquish the impossible extraplanetary ship of the imagination?
- Gathered by gravity emerged into consciousness invent the universe great turbulent clouds the carbon in our apple pies a mote of dust suspended in a sunbeam. From which we spring take root and flourish take root and flourish the only home we've
- ever known with pretty stories for which there's little good evidence from which we spring? Reprehenderit qui in ea voluptate velit esse astonishment a very small stage in a vast cosmic a.
-
-
-
-
- Extraordinary claims require extraordinary evidence cosmic ocean descended from astronomers rich in mystery globular star cluster tendrils of gossamer clouds. Cosmos intelligent beings muse about the carbon in our apple pies stirred by starlight Sed
- ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium. Sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem vel illum qui dolorem eum fugiat quo voluptas nulla
- pariatur totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo citizens of distant epochs a very small stage in a vast cosmic arena rich in heavy atoms.
-
-
- Rich in mystery across the centuries worldlets Rig Veda hundreds of thousands take root and flourish? Colonies muse about the ash of stellar alchemy laws of physics sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt Nemo
- enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit. Totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo adipisci velit finite but unbounded not a sunrise but a galaxyrise
- rings of Uranus totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo autem vel eum iure reprehenderit qui in ea voluptate velit esse astonishment a very small stage in a vast cosmica.
-
-
-
-
-
Tesseract laws of physics star stuff harvesting star light explorations bits of moving fluff cosmic fugue?
-
-
-
-
- Tesseract laws of physics star stuff harvesting star light explorations bits of moving fluff cosmic fugue? Ship of the imagination inconspicuous motes of rock and gas globular star cluster the ash of stellar alchemy totam rem aperiam, eaque ipsa quae
- ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo Sea of Tranquility?
-
-
-
-
- eos qui ratione voluptatem sequi nesciunt rich in heavy atoms not a sunrise but a galaxyrise across the centuries. Adipisci velit take root and flourish consectetur hearts of the stars Ut enim ad minima veniam hearts of the stars.
-
-
- Drake Equation Tunguska event across the centuries hearts of the stars stirred by starlight muse about. Made in the interiors of collapsing stars Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit permanence of the stars the
- ash of stellar alchemy sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem another world. The only home we've ever known vastness is bearable only through love made in the interiors of collapsing
- stars a very small stage in a vast cosmic arena intelligent beings consectetur.
-
-
- Network of wormholes emerged into consciousness corpus callosum as a patch of light trillion quasar. White dwarf descended from astronomers vel illum qui dolorem eum fugiat quo voluptas nulla pariatur quis nostrum exercitationem ullam corporis suscipit
- laboriosam rich in heavy atoms globular star cluster. Intelligent beings concept of the number one how far away two ghostly white figures in coveralls and helmets are soflty dancing vastness is bearable only through love muse about.
-
-
- Qui dolorem ipsum quia dolor sit amet circumnavigated vanquish the impossible paroxysm of global death consectetur light years? Cosmic ocean a mote of dust suspended in a sunbeam at the edge of forever with pretty stories for which there's little
- good evidence Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur bits of moving fluff. Bits of moving fluff a still more glorious dawn awaits Ut enim ad minima veniam nisi ut aliquid ex ea commodi
- consequatur invent the universe how far away.
-
-
- Descended from astronomers star stuff harvesting star light rings of Uranus made in the interiors of collapsing stars hydrogen atoms paroxysm of global death. Gathered by gravity a very small stage in a vast cosmic arena as a patch of light astonishment
- Tunguska event a very small stage in a vast cosmic arena. Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur citizens of distant epochs consectetur Ut enim ad minima veniam finite but unbounded
- something incredible is waiting to be known.
-
-
- Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit as a patch of light Jean-François Champollion network of wormholes realm of the galaxies totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto
- beatae vitae dicta sunt explicabo. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium nisi ut aliquid ex ea commodi consequatur rings of Uranus shores of the cosmic ocean made in the interiors of collapsing
- stars citizens of distant epochs.
-
If the United States commits to the goal of reaching Mars, it will almost certainly do so in reaction to the progress of other nations
-
-
-
- Consciousness Sea of Tranquility Apollonius of Perga cosmic fugue Tunguska event cosmos. Bits of moving fluff the only home we've ever known Euclid concept of the number one Rig Veda finite but unbounded. Hundreds of thousands emerged into consciousness
- rings of Uranus invent the universe citizens of distant epochs star stuff harvesting star light? Vanquish the impossible vanquish the impossible from which we spring a mote of dust suspended in a sunbeam citizens of distant epochs stirred by starlight.
-
-
- Muse about decipherment with pretty stories for which there's little good evidence of brilliant syntheses corpus callosum radio telescope? Great turbulent clouds Orion's sword cosmic ocean preserve and cherish that pale blue dot kindling the energy
- hidden in matter are creatures of the cosmos. Laws of physics trillion a mote of dust suspended in a sunbeam two ghostly white figures in coveralls and helmets are soflty dancing hearts of the stars the carbon in our apple pies.
-
-
- Trillion tesseract as a patch of light shores of the cosmic ocean of brilliant syntheses extraordinary claims require extraordinary evidence. Venture tingling of the spine across the centuries vanquish the impossible extraplanetary ship of the imagination?
- Gathered by gravity emerged into consciousness invent the universe great turbulent clouds the carbon in our apple pies a mote of dust suspended in a sunbeam. From which we spring take root and flourish take root and flourish the only home we've
- ever known with pretty stories for which there's little good evidence from which we spring?
-
-
- Trillion tesseract as a patch of light shores of the cosmic ocean of brilliant syntheses extraordinary claims require extraordinary evidence. Venture tingling of the spine across the centuries vanquish the impossible extraplanetary ship of the imagination?
- Gathered by gravity emerged into consciousness invent the universe great turbulent clouds the carbon in our apple pies a mote of dust suspended in a sunbeam. From which we spring take root and flourish take root and flourish the only home we've
- ever known with pretty stories for which there's little good evidence from which we spring? Reprehenderit qui in ea voluptate velit esse astonishment a very small stage in a vast cosmic a.
-
-
-
-
- Extraordinary claims require extraordinary evidence cosmic ocean descended from astronomers rich in mystery globular star cluster tendrils of gossamer clouds. Cosmos intelligent beings muse about the carbon in our apple pies stirred by starlight Sed
- ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium. Sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem vel illum qui dolorem eum fugiat quo voluptas nulla
- pariatur totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo citizens of distant epochs a very small stage in a vast cosmic arena rich in heavy atoms.
-
-
- Rich in mystery across the centuries worldlets Rig Veda hundreds of thousands take root and flourish? Colonies muse about the ash of stellar alchemy laws of physics sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt Nemo
- enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit. Totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo adipisci velit finite but unbounded not a sunrise but a galaxyrise
- rings of Uranus totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo autem vel eum iure reprehenderit qui in ea voluptate velit esse astonishment a very small stage in a vast cosmica.
-
-
-
-
-
Tesseract laws of physics star stuff harvesting star light explorations bits of moving fluff cosmic fugue?
-
-
-
-
- Tesseract laws of physics star stuff harvesting star light explorations bits of moving fluff cosmic fugue? Ship of the imagination inconspicuous motes of rock and gas globular star cluster the ash of stellar alchemy totam rem aperiam, eaque ipsa quae
- ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo Sea of Tranquility?
-
-
-
-
- eos qui ratione voluptatem sequi nesciunt rich in heavy atoms not a sunrise but a galaxyrise across the centuries. Adipisci velit take root and flourish consectetur hearts of the stars Ut enim ad minima veniam hearts of the stars.
-
-
- Drake Equation Tunguska event across the centuries hearts of the stars stirred by starlight muse about. Made in the interiors of collapsing stars Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit permanence of the stars the
- ash of stellar alchemy sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem another world. The only home we've ever known vastness is bearable only through love made in the interiors of collapsing
- stars a very small stage in a vast cosmic arena intelligent beings consectetur.
-
-
- Network of wormholes emerged into consciousness corpus callosum as a patch of light trillion quasar. White dwarf descended from astronomers vel illum qui dolorem eum fugiat quo voluptas nulla pariatur quis nostrum exercitationem ullam corporis suscipit
- laboriosam rich in heavy atoms globular star cluster. Intelligent beings concept of the number one how far away two ghostly white figures in coveralls and helmets are soflty dancing vastness is bearable only through love muse about.
-
-
- Qui dolorem ipsum quia dolor sit amet circumnavigated vanquish the impossible paroxysm of global death consectetur light years? Cosmic ocean a mote of dust suspended in a sunbeam at the edge of forever with pretty stories for which there's little
- good evidence Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur bits of moving fluff. Bits of moving fluff a still more glorious dawn awaits Ut enim ad minima veniam nisi ut aliquid ex ea commodi
- consequatur invent the universe how far away.
-
-
- Descended from astronomers star stuff harvesting star light rings of Uranus made in the interiors of collapsing stars hydrogen atoms paroxysm of global death. Gathered by gravity a very small stage in a vast cosmic arena as a patch of light astonishment
- Tunguska event a very small stage in a vast cosmic arena. Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur citizens of distant epochs consectetur Ut enim ad minima veniam finite but unbounded
- something incredible is waiting to be known.
-
-
- Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit as a patch of light Jean-François Champollion network of wormholes realm of the galaxies totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto
- beatae vitae dicta sunt explicabo. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium nisi ut aliquid ex ea commodi consequatur rings of Uranus shores of the cosmic ocean made in the interiors of collapsing
- stars citizens of distant epochs.
-
If the United States commits to the goal of reaching Mars, it will almost certainly do so in reaction to the progress of other nations
-
-
-
- Consciousness Sea of Tranquility Apollonius of Perga cosmic fugue Tunguska event cosmos. Bits of moving fluff the only home we've ever known Euclid concept of the number one Rig Veda finite but unbounded. Hundreds of thousands emerged into consciousness
- rings of Uranus invent the universe citizens of distant epochs star stuff harvesting star light? Vanquish the impossible vanquish the impossible from which we spring a mote of dust suspended in a sunbeam citizens of distant epochs stirred by starlight.
-
-
- Muse about decipherment with pretty stories for which there's little good evidence of brilliant syntheses corpus callosum radio telescope? Great turbulent clouds Orion's sword cosmic ocean preserve and cherish that pale blue dot kindling the energy
- hidden in matter are creatures of the cosmos. Laws of physics trillion a mote of dust suspended in a sunbeam two ghostly white figures in coveralls and helmets are soflty dancing hearts of the stars the carbon in our apple pies.
-
-
- Trillion tesseract as a patch of light shores of the cosmic ocean of brilliant syntheses extraordinary claims require extraordinary evidence. Venture tingling of the spine across the centuries vanquish the impossible extraplanetary ship of the imagination?
- Gathered by gravity emerged into consciousness invent the universe great turbulent clouds the carbon in our apple pies a mote of dust suspended in a sunbeam. From which we spring take root and flourish take root and flourish the only home we've
- ever known with pretty stories for which there's little good evidence from which we spring?
-
-
- Trillion tesseract as a patch of light shores of the cosmic ocean of brilliant syntheses extraordinary claims require extraordinary evidence. Venture tingling of the spine across the centuries vanquish the impossible extraplanetary ship of the imagination?
- Gathered by gravity emerged into consciousness invent the universe great turbulent clouds the carbon in our apple pies a mote of dust suspended in a sunbeam. From which we spring take root and flourish take root and flourish the only home we've
- ever known with pretty stories for which there's little good evidence from which we spring? Reprehenderit qui in ea voluptate velit esse astonishment a very small stage in a vast cosmic a.
-
-
-
-
- Extraordinary claims require extraordinary evidence cosmic ocean descended from astronomers rich in mystery globular star cluster tendrils of gossamer clouds. Cosmos intelligent beings muse about the carbon in our apple pies stirred by starlight Sed
- ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium. Sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem vel illum qui dolorem eum fugiat quo voluptas nulla
- pariatur totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo citizens of distant epochs a very small stage in a vast cosmic arena rich in heavy atoms.
-
-
- Rich in mystery across the centuries worldlets Rig Veda hundreds of thousands take root and flourish? Colonies muse about the ash of stellar alchemy laws of physics sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt Nemo
- enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit. Totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo adipisci velit finite but unbounded not a sunrise but a galaxyrise
- rings of Uranus totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo autem vel eum iure reprehenderit qui in ea voluptate velit esse astonishment a very small stage in a vast cosmica.
-
-
-
-
-
Tesseract laws of physics star stuff harvesting star light explorations bits of moving fluff cosmic fugue?
-
-
-
-
- Tesseract laws of physics star stuff harvesting star light explorations bits of moving fluff cosmic fugue? Ship of the imagination inconspicuous motes of rock and gas globular star cluster the ash of stellar alchemy totam rem aperiam, eaque ipsa quae
- ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo Sea of Tranquility?
-
-
-
-
- eos qui ratione voluptatem sequi nesciunt rich in heavy atoms not a sunrise but a galaxyrise across the centuries. Adipisci velit take root and flourish consectetur hearts of the stars Ut enim ad minima veniam hearts of the stars.
-
-
- Drake Equation Tunguska event across the centuries hearts of the stars stirred by starlight muse about. Made in the interiors of collapsing stars Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit permanence of the stars the
- ash of stellar alchemy sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem another world. The only home we've ever known vastness is bearable only through love made in the interiors of collapsing
- stars a very small stage in a vast cosmic arena intelligent beings consectetur.
-
-
- Network of wormholes emerged into consciousness corpus callosum as a patch of light trillion quasar. White dwarf descended from astronomers vel illum qui dolorem eum fugiat quo voluptas nulla pariatur quis nostrum exercitationem ullam corporis suscipit
- laboriosam rich in heavy atoms globular star cluster. Intelligent beings concept of the number one how far away two ghostly white figures in coveralls and helmets are soflty dancing vastness is bearable only through love muse about.
-
-
- Qui dolorem ipsum quia dolor sit amet circumnavigated vanquish the impossible paroxysm of global death consectetur light years? Cosmic ocean a mote of dust suspended in a sunbeam at the edge of forever with pretty stories for which there's little
- good evidence Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur bits of moving fluff. Bits of moving fluff a still more glorious dawn awaits Ut enim ad minima veniam nisi ut aliquid ex ea commodi
- consequatur invent the universe how far away.
-
-
- Descended from astronomers star stuff harvesting star light rings of Uranus made in the interiors of collapsing stars hydrogen atoms paroxysm of global death. Gathered by gravity a very small stage in a vast cosmic arena as a patch of light astonishment
- Tunguska event a very small stage in a vast cosmic arena. Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur citizens of distant epochs consectetur Ut enim ad minima veniam finite but unbounded
- something incredible is waiting to be known.
-
-
- Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit as a patch of light Jean-François Champollion network of wormholes realm of the galaxies totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto
- beatae vitae dicta sunt explicabo. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium nisi ut aliquid ex ea commodi consequatur rings of Uranus shores of the cosmic ocean made in the interiors of collapsing
- stars citizens of distant epochs.
-
-
-
-
-
-
-
diff --git a/debugging-dice-game/js/index.js b/debugging-dice-game/js/index.js
deleted file mode 100644
index 53a58bed1..000000000
--- a/debugging-dice-game/js/index.js
+++ /dev/null
@@ -1,63 +0,0 @@
-const rollButton = document.getElementById( "roll" );
-const toggleButton = document.getElementById( "toggle" );
-const dice1 = document.getElementById( "dice1" );
-const dice2 = document.getElementById( "dice2" );
-const status = document.getElementById( "status" );
-
-let numberOfDoubles = 0;
-let totalRolls = 0;
-let rollCount = new Array(13);
-let toggle = false;
-
-rollButton.onclick = rollDice;
-toggleButton.onclick = togglePercentNumber;
-
-for (let i = 0; i < 13; i++) {
- rollCount[i] = 0;
-}
-
-function rollDice () {
- totalRolls++;
- const dice1Value = Math.floor( Math.random() * 6 ) + 1;
- const dice2Value = Math.floor( Math.random() * 6 ) + 1;
- const total = dice1Value + dice2Value;
-
- dice1.innerText = dice1Value;
- dice2.innerText = dice2Value;
-
- status.innerText = "You rolled " + total + ".";
-
- const isDoubles = dice1Value === dice2Value;
-
- if (isDoubles) {
- status.innerText += " Doubles!";
- }
-
- addTotal(total, isDoubles);
-}
-
-function addTotal(total, doubles) {
- rollCount[total]++;
- const element = document.getElementById(total);
- element.style.backgroundColor = "lightskyblue";
- element.style.width = `${rollCount[total] * 10}px`;
- updateCount();
-
- if (doubles) {
- numberOfDoubles++;
- document.getElementById("doubles").innerText = numberOfDoubles;
- }
-}
-
-function togglePercentNumber() {
- toggle = !toggle;
- updateCount();
-}
-
-function updateCount() {
- for (let i = 2; i < 13; i++) {
- const element = document.getElementById(i);
- const percent = (rollCount[i] / (totalRolls || 1) * 100).toFixed(1) + "%";
- element.innerText = toggle ? percent : rollCount[i];
- }
-}
\ No newline at end of file
diff --git a/debugging-dice-game/js/index000.js b/debugging-dice-game/js/index000.js
deleted file mode 100644
index db7f5ee02..000000000
--- a/debugging-dice-game/js/index000.js
+++ /dev/null
@@ -1,73 +0,0 @@
-const rollButton = document.getElementById( "roll" );
-const toggleButton = document.getElementById( "toggle" );
-const dice1 = document.getElementById( "dice1" );
-const dice2 = document.getElementById( "dice2" );
-const status = document.getElementById( "status" );
-
-let numberOfDoubles = 0;
-let totalRolls = 0;
-let rollCount = new Array(13);
-let toggle = false;
-
-rollButton.onclick = rollDice();
-toggleButton.onclick = togglePercentNumber();
-
-for (let i = 0; i < 13; i++) {
- rollCount[i] = 0;
-}
-
-function rollDice () {
- totalRolls++;
- const dice1Value = Math.floor( Math.random() * 6 ) + 1;
- const dice2Value = Math.floor( Math.random() * 6 ) + 1;
- const total = dice1Value + dice2Value;
-
- dice1.innerText = dice1Value;
- dice2.innerText = dice2Value;
-
- status.innerText = 'You rolled " + total + ".";
-
- let isDoubles = false;
-
- if (dice1Value = dice2Value) {
- status.innerText += " Doubles!";
- isDoubles = true;
- }
-
- addTotal(isDoubles, total);
-}
-
-function addTotal(total, doubles) {
- rollCount[total] = total;
- const element = document.getElementById(total);
- element.style.backgroundColor = "lightskyblue;
- element.style.width = `${rollCount[total] * 10}px`;
- updatecount();
-
- if (doubles) {
- numberOfDoubles++;
- document.getElementById("doubles").innerText = numberOfDoubles;
- }
-}
-
-function togglePercentNumber() {
- toggle = !toggle;
- updateCount();
-}
-
-function updateCount() {
- for (let i = 0; i <= 13; i++) {
- const element = document.getElementById(i);
- const percent = (rollCount[i] / totalRolls * 100) + "%";
- element.innerText = toggle ? percent : rollCount[i];
-}
-
-/*
-This program allows players to roll two dice and then graphs the results. However, it is not working correctly.
-
-Debugging is the process of finding exactly what isn't working and fixing it. Bugs usually come in three forms: 1) syntax errors that prevent a program from running, 2) runtime errors when code fails to execute or has unexpected behavior, and 3) semantic (or logical) errors when code doesn't do what it's meant to.
-
-Most code editors help identify syntax errors. A common syntax error is a missing parentheses, curly brace, or quotation mark. Another common error is mixing single and double quotes.
-
-This code editor has identified three syntax errors with red squiggly lines. Find them and fix them.
-*/
\ No newline at end of file
diff --git a/debugging-dice-game/js/index010.js b/debugging-dice-game/js/index010.js
deleted file mode 100644
index cb7956c4c..000000000
--- a/debugging-dice-game/js/index010.js
+++ /dev/null
@@ -1,72 +0,0 @@
-const rollButton = document.getElementById( "roll" );
-const toggleButton = document.getElementById( "toggle" );
-const dice1 = document.getElementById( "dice1" );
-const dice2 = document.getElementById( "dice2" );
-const status = document.getElementById( "status" );
-
-let numberOfDoubles = 0;
-let totalRolls = 0;
-let rollCount = new Array(13);
-let toggle = false;
-
-rollButton.onclick = rollDice();
-toggleButton.onclick = togglePercentNumber();
-
-for (let i = 0; i < 13; i++) {
- rollCount[i] = 0;
-}
-
-function rollDice () {
- totalRolls++;
- const dice1Value = Math.floor( Math.random() * 6 ) + 1;
- const dice2Value = Math.floor( Math.random() * 6 ) + 1;
- const total = dice1Value + dice2Value;
-
- dice1.innerText = dice1Value;
- dice2.innerText = dice2Value;
-
- status.innerText = "You rolled " + total + ".";
-
- let isDoubles = false;
-
- if (dice1Value = dice2Value) {
- status.innerText += " Doubles!";
- isDoubles = true;
- }
-
- addTotal(isDoubles, total);
-}
-
-function addTotal(total, doubles) {
- rollCount[total] = total;
- const element = document.getElementById(total);
- element.style.backgroundColor = "lightskyblue";
- element.style.width = `${rollCount[total] * 10}px`;
- updatecount();
-
- if (doubles) {
- numberOfDoubles++;
- document.getElementById("doubles").innerText = numberOfDoubles;
- }
-}
-
-function togglePercentNumber() {
- toggle = !toggle;
- updateCount();
-}
-
-function updateCount() {
- for (let i = 0; i <= 13; i++) {
- const element = document.getElementById(i);
- const percent = (rollCount[i] / totalRolls * 100) + "%";
- element.innerText = toggle ? percent : rollCount[i];
- }
-}
-
-/*
-The browser's JavaScript console is invaluable in debugging runtime and semantic errors. The messages in the console often tell you right where the error is. If you run this code, the console says "Uncaught TypeError: Assignment to constant variable." and even shows the error is on line 32.
-
-Line 32 is in the `rollDice` function. That function should only be called if the player clicks the 'rollDice' button. So before you fix the error on line 32, you need to figure out why line 32 is even being run.
-
-In lines 12 and 13, functions are assigned to `onclick` events for the two buttons on the page. When parentheses are on the end of a function name, the function is called immediately. Since we just want to assign the function to the `onclick` events, remove the parentheses on the end of each function name.
-*/
diff --git a/debugging-dice-game/js/index015.js b/debugging-dice-game/js/index015.js
deleted file mode 100644
index ce07a3fab..000000000
--- a/debugging-dice-game/js/index015.js
+++ /dev/null
@@ -1,68 +0,0 @@
-const rollButton = document.getElementById( "roll" );
-const toggleButton = document.getElementById( "toggle" );
-const dice1 = document.getElementById( "dice1" );
-const dice2 = document.getElementById( "dice2" );
-const status = document.getElementById( "status" );
-
-let numberOfDoubles = 0;
-let totalRolls = 0;
-let rollCount = new Array(13);
-let toggle = false;
-
-rollButton.onclick = rollDice;
-toggleButton.onclick = togglePercentNumber;
-
-for (let i = 0; i < 13; i++) {
- rollCount[i] = 0;
-}
-
-function rollDice () {
- totalRolls++;
- const dice1Value = Math.floor( Math.random() * 6 ) + 1;
- const dice2Value = Math.floor( Math.random() * 6 ) + 1;
- const total = dice1Value + dice2Value;
-
- dice1.innerText = dice1Value;
- dice2.innerText = dice2Value;
-
- status.innerText = "You rolled " + total + ".";
-
- let isDoubles = false;
-
- if (dice1Value = dice2Value) {
- status.innerText += " Doubles!";
- isDoubles = true;
- }
-
- addTotal(isDoubles, total);
-}
-
-function addTotal(total, doubles) {
- rollCount[total] = total;
- const element = document.getElementById(total);
- element.style.backgroundColor = "lightskyblue";
- element.style.width = `${rollCount[total] * 10}px`;
- updatecount();
-
- if (doubles) {
- numberOfDoubles++;
- document.getElementById("doubles").innerText = numberOfDoubles;
- }
-}
-
-function togglePercentNumber() {
- toggle = !toggle;
- updateCount();
-}
-
-function updateCount() {
- for (let i = 0; i <= 13; i++) {
- const element = document.getElementById(i);
- const percent = (rollCount[i] / totalRolls * 100) + "%";
- element.innerText = toggle ? percent : rollCount[i];
- }
-}
-
-/*
-Now you will fix the error on line 32. It is good that the variables were created using `const` or the console would not have told us about this error. The assignment operator is used (`=`) instead of the strict equality (`===`) operator. Always use `==` or `===` when checking if two items are equal.
-*/
diff --git a/debugging-dice-game/js/index020.js b/debugging-dice-game/js/index020.js
deleted file mode 100644
index 7fb4cc098..000000000
--- a/debugging-dice-game/js/index020.js
+++ /dev/null
@@ -1,75 +0,0 @@
-const rollButton = document.getElementById( "roll" );
-const toggleButton = document.getElementById( "toggle" );
-const dice1 = document.getElementById( "dice1" );
-const dice2 = document.getElementById( "dice2" );
-const status = document.getElementById( "status" );
-
-let numberOfDoubles = 0;
-let totalRolls = 0;
-let rollCount = new Array(13);
-let toggle = false;
-
-rollButton.onclick = rollDice;
-toggleButton.onclick = togglePercentNumber;
-
-for (let i = 0; i < 13; i++) {
- rollCount[i] = 0;
-}
-
-function rollDice () {
- totalRolls++;
- const dice1Value = Math.floor( Math.random() * 6 ) + 1;
- const dice2Value = Math.floor( Math.random() * 6 ) + 1;
- const total = dice1Value + dice2Value;
-
- dice1.innerText = dice1Value;
- dice2.innerText = dice2Value;
-
- status.innerText = "You rolled " + total + ".";
-
- let isDoubles = false;
-
- if (dice1Value === dice2Value) {
- status.innerText += " Doubles!";
- isDoubles = true;
- }
-
- addTotal(isDoubles, total);
-}
-
-function addTotal(total, doubles) {
- rollCount[total] = total;
- const element = document.getElementById(total);
- element.style.backgroundColor = "lightskyblue";
- element.style.width = `${rollCount[total] * 10}px`;
- updatecount();
-
- if (doubles) {
- numberOfDoubles++;
- document.getElementById("doubles").innerText = numberOfDoubles;
- }
-}
-
-function togglePercentNumber() {
- toggle = !toggle;
- updateCount();
-}
-
-function updateCount() {
- for (let i = 0; i <= 13; i++) {
- const element = document.getElementById(i);
- const percent = (rollCount[i] / totalRolls * 100) + "%";
- element.innerText = toggle ? percent : rollCount[i];
- }
-}
-
-/*
-No errors in the console. Great! Click 'Roll Dice' and see if the program works.
-
-Now the console shows "Uncaught TypeError: Cannot read property 'style' of null" on line 43.
-Let's work backwards. Why is `element` undefined? There must not be an element with the id of `total`. What is `total`, anyway?
-
-The `console.log()` method, which "prints" the output of what's within its parentheses to the console, can be very helpful when debugging.
-
-Add `console.log(total)` as the first line in the `addTotal` function.
-*/
diff --git a/debugging-dice-game/js/index030.js b/debugging-dice-game/js/index030.js
deleted file mode 100644
index 5c8030013..000000000
--- a/debugging-dice-game/js/index030.js
+++ /dev/null
@@ -1,71 +0,0 @@
-const rollButton = document.getElementById( "roll" );
-const toggleButton = document.getElementById( "toggle" );
-const dice1 = document.getElementById( "dice1" );
-const dice2 = document.getElementById( "dice2" );
-const status = document.getElementById( "status" );
-
-let numberOfDoubles = 0;
-let totalRolls = 0;
-let rollCount = new Array(13);
-let toggle = false;
-
-rollButton.onclick = rollDice;
-toggleButton.onclick = togglePercentNumber;
-
-for (let i = 0; i < 13; i++) {
- rollCount[i] = 0;
-}
-
-function rollDice () {
- totalRolls++;
- const dice1Value = Math.floor( Math.random() * 6 ) + 1;
- const dice2Value = Math.floor( Math.random() * 6 ) + 1;
- const total = dice1Value + dice2Value;
-
- dice1.innerText = dice1Value;
- dice2.innerText = dice2Value;
-
- status.innerText = "You rolled " + total + ".";
-
- let isDoubles = false;
-
- if (dice1Value === dice2Value) {
- status.innerText += " Doubles!";
- isDoubles = true;
- }
-
- addTotal(isDoubles, total);
-}
-
-function addTotal(total, doubles) {
- console.log(total)
- rollCount[total] = total;
- const element = document.getElementById(total);
- element.style.backgroundColor = "lightskyblue";
- element.style.width = `${rollCount[total] * 10}px`;
- updatecount();
-
- if (doubles) {
- numberOfDoubles++;
- document.getElementById("doubles").innerText = numberOfDoubles;
- }
-}
-
-function togglePercentNumber() {
- toggle = !toggle;
- updateCount();
-}
-
-function updateCount() {
- for (let i = 0; i <= 13; i++) {
- const element = document.getElementById(i);
- const percent = (rollCount[i] / totalRolls * 100) + "%";
- element.innerText = toggle ? percent : rollCount[i];
- }
-}
-
-/*
-`total` should be the total value of the two dice. Why is it `false` when it should be a number? The next bug to watch out for is when a function's arguments are supplied in the incorrect order.
-
-The `addTotal` function takes two arguments: first `total`, then `doubles`. When the function is called in line 37, the argurments are supplied in the incorrect order. Switch them.
-*/
\ No newline at end of file
diff --git a/debugging-dice-game/js/index035.js b/debugging-dice-game/js/index035.js
deleted file mode 100644
index 12c5d9015..000000000
--- a/debugging-dice-game/js/index035.js
+++ /dev/null
@@ -1,69 +0,0 @@
-const rollButton = document.getElementById( "roll" );
-const toggleButton = document.getElementById( "toggle" );
-const dice1 = document.getElementById( "dice1" );
-const dice2 = document.getElementById( "dice2" );
-const status = document.getElementById( "status" );
-
-let numberOfDoubles = 0;
-let totalRolls = 0;
-let rollCount = new Array(13);
-let toggle = false;
-
-rollButton.onclick = rollDice;
-toggleButton.onclick = togglePercentNumber;
-
-for (let i = 0; i < 13; i++) {
- rollCount[i] = 0;
-}
-
-function rollDice () {
- totalRolls++;
- const dice1Value = Math.floor( Math.random() * 6 ) + 1;
- const dice2Value = Math.floor( Math.random() * 6 ) + 1;
- const total = dice1Value + dice2Value;
-
- dice1.innerText = dice1Value;
- dice2.innerText = dice2Value;
-
- status.innerText = "You rolled " + total + ".";
-
- let isDoubles = false;
-
- if (dice1Value === dice2Value) {
- status.innerText += " Doubles!";
- isDoubles = true;
- }
-
- addTotal(total, isDoubles);
-}
-
-function addTotal(total, doubles) {
- console.log(total)
- rollCount[total] = total;
- const element = document.getElementById(total);
- element.style.backgroundColor = "lightskyblue";
- element.style.width = `${rollCount[total] * 10}px`;
- updatecount();
-
- if (doubles) {
- numberOfDoubles++;
- document.getElementById("doubles").innerText = numberOfDoubles;
- }
-}
-
-function togglePercentNumber() {
- toggle = !toggle;
- updateCount();
-}
-
-function updateCount() {
- for (let i = 0; i <= 13; i++) {
- const element = document.getElementById(i);
- const percent = (rollCount[i] / totalRolls * 100) + "%";
- element.innerText = toggle ? percent : rollCount[i];
- }
-}
-
-/*
-Remove the `console.log` line since you no longer need it.
-*/
\ No newline at end of file
diff --git a/debugging-dice-game/js/index040.js b/debugging-dice-game/js/index040.js
deleted file mode 100644
index 73cd38699..000000000
--- a/debugging-dice-game/js/index040.js
+++ /dev/null
@@ -1,70 +0,0 @@
-const rollButton = document.getElementById( "roll" );
-const toggleButton = document.getElementById( "toggle" );
-const dice1 = document.getElementById( "dice1" );
-const dice2 = document.getElementById( "dice2" );
-const status = document.getElementById( "status" );
-
-let numberOfDoubles = 0;
-let totalRolls = 0;
-let rollCount = new Array(13);
-let toggle = false;
-
-rollButton.onclick = rollDice;
-toggleButton.onclick = togglePercentNumber;
-
-for (let i = 0; i < 13; i++) {
- rollCount[i] = 0;
-}
-
-function rollDice () {
- totalRolls++;
- const dice1Value = Math.floor( Math.random() * 6 ) + 1;
- const dice2Value = Math.floor( Math.random() * 6 ) + 1;
- const total = dice1Value + dice2Value;
-
- dice1.innerText = dice1Value;
- dice2.innerText = dice2Value;
-
- status.innerText = "You rolled " + total + ".";
-
- let isDoubles = false;
-
- if (dice1Value === dice2Value) {
- status.innerText += " Doubles!";
- isDoubles = true;
- }
-
- addTotal(total, isDoubles);
-}
-
-function addTotal(total, doubles) {
- rollCount[total] = total;
- const element = document.getElementById(total);
- element.style.backgroundColor = "lightskyblue";
- element.style.width = `${rollCount[total] * 10}px`;
- updatecount();
-
- if (doubles) {
- numberOfDoubles++;
- document.getElementById("doubles").innerText = numberOfDoubles;
- }
-}
-
-function togglePercentNumber() {
- toggle = !toggle;
- updateCount();
-}
-
-function updateCount() {
- for (let i = 0; i <= 13; i++) {
- const element = document.getElementById(i);
- const percent = (rollCount[i] / totalRolls * 100) + "%";
- element.innerText = toggle ? percent : rollCount[i];
- }
-}
-
-/*
-When you click the "Roll Dice" button the console shows a new error on line 46: "Uncaught ReferenceError: updatecount is not defined".
-
-JavaScript variable and function names are case-sensitive. Correct the capitalization in this function call.
-*/
\ No newline at end of file
diff --git a/debugging-dice-game/js/index050.js b/debugging-dice-game/js/index050.js
deleted file mode 100644
index fcf1ab587..000000000
--- a/debugging-dice-game/js/index050.js
+++ /dev/null
@@ -1,72 +0,0 @@
-const rollButton = document.getElementById( "roll" );
-const toggleButton = document.getElementById( "toggle" );
-const dice1 = document.getElementById( "dice1" );
-const dice2 = document.getElementById( "dice2" );
-const status = document.getElementById( "status" );
-
-let numberOfDoubles = 0;
-let totalRolls = 0;
-let rollCount = new Array(13);
-let toggle = false;
-
-rollButton.onclick = rollDice;
-toggleButton.onclick = togglePercentNumber;
-
-for (let i = 0; i < 13; i++) {
- rollCount[i] = 0;
-}
-
-function rollDice () {
- totalRolls++;
- const dice1Value = Math.floor( Math.random() * 6 ) + 1;
- const dice2Value = Math.floor( Math.random() * 6 ) + 1;
- const total = dice1Value + dice2Value;
-
- dice1.innerText = dice1Value;
- dice2.innerText = dice2Value;
-
- status.innerText = "You rolled " + total + ".";
-
- let isDoubles = false;
-
- if (dice1Value === dice2Value) {
- status.innerText += " Doubles!";
- isDoubles = true;
- }
-
- addTotal(total, isDoubles);
-}
-
-function addTotal(total, doubles) {
- rollCount[total] = total;
- const element = document.getElementById(total);
- element.style.backgroundColor = "lightskyblue";
- element.style.width = `${rollCount[total] * 10}px`;
- updateCount();
-
- if (doubles) {
- numberOfDoubles++;
- document.getElementById("doubles").innerText = numberOfDoubles;
- }
-}
-
-function togglePercentNumber() {
- toggle = !toggle;
- updateCount();
-}
-
-function updateCount() {
- for (let i = 0; i <= 13; i++) {
- const element = document.getElementById(i);
- const percent = (rollCount[i] / totalRolls * 100) + "%";
- element.innerText = toggle ? percent : rollCount[i];
- }
-}
-
-/*
-Now when you click the "Roll Dice" button, the console shows an error on line 62: "Uncaught TypeError: Cannot set property 'innerText' of null".
-
-Work backwards again. Why is `element` null? The first element that is used is 0. Is there an element with the `id` 0 in the HTML?
-
-The code uses array indexes that correspond to the total number rolled on the dice. The smallest number that can be rolled on two die is 2, so the IDs start at 2. In the `for` loop on line 59, update the variable initiation to start at 2 instead of 0.
-*/
diff --git a/debugging-dice-game/js/index060.js b/debugging-dice-game/js/index060.js
deleted file mode 100644
index 9d4688fb6..000000000
--- a/debugging-dice-game/js/index060.js
+++ /dev/null
@@ -1,70 +0,0 @@
-const rollButton = document.getElementById( "roll" );
-const toggleButton = document.getElementById( "toggle" );
-const dice1 = document.getElementById( "dice1" );
-const dice2 = document.getElementById( "dice2" );
-const status = document.getElementById( "status" );
-
-let numberOfDoubles = 0;
-let totalRolls = 0;
-let rollCount = new Array(13);
-let toggle = false;
-
-rollButton.onclick = rollDice;
-toggleButton.onclick = togglePercentNumber;
-
-for (let i = 0; i < 13; i++) {
- rollCount[i] = 0;
-}
-
-function rollDice () {
- totalRolls++;
- const dice1Value = Math.floor( Math.random() * 6 ) + 1;
- const dice2Value = Math.floor( Math.random() * 6 ) + 1;
- const total = dice1Value + dice2Value;
-
- dice1.innerText = dice1Value;
- dice2.innerText = dice2Value;
-
- status.innerText = "You rolled " + total + ".";
-
- let isDoubles = false;
-
- if (dice1Value === dice2Value) {
- status.innerText += " Doubles!";
- isDoubles = true;
- }
-
- addTotal(total, isDoubles);
-}
-
-function addTotal(total, doubles) {
- rollCount[total] = total;
- const element = document.getElementById(total);
- element.style.backgroundColor = "lightskyblue";
- element.style.width = `${rollCount[total] * 10}px`;
- updateCount();
-
- if (doubles) {
- numberOfDoubles++;
- document.getElementById("doubles").innerText = numberOfDoubles;
- }
-}
-
-function togglePercentNumber() {
- toggle = !toggle;
- updateCount();
-}
-
-function updateCount() {
- for (let i = 2; i <= 13; i++) {
- const element = document.getElementById(i);
- const percent = (rollCount[i] / totalRolls * 100) + "%";
- element.innerText = toggle ? percent : rollCount[i];
- }
-}
-
-/*
-Huh? The console shows the same error on line 62 when you click "Roll Dice": "Uncaught TypeError: Cannot set property 'innerText' of null". Didn't you just fix that?
-
-The `rollCount` array has a length of 13 and the for loop repeats while i <= 13. But since array indexes start at 0, the 13th item in the array has an index of 12. Change `i <= 13` to `i < 13`.
-*/
diff --git a/debugging-dice-game/js/index070.js b/debugging-dice-game/js/index070.js
deleted file mode 100644
index c1653e270..000000000
--- a/debugging-dice-game/js/index070.js
+++ /dev/null
@@ -1,70 +0,0 @@
-const rollButton = document.getElementById( "roll" );
-const toggleButton = document.getElementById( "toggle" );
-const dice1 = document.getElementById( "dice1" );
-const dice2 = document.getElementById( "dice2" );
-const status = document.getElementById( "status" );
-
-let numberOfDoubles = 0;
-let totalRolls = 0;
-let rollCount = new Array(13);
-let toggle = false;
-
-rollButton.onclick = rollDice;
-toggleButton.onclick = togglePercentNumber;
-
-for (let i = 0; i < 13; i++) {
- rollCount[i] = 0;
-}
-
-function rollDice () {
- totalRolls++;
- const dice1Value = Math.floor( Math.random() * 6 ) + 1;
- const dice2Value = Math.floor( Math.random() * 6 ) + 1;
- const total = dice1Value + dice2Value;
-
- dice1.innerText = dice1Value;
- dice2.innerText = dice2Value;
-
- status.innerText = "You rolled " + total + ".";
-
- let isDoubles = false;
-
- if (dice1Value === dice2Value) {
- status.innerText += " Doubles!";
- isDoubles = true;
- }
-
- addTotal(total, isDoubles);
-}
-
-function addTotal(total, doubles) {
- rollCount[total] = total;
- const element = document.getElementById(total);
- element.style.backgroundColor = "lightskyblue";
- element.style.width = `${rollCount[total] * 10}px`;
- updateCount();
-
- if (doubles) {
- numberOfDoubles++;
- document.getElementById("doubles").innerText = numberOfDoubles;
- }
-}
-
-function togglePercentNumber() {
- toggle = !toggle;
- updateCount();
-}
-
-function updateCount() {
- for (let i = 2; i < 13; i++) {
- const element = document.getElementById(i);
- const percent = (rollCount[i] / totalRolls * 100) + "%";
- element.innerText = toggle ? percent : rollCount[i];
- }
-}
-
-/*
-Great! No errors when you click "Roll Dice"! The program works now, right? Even if there are no errors in the console, you need to check if the program is behaving how you expect.
-
-Every time you click "Roll Dice", the graph should show that the count of the rolled number is increased by one. However, the graph is showing an increase of more than one. Figure out what is wrong and fix this bug.
-*/
\ No newline at end of file
diff --git a/debugging-dice-game/js/index080.js b/debugging-dice-game/js/index080.js
deleted file mode 100644
index 5ce420d3c..000000000
--- a/debugging-dice-game/js/index080.js
+++ /dev/null
@@ -1,68 +0,0 @@
-const rollButton = document.getElementById( "roll" );
-const toggleButton = document.getElementById( "toggle" );
-const dice1 = document.getElementById( "dice1" );
-const dice2 = document.getElementById( "dice2" );
-const status = document.getElementById( "status" );
-
-let numberOfDoubles = 0;
-let totalRolls = 0;
-let rollCount = new Array(13);
-let toggle = false;
-
-rollButton.onclick = rollDice;
-toggleButton.onclick = togglePercentNumber;
-
-for (let i = 0; i < 13; i++) {
- rollCount[i] = 0;
-}
-
-function rollDice () {
- totalRolls++;
- const dice1Value = Math.floor( Math.random() * 6 ) + 1;
- const dice2Value = Math.floor( Math.random() * 6 ) + 1;
- const total = dice1Value + dice2Value;
-
- dice1.innerText = dice1Value;
- dice2.innerText = dice2Value;
-
- status.innerText = "You rolled " + total + ".";
-
- let isDoubles = false;
-
- if (dice1Value === dice2Value) {
- status.innerText += " Doubles!";
- isDoubles = true;
- }
-
- addTotal(total, isDoubles);
-}
-
-function addTotal(total, doubles) {
- rollCount[total]++;
- const element = document.getElementById(total);
- element.style.backgroundColor = "lightskyblue";
- element.style.width = `${rollCount[total] * 10}px`;
- updateCount();
-
- if (doubles) {
- numberOfDoubles++;
- document.getElementById("doubles").innerText = numberOfDoubles;
- }
-}
-
-function togglePercentNumber() {
- toggle = !toggle;
- updateCount();
-}
-
-function updateCount() {
- for (let i = 2; i < 13; i++) {
- const element = document.getElementById(i);
- const percent = (rollCount[i] / totalRolls * 100) + "%";
- element.innerText = toggle ? percent : rollCount[i];
- }
-}
-
-/*
-Sometimes when testing a program, you will find something that is not technically a bug, but is also not how you want the program to work. Toggle to show percentages on the chart and then roll the dice a few times. You will notice that the percentages often have a lot of digits after the decimal. This would look better rounded to the nearest tenth. Update line 61 to `const percent = (rollCount[i] / totalRolls * 100).toFixed(1) + "%";`
-*/
\ No newline at end of file
diff --git a/debugging-dice-game/js/index090.js b/debugging-dice-game/js/index090.js
deleted file mode 100644
index be097cad2..000000000
--- a/debugging-dice-game/js/index090.js
+++ /dev/null
@@ -1,68 +0,0 @@
-const rollButton = document.getElementById( "roll" );
-const toggleButton = document.getElementById( "toggle" );
-const dice1 = document.getElementById( "dice1" );
-const dice2 = document.getElementById( "dice2" );
-const status = document.getElementById( "status" );
-
-let numberOfDoubles = 0;
-let totalRolls = 0;
-let rollCount = new Array(13);
-let toggle = false;
-
-rollButton.onclick = rollDice;
-toggleButton.onclick = togglePercentNumber;
-
-for (let i = 0; i < 13; i++) {
- rollCount[i] = 0;
-}
-
-function rollDice () {
- totalRolls++;
- const dice1Value = Math.floor( Math.random() * 6 ) + 1;
- const dice2Value = Math.floor( Math.random() * 6 ) + 1;
- const total = dice1Value + dice2Value;
-
- dice1.innerText = dice1Value;
- dice2.innerText = dice2Value;
-
- status.innerText = "You rolled " + total + ".";
-
- let isDoubles = false;
-
- if (dice1Value === dice2Value) {
- status.innerText += " Doubles!";
- isDoubles = true;
- }
-
- addTotal(total, isDoubles);
-}
-
-function addTotal(total, doubles) {
- rollCount[total]++;
- const element = document.getElementById(total);
- element.style.backgroundColor = "lightskyblue";
- element.style.width = `${rollCount[total] * 10}px`;
- updateCount();
-
- if (doubles) {
- numberOfDoubles++;
- document.getElementById("doubles").innerText = numberOfDoubles;
- }
-}
-
-function togglePercentNumber() {
- toggle = !toggle;
- updateCount();
-}
-
-function updateCount() {
- for (let i = 2; i < 13; i++) {
- const element = document.getElementById(i);
- const percent = (rollCount[i] / totalRolls * 100).toFixed(1) + "%";
- element.innerText = toggle ? percent : rollCount[i];
- }
-}
-
-/*
-Do a final test of the program. Everything looks good. You are done... at least for now. There is always more refactoring you can do. 😀
-*/
\ No newline at end of file
diff --git a/d3-dashboard/005.html b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/005.html
similarity index 100%
rename from d3-dashboard/005.html
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/005.html
diff --git a/d3-dashboard/010.html b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/010.html
similarity index 100%
rename from d3-dashboard/010.html
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/010.html
diff --git a/d3-dashboard/015.html b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/015.html
similarity index 100%
rename from d3-dashboard/015.html
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/015.html
diff --git a/d3-dashboard/020.html b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/020.html
similarity index 100%
rename from d3-dashboard/020.html
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/020.html
diff --git a/d3-dashboard/025.html b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/025.html
similarity index 100%
rename from d3-dashboard/025.html
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/025.html
diff --git a/d3-dashboard/030.css b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/030.css
similarity index 100%
rename from d3-dashboard/030.css
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/030.css
diff --git a/d3-dashboard/035.css b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/035.css
similarity index 100%
rename from d3-dashboard/035.css
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/035.css
diff --git a/d3-dashboard/040.css b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/040.css
similarity index 100%
rename from d3-dashboard/040.css
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/040.css
diff --git a/d3-dashboard/045.css b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/045.css
similarity index 100%
rename from d3-dashboard/045.css
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/045.css
diff --git a/d3-dashboard/050.css b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/050.css
similarity index 100%
rename from d3-dashboard/050.css
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/050.css
diff --git a/d3-dashboard/051.css b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/051.css
similarity index 100%
rename from d3-dashboard/051.css
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/051.css
diff --git a/d3-dashboard/055.html b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/055.html
similarity index 100%
rename from d3-dashboard/055.html
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/055.html
diff --git a/d3-dashboard/060.html b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/060.html
similarity index 100%
rename from d3-dashboard/060.html
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/060.html
diff --git a/d3-dashboard/065.html b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/065.html
similarity index 100%
rename from d3-dashboard/065.html
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/065.html
diff --git a/d3-dashboard/070.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/070.js
similarity index 100%
rename from d3-dashboard/070.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/070.js
diff --git a/d3-dashboard/072.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/072.js
similarity index 100%
rename from d3-dashboard/072.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/072.js
diff --git a/d3-dashboard/075.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/075.js
similarity index 100%
rename from d3-dashboard/075.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/075.js
diff --git a/d3-dashboard/080.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/080.js
similarity index 100%
rename from d3-dashboard/080.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/080.js
diff --git a/d3-dashboard/085.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/085.js
similarity index 100%
rename from d3-dashboard/085.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/085.js
diff --git a/d3-dashboard/087.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/087.js
similarity index 100%
rename from d3-dashboard/087.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/087.js
diff --git a/d3-dashboard/090.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/090.js
similarity index 100%
rename from d3-dashboard/090.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/090.js
diff --git a/d3-dashboard/095.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/095.js
similarity index 100%
rename from d3-dashboard/095.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/095.js
diff --git a/d3-dashboard/100.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/100.js
similarity index 100%
rename from d3-dashboard/100.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/100.js
diff --git a/d3-dashboard/105.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/105.js
similarity index 100%
rename from d3-dashboard/105.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/105.js
diff --git a/d3-dashboard/110.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/110.js
similarity index 100%
rename from d3-dashboard/110.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/110.js
diff --git a/d3-dashboard/115.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/115.js
similarity index 100%
rename from d3-dashboard/115.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/115.js
diff --git a/d3-dashboard/120.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/120.js
similarity index 100%
rename from d3-dashboard/120.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/120.js
diff --git a/d3-dashboard/125.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/125.js
similarity index 100%
rename from d3-dashboard/125.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/125.js
diff --git a/d3-dashboard/130.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/130.js
similarity index 100%
rename from d3-dashboard/130.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/130.js
diff --git a/d3-dashboard/131.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/131.js
similarity index 100%
rename from d3-dashboard/131.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/131.js
diff --git a/d3-dashboard/132.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/132.js
similarity index 100%
rename from d3-dashboard/132.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/132.js
diff --git a/d3-dashboard/133.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/133.js
similarity index 100%
rename from d3-dashboard/133.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/133.js
diff --git a/d3-dashboard/134.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/134.js
similarity index 100%
rename from d3-dashboard/134.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/134.js
diff --git a/d3-dashboard/139.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/139.js
similarity index 100%
rename from d3-dashboard/139.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/139.js
diff --git a/d3-dashboard/140.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/140.js
similarity index 100%
rename from d3-dashboard/140.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/140.js
diff --git a/d3-dashboard/141.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/141.js
similarity index 100%
rename from d3-dashboard/141.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/141.js
diff --git a/d3-dashboard/143.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/143.js
similarity index 100%
rename from d3-dashboard/143.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/143.js
diff --git a/d3-dashboard/144.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/144.js
similarity index 100%
rename from d3-dashboard/144.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/144.js
diff --git a/d3-dashboard/145.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/145.js
similarity index 100%
rename from d3-dashboard/145.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/145.js
diff --git a/d3-dashboard/150.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/150.js
similarity index 100%
rename from d3-dashboard/150.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/150.js
diff --git a/d3-dashboard/166.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/166.js
similarity index 100%
rename from d3-dashboard/166.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/166.js
diff --git a/d3-dashboard/167.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/167.js
similarity index 100%
rename from d3-dashboard/167.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/167.js
diff --git a/d3-dashboard/170.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/170.js
similarity index 100%
rename from d3-dashboard/170.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/170.js
diff --git a/d3-dashboard/175.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/175.js
similarity index 100%
rename from d3-dashboard/175.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/175.js
diff --git a/d3-dashboard/177.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/177.js
similarity index 100%
rename from d3-dashboard/177.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/177.js
diff --git a/d3-dashboard/180.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/180.js
similarity index 100%
rename from d3-dashboard/180.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/180.js
diff --git a/d3-dashboard/185.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/185.js
similarity index 100%
rename from d3-dashboard/185.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/185.js
diff --git a/d3-dashboard/190.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/190.js
similarity index 100%
rename from d3-dashboard/190.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/190.js
diff --git a/d3-dashboard/195.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/195.js
similarity index 100%
rename from d3-dashboard/195.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/195.js
diff --git a/d3-dashboard/200.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/200.js
similarity index 100%
rename from d3-dashboard/200.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/200.js
diff --git a/d3-dashboard/205.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/205.js
similarity index 100%
rename from d3-dashboard/205.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/205.js
diff --git a/d3-dashboard/210.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/210.js
similarity index 100%
rename from d3-dashboard/210.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/210.js
diff --git a/d3-dashboard/215.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/215.js
similarity index 100%
rename from d3-dashboard/215.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/215.js
diff --git a/d3-dashboard/220.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/220.js
similarity index 100%
rename from d3-dashboard/220.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/220.js
diff --git a/d3-dashboard/225.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/225.js
similarity index 100%
rename from d3-dashboard/225.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/225.js
diff --git a/d3-dashboard/230.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/230.js
similarity index 100%
rename from d3-dashboard/230.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/230.js
diff --git a/d3-dashboard/235.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/235.js
similarity index 100%
rename from d3-dashboard/235.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/235.js
diff --git a/d3-dashboard/240.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/240.js
similarity index 100%
rename from d3-dashboard/240.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/240.js
diff --git a/d3-dashboard/245.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/245.js
similarity index 100%
rename from d3-dashboard/245.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/245.js
diff --git a/d3-dashboard/250.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/250.js
similarity index 100%
rename from d3-dashboard/250.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/250.js
diff --git a/d3-dashboard/255.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/255.js
similarity index 100%
rename from d3-dashboard/255.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/255.js
diff --git a/d3-dashboard/260.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/260.js
similarity index 100%
rename from d3-dashboard/260.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/260.js
diff --git a/d3-dashboard/265.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/265.js
similarity index 100%
rename from d3-dashboard/265.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/265.js
diff --git a/d3-dashboard/270.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/270.js
similarity index 100%
rename from d3-dashboard/270.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/270.js
diff --git a/d3-dashboard/275.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/275.js
similarity index 100%
rename from d3-dashboard/275.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/275.js
diff --git a/d3-dashboard/280.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/280.js
similarity index 100%
rename from d3-dashboard/280.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/280.js
diff --git a/d3-dashboard/285.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/285.js
similarity index 100%
rename from d3-dashboard/285.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/285.js
diff --git a/d3-dashboard/290.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/290.js
similarity index 100%
rename from d3-dashboard/290.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/290.js
diff --git a/d3-dashboard/295.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/295.js
similarity index 100%
rename from d3-dashboard/295.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/295.js
diff --git a/d3-dashboard/300.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/300.js
similarity index 100%
rename from d3-dashboard/300.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/300.js
diff --git a/d3-dashboard/305.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/305.js
similarity index 100%
rename from d3-dashboard/305.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/305.js
diff --git a/d3-dashboard/310.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/310.js
similarity index 100%
rename from d3-dashboard/310.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/310.js
diff --git a/d3-dashboard/315.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/315.js
similarity index 100%
rename from d3-dashboard/315.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/315.js
diff --git a/d3-dashboard/320.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/320.js
similarity index 100%
rename from d3-dashboard/320.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/320.js
diff --git a/d3-dashboard/325.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/325.js
similarity index 100%
rename from d3-dashboard/325.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/325.js
diff --git a/d3-dashboard/330.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/330.js
similarity index 100%
rename from d3-dashboard/330.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/330.js
diff --git a/d3-dashboard/335.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/335.js
similarity index 100%
rename from d3-dashboard/335.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/335.js
diff --git a/d3-dashboard/340.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/340.js
similarity index 100%
rename from d3-dashboard/340.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/340.js
diff --git a/d3-dashboard/345.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/345.js
similarity index 100%
rename from d3-dashboard/345.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/345.js
diff --git a/d3-dashboard/350.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/350.js
similarity index 100%
rename from d3-dashboard/350.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/350.js
diff --git a/d3-dashboard/355.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/355.js
similarity index 100%
rename from d3-dashboard/355.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/355.js
diff --git a/d3-dashboard/360.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/360.js
similarity index 100%
rename from d3-dashboard/360.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/360.js
diff --git a/d3-dashboard/365.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/365.js
similarity index 100%
rename from d3-dashboard/365.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/365.js
diff --git a/d3-dashboard/370.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/370.js
similarity index 100%
rename from d3-dashboard/370.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/370.js
diff --git a/d3-dashboard/375.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/375.js
similarity index 100%
rename from d3-dashboard/375.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/375.js
diff --git a/d3-dashboard/380.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/380.js
similarity index 100%
rename from d3-dashboard/380.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/380.js
diff --git a/d3-dashboard/385.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/385.js
similarity index 100%
rename from d3-dashboard/385.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/385.js
diff --git a/d3-dashboard/390.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/390.js
similarity index 100%
rename from d3-dashboard/390.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/390.js
diff --git a/d3-dashboard/395.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/395.js
similarity index 100%
rename from d3-dashboard/395.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/395.js
diff --git a/d3-dashboard/400.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/400.js
similarity index 100%
rename from d3-dashboard/400.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/400.js
diff --git a/d3-dashboard/405.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/405.js
similarity index 100%
rename from d3-dashboard/405.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/405.js
diff --git a/d3-dashboard/410.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/410.js
similarity index 100%
rename from d3-dashboard/410.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/410.js
diff --git a/d3-dashboard/415.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/415.js
similarity index 100%
rename from d3-dashboard/415.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/415.js
diff --git a/d3-dashboard/420.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/420.js
similarity index 100%
rename from d3-dashboard/420.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/420.js
diff --git a/d3-dashboard/422.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/422.js
similarity index 100%
rename from d3-dashboard/422.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/422.js
diff --git a/d3-dashboard/425.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/425.js
similarity index 100%
rename from d3-dashboard/425.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/425.js
diff --git a/d3-dashboard/426.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/426.js
similarity index 100%
rename from d3-dashboard/426.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/426.js
diff --git a/d3-dashboard/430.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/430.js
similarity index 100%
rename from d3-dashboard/430.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/430.js
diff --git a/d3-dashboard/435.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/435.js
similarity index 100%
rename from d3-dashboard/435.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/435.js
diff --git a/d3-dashboard/440.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/440.js
similarity index 100%
rename from d3-dashboard/440.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/440.js
diff --git a/d3-dashboard/450.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/450.js
similarity index 100%
rename from d3-dashboard/450.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/450.js
diff --git a/d3-dashboard/455.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/455.js
similarity index 100%
rename from d3-dashboard/455.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/455.js
diff --git a/d3-dashboard/460.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/460.js
similarity index 100%
rename from d3-dashboard/460.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/460.js
diff --git a/d3-dashboard/465.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/465.js
similarity index 100%
rename from d3-dashboard/465.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/465.js
diff --git a/d3-dashboard/470.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/470.js
similarity index 100%
rename from d3-dashboard/470.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/470.js
diff --git a/d3-dashboard/475.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/475.js
similarity index 100%
rename from d3-dashboard/475.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/475.js
diff --git a/d3-dashboard/476.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/476.js
similarity index 100%
rename from d3-dashboard/476.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/476.js
diff --git a/d3-dashboard/477.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/477.js
similarity index 100%
rename from d3-dashboard/477.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/477.js
diff --git a/d3-dashboard/478.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/478.js
similarity index 100%
rename from d3-dashboard/478.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/478.js
diff --git a/d3-dashboard/479.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/479.js
similarity index 100%
rename from d3-dashboard/479.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/479.js
diff --git a/d3-dashboard/480.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/480.js
similarity index 100%
rename from d3-dashboard/480.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/480.js
diff --git a/d3-dashboard/485.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/485.js
similarity index 100%
rename from d3-dashboard/485.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/485.js
diff --git a/d3-dashboard/490.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/490.js
similarity index 100%
rename from d3-dashboard/490.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/490.js
diff --git a/d3-dashboard/495.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/495.js
similarity index 100%
rename from d3-dashboard/495.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/495.js
diff --git a/d3-dashboard/500.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/500.js
similarity index 100%
rename from d3-dashboard/500.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/500.js
diff --git a/d3-dashboard/505.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/505.js
similarity index 100%
rename from d3-dashboard/505.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/505.js
diff --git a/d3-dashboard/510.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/510.js
similarity index 100%
rename from d3-dashboard/510.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/510.js
diff --git a/d3-dashboard/515.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/515.js
similarity index 100%
rename from d3-dashboard/515.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/515.js
diff --git a/d3-dashboard/520.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/520.js
similarity index 100%
rename from d3-dashboard/520.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/520.js
diff --git a/d3-dashboard/525.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/525.js
similarity index 100%
rename from d3-dashboard/525.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/525.js
diff --git a/d3-dashboard/530.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/530.js
similarity index 100%
rename from d3-dashboard/530.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/530.js
diff --git a/d3-dashboard/535.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/535.js
similarity index 100%
rename from d3-dashboard/535.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/535.js
diff --git a/d3-dashboard/540.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/540.js
similarity index 100%
rename from d3-dashboard/540.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/540.js
diff --git a/d3-dashboard/545.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/545.js
similarity index 100%
rename from d3-dashboard/545.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/545.js
diff --git a/d3-dashboard/550.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/550.js
similarity index 100%
rename from d3-dashboard/550.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/550.js
diff --git a/d3-dashboard/555.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/555.js
similarity index 100%
rename from d3-dashboard/555.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/555.js
diff --git a/d3-dashboard/560.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/560.js
similarity index 100%
rename from d3-dashboard/560.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/560.js
diff --git a/d3-dashboard/565.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/565.js
similarity index 100%
rename from d3-dashboard/565.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/565.js
diff --git a/d3-dashboard/570.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/570.js
similarity index 100%
rename from d3-dashboard/570.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/570.js
diff --git a/d3-dashboard/575.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/575.js
similarity index 100%
rename from d3-dashboard/575.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/575.js
diff --git a/d3-dashboard/580.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/580.js
similarity index 100%
rename from d3-dashboard/580.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/580.js
diff --git a/d3-dashboard/585.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/585.js
similarity index 100%
rename from d3-dashboard/585.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/585.js
diff --git a/d3-dashboard/590.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/590.js
similarity index 100%
rename from d3-dashboard/590.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/590.js
diff --git a/d3-dashboard/595.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/595.js
similarity index 100%
rename from d3-dashboard/595.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/595.js
diff --git a/d3-dashboard/600.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/600.js
similarity index 100%
rename from d3-dashboard/600.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/600.js
diff --git a/d3-dashboard/605.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/605.js
similarity index 100%
rename from d3-dashboard/605.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/605.js
diff --git a/d3-dashboard/610.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/610.js
similarity index 100%
rename from d3-dashboard/610.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/610.js
diff --git a/d3-dashboard/615.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/615.js
similarity index 100%
rename from d3-dashboard/615.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/615.js
diff --git a/d3-dashboard/620.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/620.js
similarity index 100%
rename from d3-dashboard/620.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/620.js
diff --git a/d3-dashboard/622.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/622.js
similarity index 100%
rename from d3-dashboard/622.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/622.js
diff --git a/d3-dashboard/625.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/625.js
similarity index 100%
rename from d3-dashboard/625.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/625.js
diff --git a/d3-dashboard/630.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/630.js
similarity index 100%
rename from d3-dashboard/630.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/630.js
diff --git a/d3-dashboard/632.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/632.js
similarity index 100%
rename from d3-dashboard/632.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/632.js
diff --git a/d3-dashboard/635.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/635.js
similarity index 100%
rename from d3-dashboard/635.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/635.js
diff --git a/d3-dashboard/640.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/640.js
similarity index 100%
rename from d3-dashboard/640.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/640.js
diff --git a/d3-dashboard/645.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/645.js
similarity index 100%
rename from d3-dashboard/645.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/645.js
diff --git a/d3-dashboard/650.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/650.js
similarity index 100%
rename from d3-dashboard/650.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/650.js
diff --git a/d3-dashboard/655.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/655.js
similarity index 100%
rename from d3-dashboard/655.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/655.js
diff --git a/d3-dashboard/660.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/660.js
similarity index 100%
rename from d3-dashboard/660.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/660.js
diff --git a/d3-dashboard/d3-5.9.2.min.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/d3-5.9.2.min.js
similarity index 100%
rename from d3-dashboard/d3-5.9.2.min.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/d3-5.9.2.min.js
diff --git a/d3-dashboard/dashboard.css b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/dashboard.css
similarity index 100%
rename from d3-dashboard/dashboard.css
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/dashboard.css
diff --git a/d3-dashboard/dashboard.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/dashboard.js
similarity index 100%
rename from d3-dashboard/dashboard.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/dashboard.js
diff --git a/d3-dashboard/data.js b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/data.js
similarity index 100%
rename from d3-dashboard/data.js
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/data.js
diff --git a/d3-dashboard/index.html b/front-end-libraries/learn-basic-d3-by-building-a-dashboard/index.html
similarity index 100%
rename from d3-dashboard/index.html
rename to front-end-libraries/learn-basic-d3-by-building-a-dashboard/index.html
diff --git a/d3-map-of-world/Lessons/0010_index.html b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0010_index.html
similarity index 100%
rename from d3-map-of-world/Lessons/0010_index.html
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0010_index.html
diff --git a/d3-map-of-world/Lessons/0020_index.html b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0020_index.html
similarity index 100%
rename from d3-map-of-world/Lessons/0020_index.html
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0020_index.html
diff --git a/d3-map-of-world/Lessons/0030_index.html b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0030_index.html
similarity index 100%
rename from d3-map-of-world/Lessons/0030_index.html
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0030_index.html
diff --git a/d3-map-of-world/Lessons/0040_index.html b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0040_index.html
similarity index 100%
rename from d3-map-of-world/Lessons/0040_index.html
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0040_index.html
diff --git a/d3-map-of-world/Lessons/0050_index.html b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0050_index.html
similarity index 100%
rename from d3-map-of-world/Lessons/0050_index.html
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0050_index.html
diff --git a/d3-map-of-world/Lessons/0060_index.html b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0060_index.html
similarity index 100%
rename from d3-map-of-world/Lessons/0060_index.html
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0060_index.html
diff --git a/d3-map-of-world/Lessons/0070_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0070_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0070_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0070_index.js
diff --git a/d3-map-of-world/Lessons/0080_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0080_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0080_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0080_index.js
diff --git a/d3-map-of-world/Lessons/0090_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0090_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0090_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0090_index.js
diff --git a/d3-map-of-world/Lessons/0100_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0100_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0100_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0100_index.js
diff --git a/d3-map-of-world/Lessons/0110_index.css b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0110_index.css
similarity index 100%
rename from d3-map-of-world/Lessons/0110_index.css
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0110_index.css
diff --git a/d3-map-of-world/Lessons/0120_index.html b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0120_index.html
similarity index 100%
rename from d3-map-of-world/Lessons/0120_index.html
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0120_index.html
diff --git a/d3-map-of-world/Lessons/0130_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0130_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0130_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0130_index.js
diff --git a/d3-map-of-world/Lessons/0140_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0140_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0140_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0140_index.js
diff --git a/d3-map-of-world/Lessons/0150_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0150_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0150_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0150_index.js
diff --git a/d3-map-of-world/Lessons/0160_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0160_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0160_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0160_index.js
diff --git a/d3-map-of-world/Lessons/0170_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0170_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0170_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0170_index.js
diff --git a/d3-map-of-world/Lessons/0180_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0180_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0180_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0180_index.js
diff --git a/d3-map-of-world/Lessons/0190_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0190_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0190_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0190_index.js
diff --git a/d3-map-of-world/Lessons/0200_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0200_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0200_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0200_index.js
diff --git a/d3-map-of-world/Lessons/0210_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0210_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0210_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0210_index.js
diff --git a/d3-map-of-world/Lessons/0220_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0220_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0220_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0220_index.js
diff --git a/d3-map-of-world/Lessons/0230_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0230_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0230_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0230_index.js
diff --git a/d3-map-of-world/Lessons/0240_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0240_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0240_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0240_index.js
diff --git a/d3-map-of-world/Lessons/0250_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0250_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0250_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0250_index.js
diff --git a/d3-map-of-world/Lessons/0260_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0260_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0260_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0260_index.js
diff --git a/d3-map-of-world/Lessons/0270_index.html b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0270_index.html
similarity index 100%
rename from d3-map-of-world/Lessons/0270_index.html
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0270_index.html
diff --git a/d3-map-of-world/Lessons/0280_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0280_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0280_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0280_index.js
diff --git a/d3-map-of-world/Lessons/0290_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0290_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0290_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0290_index.js
diff --git a/d3-map-of-world/Lessons/0300_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0300_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0300_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0300_index.js
diff --git a/d3-map-of-world/Lessons/0310_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0310_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0310_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0310_index.js
diff --git a/d3-map-of-world/Lessons/0320_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0320_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0320_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0320_index.js
diff --git a/d3-map-of-world/Lessons/0330_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0330_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0330_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0330_index.js
diff --git a/d3-map-of-world/Lessons/0340_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0340_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0340_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0340_index.js
diff --git a/d3-map-of-world/Lessons/0350_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0350_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0350_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0350_index.js
diff --git a/d3-map-of-world/Lessons/0360_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0360_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0360_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0360_index.js
diff --git a/d3-map-of-world/Lessons/0370_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0370_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0370_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0370_index.js
diff --git a/d3-map-of-world/Lessons/0380_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0380_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0380_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0380_index.js
diff --git a/d3-map-of-world/Lessons/0390_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0390_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0390_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0390_index.js
diff --git a/d3-map-of-world/Lessons/0400_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0400_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0400_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0400_index.js
diff --git a/d3-map-of-world/Lessons/0410_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0410_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0410_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0410_index.js
diff --git a/d3-map-of-world/Lessons/0420_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0420_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0420_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0420_index.js
diff --git a/d3-map-of-world/Lessons/0430_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0430_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0430_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0430_index.js
diff --git a/d3-map-of-world/Lessons/0440_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0440_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0440_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0440_index.js
diff --git a/d3-map-of-world/Lessons/0450_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0450_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0450_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0450_index.js
diff --git a/d3-map-of-world/Lessons/0460_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0460_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0460_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0460_index.js
diff --git a/d3-map-of-world/Lessons/0470_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0470_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0470_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0470_index.js
diff --git a/d3-map-of-world/Lessons/0480_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0480_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0480_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0480_index.js
diff --git a/d3-map-of-world/Lessons/0490_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0490_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0490_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0490_index.js
diff --git a/d3-map-of-world/Lessons/0500_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0500_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0500_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0500_index.js
diff --git a/d3-map-of-world/Lessons/0510_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0510_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0510_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0510_index.js
diff --git a/d3-map-of-world/Lessons/0520_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0520_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0520_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0520_index.js
diff --git a/d3-map-of-world/Lessons/0530_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0530_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0530_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0530_index.js
diff --git a/d3-map-of-world/Lessons/0540_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0540_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0540_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0540_index.js
diff --git a/d3-map-of-world/Lessons/0550_index.css b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0550_index.css
similarity index 100%
rename from d3-map-of-world/Lessons/0550_index.css
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0550_index.css
diff --git a/d3-map-of-world/Lessons/0560_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0560_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0560_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0560_index.js
diff --git a/d3-map-of-world/Lessons/0570_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0570_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0570_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0570_index.js
diff --git a/d3-map-of-world/Lessons/0580_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0580_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0580_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0580_index.js
diff --git a/d3-map-of-world/Lessons/0590_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0590_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0590_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0590_index.js
diff --git a/d3-map-of-world/Lessons/0600_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0600_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0600_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0600_index.js
diff --git a/d3-map-of-world/Lessons/0610_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0610_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0610_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0610_index.js
diff --git a/d3-map-of-world/Lessons/0620_index.html b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0620_index.html
similarity index 100%
rename from d3-map-of-world/Lessons/0620_index.html
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0620_index.html
diff --git a/d3-map-of-world/Lessons/0630_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0630_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0630_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0630_index.js
diff --git a/d3-map-of-world/Lessons/0640_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0640_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0640_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0640_index.js
diff --git a/d3-map-of-world/Lessons/0650_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0650_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0650_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0650_index.js
diff --git a/d3-map-of-world/Lessons/0660_index.css b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0660_index.css
similarity index 100%
rename from d3-map-of-world/Lessons/0660_index.css
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0660_index.css
diff --git a/d3-map-of-world/Lessons/0670_index.css b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0670_index.css
similarity index 100%
rename from d3-map-of-world/Lessons/0670_index.css
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0670_index.css
diff --git a/d3-map-of-world/Lessons/0680_index.css b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0680_index.css
similarity index 100%
rename from d3-map-of-world/Lessons/0680_index.css
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0680_index.css
diff --git a/d3-map-of-world/Lessons/0690_index.css b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0690_index.css
similarity index 100%
rename from d3-map-of-world/Lessons/0690_index.css
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0690_index.css
diff --git a/d3-map-of-world/Lessons/0700_index.css b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0700_index.css
similarity index 100%
rename from d3-map-of-world/Lessons/0700_index.css
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0700_index.css
diff --git a/d3-map-of-world/Lessons/0710_index.css b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0710_index.css
similarity index 100%
rename from d3-map-of-world/Lessons/0710_index.css
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0710_index.css
diff --git a/d3-map-of-world/Lessons/0720_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0720_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0720_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0720_index.js
diff --git a/d3-map-of-world/Lessons/0730_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0730_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0730_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0730_index.js
diff --git a/d3-map-of-world/Lessons/0740_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0740_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0740_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0740_index.js
diff --git a/d3-map-of-world/Lessons/0750_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0750_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0750_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0750_index.js
diff --git a/d3-map-of-world/Lessons/0760_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0760_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0760_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0760_index.js
diff --git a/d3-map-of-world/Lessons/0770_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0770_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0770_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0770_index.js
diff --git a/d3-map-of-world/Lessons/0780_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0780_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0780_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0780_index.js
diff --git a/d3-map-of-world/Lessons/0790_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0790_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0790_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0790_index.js
diff --git a/d3-map-of-world/Lessons/0800_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0800_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0800_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0800_index.js
diff --git a/d3-map-of-world/Lessons/0810_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0810_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0810_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0810_index.js
diff --git a/d3-map-of-world/Lessons/0820_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0820_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0820_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0820_index.js
diff --git a/d3-map-of-world/Lessons/0830_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0830_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0830_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0830_index.js
diff --git a/d3-map-of-world/Lessons/0840_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0840_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0840_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0840_index.js
diff --git a/d3-map-of-world/Lessons/0850_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0850_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0850_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0850_index.js
diff --git a/d3-map-of-world/Lessons/0860_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0860_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0860_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0860_index.js
diff --git a/d3-map-of-world/Lessons/0870_index.css b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0870_index.css
similarity index 100%
rename from d3-map-of-world/Lessons/0870_index.css
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0870_index.css
diff --git a/d3-map-of-world/Lessons/0880_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0880_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0880_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0880_index.js
diff --git a/d3-map-of-world/Lessons/0890_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0890_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0890_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0890_index.js
diff --git a/d3-map-of-world/Lessons/0900_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0900_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0900_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0900_index.js
diff --git a/d3-map-of-world/Lessons/0910_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0910_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0910_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0910_index.js
diff --git a/d3-map-of-world/Lessons/0920_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0920_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0920_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0920_index.js
diff --git a/d3-map-of-world/Lessons/0930_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0930_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0930_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0930_index.js
diff --git a/d3-map-of-world/Lessons/0940_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0940_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0940_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0940_index.js
diff --git a/d3-map-of-world/Lessons/0950_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0950_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0950_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0950_index.js
diff --git a/d3-map-of-world/Lessons/0960_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0960_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0960_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0960_index.js
diff --git a/d3-map-of-world/Lessons/0970_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0970_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0970_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0970_index.js
diff --git a/d3-map-of-world/Lessons/0980_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0980_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0980_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0980_index.js
diff --git a/d3-map-of-world/Lessons/0990_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0990_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/0990_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/0990_index.js
diff --git a/d3-map-of-world/Lessons/1000_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1000_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/1000_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1000_index.js
diff --git a/d3-map-of-world/Lessons/1010_index.css b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1010_index.css
similarity index 100%
rename from d3-map-of-world/Lessons/1010_index.css
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1010_index.css
diff --git a/d3-map-of-world/Lessons/1020_index.css b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1020_index.css
similarity index 100%
rename from d3-map-of-world/Lessons/1020_index.css
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1020_index.css
diff --git a/d3-map-of-world/Lessons/1030_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1030_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/1030_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1030_index.js
diff --git a/d3-map-of-world/Lessons/1040_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1040_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/1040_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1040_index.js
diff --git a/d3-map-of-world/Lessons/1050_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1050_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/1050_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1050_index.js
diff --git a/d3-map-of-world/Lessons/1060_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1060_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/1060_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1060_index.js
diff --git a/d3-map-of-world/Lessons/1070_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1070_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/1070_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1070_index.js
diff --git a/d3-map-of-world/Lessons/1080_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1080_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/1080_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1080_index.js
diff --git a/d3-map-of-world/Lessons/1090_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1090_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/1090_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1090_index.js
diff --git a/d3-map-of-world/Lessons/1100_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1100_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/1100_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1100_index.js
diff --git a/d3-map-of-world/Lessons/1110_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1110_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/1110_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1110_index.js
diff --git a/d3-map-of-world/Lessons/1120_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1120_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/1120_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1120_index.js
diff --git a/d3-map-of-world/Lessons/1130_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1130_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/1130_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1130_index.js
diff --git a/d3-map-of-world/Lessons/1140_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1140_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/1140_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1140_index.js
diff --git a/d3-map-of-world/Lessons/1150_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1150_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/1150_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1150_index.js
diff --git a/d3-map-of-world/Lessons/1160_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1160_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/1160_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1160_index.js
diff --git a/d3-map-of-world/Lessons/1170_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1170_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/1170_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1170_index.js
diff --git a/d3-map-of-world/Lessons/1180_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1180_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/1180_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1180_index.js
diff --git a/d3-map-of-world/Lessons/1190_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1190_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/1190_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1190_index.js
diff --git a/d3-map-of-world/Lessons/1200_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1200_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/1200_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1200_index.js
diff --git a/d3-map-of-world/Lessons/1210_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1210_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/1210_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1210_index.js
diff --git a/d3-map-of-world/Lessons/1220_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1220_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/1220_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1220_index.js
diff --git a/d3-map-of-world/Lessons/1230_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1230_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/1230_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1230_index.js
diff --git a/d3-map-of-world/Lessons/1240_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1240_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/1240_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1240_index.js
diff --git a/d3-map-of-world/Lessons/1250_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1250_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/1250_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1250_index.js
diff --git a/d3-map-of-world/Lessons/1260_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1260_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/1260_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1260_index.js
diff --git a/d3-map-of-world/Lessons/1270_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1270_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/1270_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1270_index.js
diff --git a/d3-map-of-world/Lessons/1280_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1280_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/1280_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1280_index.js
diff --git a/d3-map-of-world/Lessons/1290_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1290_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/1290_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1290_index.js
diff --git a/d3-map-of-world/Lessons/1300_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1300_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/1300_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/1300_index.js
diff --git a/d3-map-of-world/Lessons/FINAL_index.css b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/FINAL_index.css
similarity index 100%
rename from d3-map-of-world/Lessons/FINAL_index.css
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/FINAL_index.css
diff --git a/d3-map-of-world/Lessons/FINAL_index.html b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/FINAL_index.html
similarity index 100%
rename from d3-map-of-world/Lessons/FINAL_index.html
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/FINAL_index.html
diff --git a/d3-map-of-world/Lessons/FINAL_index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/FINAL_index.js
similarity index 100%
rename from d3-map-of-world/Lessons/FINAL_index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/Lessons/FINAL_index.js
diff --git a/d3-map-of-world/d3v5min.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/d3v5min.js
similarity index 100%
rename from d3-map-of-world/d3v5min.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/d3v5min.js
diff --git a/d3-map-of-world/index.css b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/index.css
similarity index 100%
rename from d3-map-of-world/index.css
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/index.css
diff --git a/d3-map-of-world/index.html b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/index.html
similarity index 100%
rename from d3-map-of-world/index.html
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/index.html
diff --git a/d3-map-of-world/index.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/index.js
similarity index 100%
rename from d3-map-of-world/index.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/index.js
diff --git a/d3-map-of-world/naturalEarth50TopoJSON.json b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/naturalEarth50TopoJSON.json
similarity index 100%
rename from d3-map-of-world/naturalEarth50TopoJSON.json
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/naturalEarth50TopoJSON.json
diff --git a/d3-map-of-world/topojsonv1min.js b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/topojsonv1min.js
similarity index 100%
rename from d3-map-of-world/topojsonv1min.js
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/topojsonv1min.js
diff --git a/d3-map-of-world/worldPopulation.csv b/front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/worldPopulation.csv
similarity index 100%
rename from d3-map-of-world/worldPopulation.csv
rename to front-end-libraries/learn-intermediate-d3-by-building-a-map-of-earth/worldPopulation.csv
diff --git a/front-end-libraries/learn-typescript-by-building-a-poker-game/.editorconfig b/front-end-libraries/learn-typescript-by-building-a-poker-game/.editorconfig
new file mode 100644
index 000000000..c66462bde
--- /dev/null
+++ b/front-end-libraries/learn-typescript-by-building-a-poker-game/.editorconfig
@@ -0,0 +1,19 @@
+# EditorConfig helps developers define and maintain consistent
+# coding styles between different editors and IDEs
+# editorconfig.org
+
+root = true
+
+[**]
+end_of_line = lf
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
+indent_style = space
+indent_size = 4
+
+[**/*.{sass,json}]
+indent_size = 2
+
+[**/*.pug]
+trim_trailing_whitespace = false
diff --git a/front-end-libraries/learn-typescript-by-building-a-poker-game/.gitignore b/front-end-libraries/learn-typescript-by-building-a-poker-game/.gitignore
new file mode 100644
index 000000000..08f55253c
--- /dev/null
+++ b/front-end-libraries/learn-typescript-by-building-a-poker-game/.gitignore
@@ -0,0 +1,51 @@
+# Bundled
+dist/
+.cache/
+
+# TS compiled
+poker-game-ts/**/*.js
+poker-game-ts/**/*.map
+
+# macOS
+.DS_Store
+.AppleDouble
+.LSOverride
+
+# Thumbnails
+._*
+Thumbs.db
+
+# npm
+node_modules/
+
+# Logs
+*.log
+
+# IntelliJ
+.idea
+
+# VScode
+.vscode/*
+!.vscode/settings.json
+!.vscode/tasks.json
+!.vscode/launch.json
+!.vscode/extensions.json
+
+# Other IDE and editor
+.project
+.classpath
+.c9/
+*.launch
+.settings/
+*.sublime-workspace
+
+# Vim template
+[._]*.s[a-v][a-z]
+[._]*.sw[a-p]
+[._]s[a-v][a-z]
+[._]sw[a-p]
+Session.vim
+.netrwhist
+*~
+[._]*.un~
+
diff --git a/front-end-libraries/learn-typescript-by-building-a-poker-game/package-lock.json b/front-end-libraries/learn-typescript-by-building-a-poker-game/package-lock.json
new file mode 100644
index 000000000..2497b3387
--- /dev/null
+++ b/front-end-libraries/learn-typescript-by-building-a-poker-game/package-lock.json
@@ -0,0 +1,2588 @@
+{
+ "name": "freecodecampproject",
+ "version": "1.0.0",
+ "lockfileVersion": 1,
+ "requires": true,
+ "dependencies": {
+ "@commitlint/cli": {
+ "version": "7.6.1",
+ "resolved": "https://registry.npmjs.org/@commitlint/cli/-/cli-7.6.1.tgz",
+ "integrity": "sha512-HEJwQ/aK0AOcAwn77ZKbb/GZhlGxBSPhtVp07uoJFVqM12l2Ia2JHA+MTpfHCFdVahKyYGREZgxde6LyKyG8aQ==",
+ "dev": true,
+ "requires": {
+ "@commitlint/format": "^7.6.1",
+ "@commitlint/lint": "^7.6.0",
+ "@commitlint/load": "^7.6.1",
+ "@commitlint/read": "^7.6.0",
+ "babel-polyfill": "6.26.0",
+ "chalk": "2.3.1",
+ "get-stdin": "7.0.0",
+ "lodash": "4.17.11",
+ "meow": "5.0.0",
+ "resolve-from": "5.0.0",
+ "resolve-global": "1.0.0"
+ },
+ "dependencies": {
+ "lodash": {
+ "version": "4.17.11",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz",
+ "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==",
+ "dev": true
+ }
+ }
+ },
+ "@commitlint/config-conventional": {
+ "version": "7.6.0",
+ "resolved": "https://registry.npmjs.org/@commitlint/config-conventional/-/config-conventional-7.6.0.tgz",
+ "integrity": "sha512-1Gnv5p3tc1VsEK25oTIRBO86czLtX6s/jeLNPAQRzdCnyEmsxkbx/sfoUJ1dwv7v8W++xckVnnuvdZv2Hp8yCw==",
+ "dev": true
+ },
+ "@commitlint/ensure": {
+ "version": "7.6.0",
+ "resolved": "https://registry.npmjs.org/@commitlint/ensure/-/ensure-7.6.0.tgz",
+ "integrity": "sha512-pSUrNud5L/8y+cLWo3LEa8Ce4bAAR33xMderFUhuNPHj7TwpNS7L4ROMnhL4ZlCYRazCRDlnPaJLPikMoWThfA==",
+ "dev": true,
+ "requires": {
+ "lodash": "4.17.11"
+ },
+ "dependencies": {
+ "lodash": {
+ "version": "4.17.11",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz",
+ "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==",
+ "dev": true
+ }
+ }
+ },
+ "@commitlint/execute-rule": {
+ "version": "7.6.0",
+ "resolved": "https://registry.npmjs.org/@commitlint/execute-rule/-/execute-rule-7.6.0.tgz",
+ "integrity": "sha512-0inGOIlLefPDtiDOaZ6WoE1p+GEZZIj2VwUftUozD3C71TiwP9UfKAVVtUDFPIeL6RgSqCkCf7zsy6NKNxwkBg==",
+ "dev": true,
+ "requires": {
+ "babel-runtime": "6.26.0"
+ }
+ },
+ "@commitlint/format": {
+ "version": "7.6.1",
+ "resolved": "https://registry.npmjs.org/@commitlint/format/-/format-7.6.1.tgz",
+ "integrity": "sha512-Ldzf5N2Sr9RQqvlYwaQn4vz1WOZ7byYinspC/WCrbfcETGy28j7QE4OueZU6nNB9TjwwEorKm13uy7tDWPR7dg==",
+ "dev": true,
+ "requires": {
+ "babel-runtime": "^6.23.0",
+ "chalk": "^2.0.1"
+ }
+ },
+ "@commitlint/is-ignored": {
+ "version": "7.6.0",
+ "resolved": "https://registry.npmjs.org/@commitlint/is-ignored/-/is-ignored-7.6.0.tgz",
+ "integrity": "sha512-By/mLNhz+6Rtix9+Kyof1gdKiELchAnQHpdeKIHIOe9sjbvd3HqDoFHh/mGMMRnGIPMZOX5TO8Fqy3A/2HqlTw==",
+ "dev": true,
+ "requires": {
+ "semver": "6.0.0"
+ },
+ "dependencies": {
+ "semver": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.0.0.tgz",
+ "integrity": "sha512-0UewU+9rFapKFnlbirLi3byoOuhrSsli/z/ihNnvM24vgF+8sNBiI1LZPBSH9wJKUwaUbw+s3hToDLCXkrghrQ==",
+ "dev": true
+ }
+ }
+ },
+ "@commitlint/lint": {
+ "version": "7.6.0",
+ "resolved": "https://registry.npmjs.org/@commitlint/lint/-/lint-7.6.0.tgz",
+ "integrity": "sha512-aUIFX0lPRZL7WmT8W8qzogJD4LmHk6JPG3XUAX+K0pOHGjC/0ALvSAytvoLXy4fvmSnGJkXmWhzSW7c0Spa14Q==",
+ "dev": true,
+ "requires": {
+ "@commitlint/is-ignored": "^7.6.0",
+ "@commitlint/parse": "^7.6.0",
+ "@commitlint/rules": "^7.6.0",
+ "babel-runtime": "^6.23.0",
+ "lodash": "4.17.11"
+ },
+ "dependencies": {
+ "lodash": {
+ "version": "4.17.11",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz",
+ "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==",
+ "dev": true
+ }
+ }
+ },
+ "@commitlint/load": {
+ "version": "7.6.2",
+ "resolved": "https://registry.npmjs.org/@commitlint/load/-/load-7.6.2.tgz",
+ "integrity": "sha512-I+xk+BkXAG1roXNrPsR1eOd5hEa+oLc6HLYnHAT/HLGKKB3E01IGg3O5SGlg7lpf1yiAaYI+wAnNTr3f3sIbWQ==",
+ "dev": true,
+ "requires": {
+ "@commitlint/execute-rule": "^7.6.0",
+ "@commitlint/resolve-extends": "^7.6.0",
+ "babel-runtime": "^6.23.0",
+ "cosmiconfig": "^5.2.0",
+ "lodash": "4.17.11",
+ "resolve-from": "^5.0.0"
+ },
+ "dependencies": {
+ "lodash": {
+ "version": "4.17.11",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz",
+ "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==",
+ "dev": true
+ }
+ }
+ },
+ "@commitlint/message": {
+ "version": "7.6.0",
+ "resolved": "https://registry.npmjs.org/@commitlint/message/-/message-7.6.0.tgz",
+ "integrity": "sha512-PtP4jhBYGXLaQQC5jel+RQczG2tS3Cy6rRxQioUfCUaEg/LV029ao/KcL1kHEBJ8hSW/SUmnvDaD9Y6nozLQMA==",
+ "dev": true
+ },
+ "@commitlint/parse": {
+ "version": "7.6.0",
+ "resolved": "https://registry.npmjs.org/@commitlint/parse/-/parse-7.6.0.tgz",
+ "integrity": "sha512-1x60kTqz2VBCjYE+8MV5BhE+ShPo7MgVlrMWSlxiiJDWP5CvWa+SBbUayDJ7rtOXimjTASZ9ZNZTuFPdJE/Y7A==",
+ "dev": true,
+ "requires": {
+ "conventional-changelog-angular": "^1.3.3",
+ "conventional-commits-parser": "^2.1.0",
+ "lodash": "^4.17.11"
+ }
+ },
+ "@commitlint/prompt": {
+ "version": "7.6.1",
+ "resolved": "https://registry.npmjs.org/@commitlint/prompt/-/prompt-7.6.1.tgz",
+ "integrity": "sha512-TWii4nCzC1uwwtubp/mlkU8JHeDWCmZqvVyeRswsMhkAH59dsPrCuD3tDePzeffK6hXzLRLBce9hO3PDqONOog==",
+ "dev": true,
+ "requires": {
+ "@commitlint/load": "^7.6.1",
+ "babel-runtime": "^6.23.0",
+ "chalk": "^2.0.0",
+ "lodash": "4.17.11",
+ "throat": "^4.1.0",
+ "vorpal": "^1.12.0"
+ },
+ "dependencies": {
+ "lodash": {
+ "version": "4.17.11",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz",
+ "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==",
+ "dev": true
+ }
+ }
+ },
+ "@commitlint/prompt-cli": {
+ "version": "7.6.1",
+ "resolved": "https://registry.npmjs.org/@commitlint/prompt-cli/-/prompt-cli-7.6.1.tgz",
+ "integrity": "sha512-enAagcRveCaXeTHuZhqFBSWrrimw5PplO+wXBNcu0uGRHDEAU9sapSYZnIraAZsQdYvJdtxrVNSS8LTRsM5uvw==",
+ "dev": true,
+ "requires": {
+ "@commitlint/prompt": "^7.6.1",
+ "execa": "0.9.0",
+ "string-to-stream": "1.1.1"
+ }
+ },
+ "@commitlint/read": {
+ "version": "7.6.0",
+ "resolved": "https://registry.npmjs.org/@commitlint/read/-/read-7.6.0.tgz",
+ "integrity": "sha512-OyligtK/e4xnQklrQqTcSMM27eNhq+LqXfoeVouuPx059oDEw9wZYNN4HGzyxs4Pb6GdMpzRHLdeMQ24M+AiYw==",
+ "dev": true,
+ "requires": {
+ "@commitlint/top-level": "^7.6.0",
+ "@marionebl/sander": "^0.6.0",
+ "babel-runtime": "^6.23.0",
+ "git-raw-commits": "^1.3.0"
+ }
+ },
+ "@commitlint/resolve-extends": {
+ "version": "7.6.0",
+ "resolved": "https://registry.npmjs.org/@commitlint/resolve-extends/-/resolve-extends-7.6.0.tgz",
+ "integrity": "sha512-fk8KvNiEbRc+p8nPFuysVP2O95+sb8vlIDTjqtGVObqrzFINRfERXwqBmTBtcu556BoDAR2hwRVXmuwhns+Duw==",
+ "dev": true,
+ "requires": {
+ "babel-runtime": "6.26.0",
+ "import-fresh": "^3.0.0",
+ "lodash": "4.17.11",
+ "resolve-from": "^5.0.0",
+ "resolve-global": "^1.0.0"
+ },
+ "dependencies": {
+ "lodash": {
+ "version": "4.17.11",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz",
+ "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==",
+ "dev": true
+ }
+ }
+ },
+ "@commitlint/rules": {
+ "version": "7.6.0",
+ "resolved": "https://registry.npmjs.org/@commitlint/rules/-/rules-7.6.0.tgz",
+ "integrity": "sha512-shLJdMUwdVeE5UgOE8E+c+PFS7+0FFGfheMa3s6ZK+xX8pTUxseXZu9iCF4mwF+WWkVk518xPuNLvmYE96salQ==",
+ "dev": true,
+ "requires": {
+ "@commitlint/ensure": "^7.6.0",
+ "@commitlint/message": "^7.6.0",
+ "@commitlint/to-lines": "^7.6.0",
+ "babel-runtime": "^6.23.0"
+ }
+ },
+ "@commitlint/to-lines": {
+ "version": "7.6.0",
+ "resolved": "https://registry.npmjs.org/@commitlint/to-lines/-/to-lines-7.6.0.tgz",
+ "integrity": "sha512-L/Vl5ThRuBHnSNZBtc+p2LCs2ayxWodC+I/X3NKUywSmr6kKpJJCFqHHHqPu+yXwGUPwqCMQhogIGLuv9TtWWw==",
+ "dev": true
+ },
+ "@commitlint/top-level": {
+ "version": "7.6.0",
+ "resolved": "https://registry.npmjs.org/@commitlint/top-level/-/top-level-7.6.0.tgz",
+ "integrity": "sha512-R2RzJZDuT2TU2dZMrRd7olax5IDVcUB/O8k76d1LW13CQ9/2ArJi3TCFXSZIaGpCUnyAYA5KiCZ+c1opnyQuog==",
+ "dev": true,
+ "requires": {
+ "find-up": "^2.1.0"
+ }
+ },
+ "@marionebl/sander": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/@marionebl/sander/-/sander-0.6.1.tgz",
+ "integrity": "sha1-GViWWHTyS8Ub5Ih1/rUNZC/EH3s=",
+ "dev": true,
+ "requires": {
+ "graceful-fs": "^4.1.3",
+ "mkdirp": "^0.5.1",
+ "rimraf": "^2.5.2"
+ }
+ },
+ "@types/babel-types": {
+ "version": "7.0.7",
+ "resolved": "https://registry.npmjs.org/@types/babel-types/-/babel-types-7.0.7.tgz",
+ "integrity": "sha512-dBtBbrc+qTHy1WdfHYjBwRln4+LWqASWakLHsWHR2NWHIFkv4W3O070IGoGLEBrJBvct3r0L1BUPuvURi7kYUQ==",
+ "dev": true
+ },
+ "@types/babylon": {
+ "version": "6.16.5",
+ "resolved": "https://registry.npmjs.org/@types/babylon/-/babylon-6.16.5.tgz",
+ "integrity": "sha512-xH2e58elpj1X4ynnKp9qSnWlsRTIs6n3tgLGNfwAGHwePw0mulHQllV34n0T25uYSu1k0hRKkWXF890B1yS47w==",
+ "dev": true,
+ "requires": {
+ "@types/babel-types": "*"
+ }
+ },
+ "JSONStream": {
+ "version": "1.3.5",
+ "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz",
+ "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==",
+ "dev": true,
+ "requires": {
+ "jsonparse": "^1.2.0",
+ "through": ">=2.2.7 <3"
+ }
+ },
+ "acorn": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz",
+ "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=",
+ "dev": true
+ },
+ "acorn-globals": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-3.1.0.tgz",
+ "integrity": "sha1-/YJw9x+7SZawBPqIDuXUZXOnMb8=",
+ "dev": true,
+ "requires": {
+ "acorn": "^4.0.4"
+ },
+ "dependencies": {
+ "acorn": {
+ "version": "4.0.13",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz",
+ "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=",
+ "dev": true
+ }
+ }
+ },
+ "align-text": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz",
+ "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=",
+ "dev": true,
+ "requires": {
+ "kind-of": "^3.0.2",
+ "longest": "^1.0.1",
+ "repeat-string": "^1.5.2"
+ }
+ },
+ "ansi-escapes": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz",
+ "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=",
+ "dev": true
+ },
+ "ansi-regex": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
+ "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
+ "dev": true
+ },
+ "ansi-styles": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^1.9.0"
+ }
+ },
+ "anymatch": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz",
+ "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==",
+ "dev": true,
+ "requires": {
+ "normalize-path": "^3.0.0",
+ "picomatch": "^2.0.4"
+ }
+ },
+ "argparse": {
+ "version": "1.0.10",
+ "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
+ "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
+ "dev": true,
+ "requires": {
+ "sprintf-js": "~1.0.2"
+ }
+ },
+ "array-find-index": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz",
+ "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=",
+ "dev": true
+ },
+ "array-ify": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/array-ify/-/array-ify-1.0.0.tgz",
+ "integrity": "sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4=",
+ "dev": true
+ },
+ "arrify": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
+ "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=",
+ "dev": true
+ },
+ "asap": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz",
+ "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=",
+ "dev": true
+ },
+ "babel-polyfill": {
+ "version": "6.26.0",
+ "resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.26.0.tgz",
+ "integrity": "sha1-N5k3q8Z9eJWXCtxiHyhM2WbPIVM=",
+ "dev": true,
+ "requires": {
+ "babel-runtime": "^6.26.0",
+ "core-js": "^2.5.0",
+ "regenerator-runtime": "^0.10.5"
+ },
+ "dependencies": {
+ "regenerator-runtime": {
+ "version": "0.10.5",
+ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz",
+ "integrity": "sha1-M2w+/BIgrc7dosn6tntaeVWjNlg=",
+ "dev": true
+ }
+ }
+ },
+ "babel-runtime": {
+ "version": "6.26.0",
+ "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz",
+ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=",
+ "dev": true,
+ "requires": {
+ "core-js": "^2.4.0",
+ "regenerator-runtime": "^0.11.0"
+ }
+ },
+ "babel-types": {
+ "version": "6.26.0",
+ "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz",
+ "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=",
+ "dev": true,
+ "requires": {
+ "babel-runtime": "^6.26.0",
+ "esutils": "^2.0.2",
+ "lodash": "^4.17.4",
+ "to-fast-properties": "^1.0.3"
+ }
+ },
+ "babylon": {
+ "version": "6.18.0",
+ "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz",
+ "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==",
+ "dev": true
+ },
+ "balanced-match": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
+ "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
+ "dev": true
+ },
+ "binary-extensions": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz",
+ "integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==",
+ "dev": true
+ },
+ "brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
+ "requires": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "braces": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
+ "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
+ "dev": true,
+ "requires": {
+ "fill-range": "^7.0.1"
+ }
+ },
+ "caller-callsite": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz",
+ "integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=",
+ "dev": true,
+ "requires": {
+ "callsites": "^2.0.0"
+ },
+ "dependencies": {
+ "callsites": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz",
+ "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=",
+ "dev": true
+ }
+ }
+ },
+ "caller-path": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz",
+ "integrity": "sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=",
+ "dev": true,
+ "requires": {
+ "caller-callsite": "^2.0.0"
+ }
+ },
+ "callsites": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
+ "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
+ "dev": true
+ },
+ "camelcase": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
+ "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=",
+ "dev": true
+ },
+ "camelcase-keys": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-4.2.0.tgz",
+ "integrity": "sha1-oqpfsa9oh1glnDLBQUJteJI7m3c=",
+ "dev": true,
+ "requires": {
+ "camelcase": "^4.1.0",
+ "map-obj": "^2.0.0",
+ "quick-lru": "^1.0.0"
+ }
+ },
+ "center-align": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz",
+ "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=",
+ "dev": true,
+ "requires": {
+ "align-text": "^0.1.3",
+ "lazy-cache": "^1.0.3"
+ }
+ },
+ "chalk": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.1.tgz",
+ "integrity": "sha512-QUU4ofkDoMIVO7hcx1iPTISs88wsO8jA92RQIm4JAwZvFGGAV2hSAA1NX7oVj2Ej2Q6NDTcRDjPTFrMCRZoJ6g==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^3.2.0",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.2.0"
+ }
+ },
+ "character-parser": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/character-parser/-/character-parser-2.2.0.tgz",
+ "integrity": "sha1-x84o821LzZdE5f/CxfzeHHMmH8A=",
+ "dev": true,
+ "requires": {
+ "is-regex": "^1.0.3"
+ }
+ },
+ "chokidar": {
+ "version": "3.3.1",
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.1.tgz",
+ "integrity": "sha512-4QYCEWOcK3OJrxwvyyAOxFuhpvOVCYkr33LPfFNBjAD/w3sEzWsp2BUOkI4l9bHvWioAd0rc6NlHUOEaWkTeqg==",
+ "dev": true,
+ "requires": {
+ "anymatch": "~3.1.1",
+ "braces": "~3.0.2",
+ "fsevents": "~2.1.2",
+ "glob-parent": "~5.1.0",
+ "is-binary-path": "~2.1.0",
+ "is-glob": "~4.0.1",
+ "normalize-path": "~3.0.0",
+ "readdirp": "~3.3.0"
+ }
+ },
+ "ci-info": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz",
+ "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==",
+ "dev": true
+ },
+ "clean-css": {
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.3.tgz",
+ "integrity": "sha512-VcMWDN54ZN/DS+g58HYL5/n4Zrqe8vHJpGA8KdgUXFU4fuP/aHNw8eld9SyEIyabIMJX/0RaY/fplOo5hYLSFA==",
+ "dev": true,
+ "requires": {
+ "source-map": "~0.6.0"
+ }
+ },
+ "cli-cursor": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz",
+ "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=",
+ "dev": true,
+ "requires": {
+ "restore-cursor": "^1.0.1"
+ }
+ },
+ "cli-width": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-1.1.1.tgz",
+ "integrity": "sha1-pNKT72frt7iNSk1CwMzwDE0eNm0=",
+ "dev": true
+ },
+ "cliui": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz",
+ "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=",
+ "dev": true,
+ "requires": {
+ "center-align": "^0.1.1",
+ "right-align": "^0.1.1",
+ "wordwrap": "0.0.2"
+ }
+ },
+ "code-point-at": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
+ "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
+ "dev": true
+ },
+ "color-convert": {
+ "version": "1.9.3",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+ "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+ "dev": true,
+ "requires": {
+ "color-name": "1.1.3"
+ }
+ },
+ "color-name": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
+ "dev": true
+ },
+ "compare-func": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-1.3.2.tgz",
+ "integrity": "sha1-md0LpFfh+bxyKxLAjsM+6rMfpkg=",
+ "dev": true,
+ "requires": {
+ "array-ify": "^1.0.0",
+ "dot-prop": "^3.0.0"
+ }
+ },
+ "concat-map": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
+ "dev": true
+ },
+ "constantinople": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/constantinople/-/constantinople-3.1.2.tgz",
+ "integrity": "sha512-yePcBqEFhLOqSBtwYOGGS1exHo/s1xjekXiinh4itpNQGCu4KA1euPh1fg07N2wMITZXQkBz75Ntdt1ctGZouw==",
+ "dev": true,
+ "requires": {
+ "@types/babel-types": "^7.0.0",
+ "@types/babylon": "^6.16.2",
+ "babel-types": "^6.26.0",
+ "babylon": "^6.18.0"
+ }
+ },
+ "conventional-changelog-angular": {
+ "version": "1.6.6",
+ "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-1.6.6.tgz",
+ "integrity": "sha512-suQnFSqCxRwyBxY68pYTsFkG0taIdinHLNEAX5ivtw8bCRnIgnpvcHmlR/yjUyZIrNPYAoXlY1WiEKWgSE4BNg==",
+ "dev": true,
+ "requires": {
+ "compare-func": "^1.3.1",
+ "q": "^1.5.1"
+ }
+ },
+ "conventional-commits-parser": {
+ "version": "2.1.7",
+ "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-2.1.7.tgz",
+ "integrity": "sha512-BoMaddIEJ6B4QVMSDu9IkVImlGOSGA1I2BQyOZHeLQ6qVOJLcLKn97+fL6dGbzWEiqDzfH4OkcveULmeq2MHFQ==",
+ "dev": true,
+ "requires": {
+ "JSONStream": "^1.0.4",
+ "is-text-path": "^1.0.0",
+ "lodash": "^4.2.1",
+ "meow": "^4.0.0",
+ "split2": "^2.0.0",
+ "through2": "^2.0.0",
+ "trim-off-newlines": "^1.0.0"
+ },
+ "dependencies": {
+ "meow": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/meow/-/meow-4.0.1.tgz",
+ "integrity": "sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A==",
+ "dev": true,
+ "requires": {
+ "camelcase-keys": "^4.0.0",
+ "decamelize-keys": "^1.0.0",
+ "loud-rejection": "^1.0.0",
+ "minimist": "^1.1.3",
+ "minimist-options": "^3.0.1",
+ "normalize-package-data": "^2.3.4",
+ "read-pkg-up": "^3.0.0",
+ "redent": "^2.0.0",
+ "trim-newlines": "^2.0.0"
+ }
+ }
+ }
+ },
+ "core-js": {
+ "version": "2.6.11",
+ "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.11.tgz",
+ "integrity": "sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg==",
+ "dev": true
+ },
+ "core-util-is": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
+ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
+ "dev": true
+ },
+ "cosmiconfig": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz",
+ "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==",
+ "dev": true,
+ "requires": {
+ "import-fresh": "^2.0.0",
+ "is-directory": "^0.3.1",
+ "js-yaml": "^3.13.1",
+ "parse-json": "^4.0.0"
+ },
+ "dependencies": {
+ "import-fresh": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz",
+ "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=",
+ "dev": true,
+ "requires": {
+ "caller-path": "^2.0.0",
+ "resolve-from": "^3.0.0"
+ }
+ },
+ "js-yaml": {
+ "version": "3.13.1",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz",
+ "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==",
+ "dev": true,
+ "requires": {
+ "argparse": "^1.0.7",
+ "esprima": "^4.0.0"
+ }
+ },
+ "resolve-from": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz",
+ "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=",
+ "dev": true
+ }
+ }
+ },
+ "cross-spawn": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz",
+ "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=",
+ "dev": true,
+ "requires": {
+ "lru-cache": "^4.0.1",
+ "shebang-command": "^1.2.0",
+ "which": "^1.2.9"
+ }
+ },
+ "currently-unhandled": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz",
+ "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=",
+ "dev": true,
+ "requires": {
+ "array-find-index": "^1.0.1"
+ }
+ },
+ "dargs": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/dargs/-/dargs-4.1.0.tgz",
+ "integrity": "sha1-A6nbtLXC8Tm/FK5T8LiipqhvThc=",
+ "dev": true,
+ "requires": {
+ "number-is-nan": "^1.0.0"
+ }
+ },
+ "decamelize": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
+ "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
+ "dev": true
+ },
+ "decamelize-keys": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.0.tgz",
+ "integrity": "sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=",
+ "dev": true,
+ "requires": {
+ "decamelize": "^1.1.0",
+ "map-obj": "^1.0.0"
+ },
+ "dependencies": {
+ "map-obj": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz",
+ "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=",
+ "dev": true
+ }
+ }
+ },
+ "doctypes": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/doctypes/-/doctypes-1.1.0.tgz",
+ "integrity": "sha1-6oCxBqh1OHdOijpKWv4pPeSJ4Kk=",
+ "dev": true
+ },
+ "dot-prop": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-3.0.0.tgz",
+ "integrity": "sha1-G3CK8JSknJoOfbyteQq6U52sEXc=",
+ "dev": true,
+ "requires": {
+ "is-obj": "^1.0.0"
+ }
+ },
+ "end-of-stream": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz",
+ "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==",
+ "dev": true,
+ "requires": {
+ "once": "^1.4.0"
+ }
+ },
+ "error-ex": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
+ "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
+ "dev": true,
+ "requires": {
+ "is-arrayish": "^0.2.1"
+ }
+ },
+ "escape-string-regexp": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
+ "dev": true
+ },
+ "esprima": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
+ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
+ "dev": true
+ },
+ "esutils": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
+ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
+ "dev": true
+ },
+ "execa": {
+ "version": "0.9.0",
+ "resolved": "https://registry.npmjs.org/execa/-/execa-0.9.0.tgz",
+ "integrity": "sha512-BbUMBiX4hqiHZUA5+JujIjNb6TyAlp2D5KLheMjMluwOuzcnylDL4AxZYLLn1n2AGB49eSWwyKvvEQoRpnAtmA==",
+ "dev": true,
+ "requires": {
+ "cross-spawn": "^5.0.1",
+ "get-stream": "^3.0.0",
+ "is-stream": "^1.1.0",
+ "npm-run-path": "^2.0.0",
+ "p-finally": "^1.0.0",
+ "signal-exit": "^3.0.0",
+ "strip-eof": "^1.0.0"
+ }
+ },
+ "exit-hook": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz",
+ "integrity": "sha1-8FyiM7SMBdVP/wd2XfhQfpXAL/g=",
+ "dev": true
+ },
+ "figures": {
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz",
+ "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=",
+ "dev": true,
+ "requires": {
+ "escape-string-regexp": "^1.0.5",
+ "object-assign": "^4.1.0"
+ }
+ },
+ "fill-range": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
+ "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
+ "dev": true,
+ "requires": {
+ "to-regex-range": "^5.0.1"
+ }
+ },
+ "find-up": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
+ "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=",
+ "dev": true,
+ "requires": {
+ "locate-path": "^2.0.0"
+ }
+ },
+ "fs.realpath": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
+ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
+ "dev": true
+ },
+ "fsevents": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.2.tgz",
+ "integrity": "sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA==",
+ "dev": true,
+ "optional": true
+ },
+ "function-bind": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
+ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
+ "dev": true
+ },
+ "get-stdin": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-7.0.0.tgz",
+ "integrity": "sha512-zRKcywvrXlXsA0v0i9Io4KDRaAw7+a1ZpjRwl9Wox8PFlVCCHra7E9c4kqXCoCM9nR5tBkaTTZRBoCm60bFqTQ==",
+ "dev": true
+ },
+ "get-stream": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
+ "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=",
+ "dev": true
+ },
+ "git-raw-commits": {
+ "version": "1.3.6",
+ "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-1.3.6.tgz",
+ "integrity": "sha512-svsK26tQ8vEKnMshTDatSIQSMDdz8CxIIqKsvPqbtV23Etmw6VNaFAitu8zwZ0VrOne7FztwPyRLxK7/DIUTQg==",
+ "dev": true,
+ "requires": {
+ "dargs": "^4.0.1",
+ "lodash.template": "^4.0.2",
+ "meow": "^4.0.0",
+ "split2": "^2.0.0",
+ "through2": "^2.0.0"
+ },
+ "dependencies": {
+ "meow": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/meow/-/meow-4.0.1.tgz",
+ "integrity": "sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A==",
+ "dev": true,
+ "requires": {
+ "camelcase-keys": "^4.0.0",
+ "decamelize-keys": "^1.0.0",
+ "loud-rejection": "^1.0.0",
+ "minimist": "^1.1.3",
+ "minimist-options": "^3.0.1",
+ "normalize-package-data": "^2.3.4",
+ "read-pkg-up": "^3.0.0",
+ "redent": "^2.0.0",
+ "trim-newlines": "^2.0.0"
+ }
+ }
+ }
+ },
+ "glob": {
+ "version": "7.1.6",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
+ "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
+ "dev": true,
+ "requires": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.0.4",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ }
+ },
+ "glob-parent": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz",
+ "integrity": "sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==",
+ "dev": true,
+ "requires": {
+ "is-glob": "^4.0.1"
+ }
+ },
+ "global-dirs": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz",
+ "integrity": "sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=",
+ "dev": true,
+ "requires": {
+ "ini": "^1.3.4"
+ }
+ },
+ "graceful-fs": {
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz",
+ "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==",
+ "dev": true
+ },
+ "has": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
+ "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
+ "dev": true,
+ "requires": {
+ "function-bind": "^1.1.1"
+ }
+ },
+ "has-ansi": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
+ "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
+ "dev": true,
+ "requires": {
+ "ansi-regex": "^2.0.0"
+ }
+ },
+ "has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+ "dev": true
+ },
+ "hosted-git-info": {
+ "version": "2.7.1",
+ "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz",
+ "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==",
+ "dev": true
+ },
+ "husky": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/husky/-/husky-1.3.1.tgz",
+ "integrity": "sha512-86U6sVVVf4b5NYSZ0yvv88dRgBSSXXmHaiq5pP4KDj5JVzdwKgBjEtUPOm8hcoytezFwbU+7gotXNhpHdystlg==",
+ "dev": true,
+ "requires": {
+ "cosmiconfig": "^5.0.7",
+ "execa": "^1.0.0",
+ "find-up": "^3.0.0",
+ "get-stdin": "^6.0.0",
+ "is-ci": "^2.0.0",
+ "pkg-dir": "^3.0.0",
+ "please-upgrade-node": "^3.1.1",
+ "read-pkg": "^4.0.1",
+ "run-node": "^1.0.0",
+ "slash": "^2.0.0"
+ },
+ "dependencies": {
+ "cosmiconfig": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.0.tgz",
+ "integrity": "sha512-nxt+Nfc3JAqf4WIWd0jXLjTJZmsPLrA9DDc4nRw2KFJQJK7DNooqSXrNI7tzLG50CF8axczly5UV929tBmh/7g==",
+ "dev": true,
+ "requires": {
+ "import-fresh": "^2.0.0",
+ "is-directory": "^0.3.1",
+ "js-yaml": "^3.13.0",
+ "parse-json": "^4.0.0"
+ }
+ },
+ "cross-spawn": {
+ "version": "6.0.5",
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
+ "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
+ "dev": true,
+ "requires": {
+ "nice-try": "^1.0.4",
+ "path-key": "^2.0.1",
+ "semver": "^5.5.0",
+ "shebang-command": "^1.2.0",
+ "which": "^1.2.9"
+ }
+ },
+ "execa": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz",
+ "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==",
+ "dev": true,
+ "requires": {
+ "cross-spawn": "^6.0.0",
+ "get-stream": "^4.0.0",
+ "is-stream": "^1.1.0",
+ "npm-run-path": "^2.0.0",
+ "p-finally": "^1.0.0",
+ "signal-exit": "^3.0.0",
+ "strip-eof": "^1.0.0"
+ }
+ },
+ "find-up": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
+ "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
+ "dev": true,
+ "requires": {
+ "locate-path": "^3.0.0"
+ }
+ },
+ "get-stdin": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz",
+ "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==",
+ "dev": true
+ },
+ "get-stream": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz",
+ "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==",
+ "dev": true,
+ "requires": {
+ "pump": "^3.0.0"
+ }
+ },
+ "import-fresh": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz",
+ "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=",
+ "dev": true,
+ "requires": {
+ "caller-path": "^2.0.0",
+ "resolve-from": "^3.0.0"
+ }
+ },
+ "locate-path": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
+ "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
+ "dev": true,
+ "requires": {
+ "p-locate": "^3.0.0",
+ "path-exists": "^3.0.0"
+ }
+ },
+ "p-limit": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz",
+ "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==",
+ "dev": true,
+ "requires": {
+ "p-try": "^2.0.0"
+ }
+ },
+ "p-locate": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
+ "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
+ "dev": true,
+ "requires": {
+ "p-limit": "^2.0.0"
+ }
+ },
+ "p-try": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.1.0.tgz",
+ "integrity": "sha512-H2RyIJ7+A3rjkwKC2l5GGtU4H1vkxKCAGsWasNVd0Set+6i4znxbWy6/j16YDPJDWxhsgZiKAstMEP8wCdSpjA==",
+ "dev": true
+ },
+ "read-pkg": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-4.0.1.tgz",
+ "integrity": "sha1-ljYlN48+HE1IyFhytabsfV0JMjc=",
+ "dev": true,
+ "requires": {
+ "normalize-package-data": "^2.3.2",
+ "parse-json": "^4.0.0",
+ "pify": "^3.0.0"
+ }
+ },
+ "resolve-from": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz",
+ "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=",
+ "dev": true
+ }
+ }
+ },
+ "import-fresh": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz",
+ "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==",
+ "dev": true,
+ "requires": {
+ "parent-module": "^1.0.0",
+ "resolve-from": "^4.0.0"
+ },
+ "dependencies": {
+ "resolve-from": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
+ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
+ "dev": true
+ }
+ }
+ },
+ "in-publish": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/in-publish/-/in-publish-2.0.0.tgz",
+ "integrity": "sha1-4g/146KvwmkDILbcVSaCqcf631E=",
+ "dev": true
+ },
+ "indent-string": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz",
+ "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=",
+ "dev": true
+ },
+ "inflight": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
+ "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
+ "dev": true,
+ "requires": {
+ "once": "^1.3.0",
+ "wrappy": "1"
+ }
+ },
+ "inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
+ "dev": true
+ },
+ "ini": {
+ "version": "1.3.5",
+ "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz",
+ "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==",
+ "dev": true
+ },
+ "inquirer": {
+ "version": "0.11.0",
+ "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-0.11.0.tgz",
+ "integrity": "sha1-dEi/qSQJKvMR1HFzu6uZDK4rsCc=",
+ "dev": true,
+ "requires": {
+ "ansi-escapes": "^1.1.0",
+ "ansi-regex": "^2.0.0",
+ "chalk": "^1.0.0",
+ "cli-cursor": "^1.0.1",
+ "cli-width": "^1.0.1",
+ "figures": "^1.3.5",
+ "lodash": "^3.3.1",
+ "readline2": "^1.0.1",
+ "run-async": "^0.1.0",
+ "rx-lite": "^3.1.2",
+ "strip-ansi": "^3.0.0",
+ "through": "^2.3.6"
+ },
+ "dependencies": {
+ "ansi-styles": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
+ "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
+ "dev": true
+ },
+ "chalk": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
+ "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^2.2.1",
+ "escape-string-regexp": "^1.0.2",
+ "has-ansi": "^2.0.0",
+ "strip-ansi": "^3.0.0",
+ "supports-color": "^2.0.0"
+ }
+ },
+ "lodash": {
+ "version": "3.10.1",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz",
+ "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=",
+ "dev": true
+ },
+ "supports-color": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
+ "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
+ "dev": true
+ }
+ }
+ },
+ "is-arrayish": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
+ "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=",
+ "dev": true
+ },
+ "is-binary-path": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
+ "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
+ "dev": true,
+ "requires": {
+ "binary-extensions": "^2.0.0"
+ }
+ },
+ "is-buffer": {
+ "version": "1.1.6",
+ "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
+ "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
+ "dev": true
+ },
+ "is-ci": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz",
+ "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==",
+ "dev": true,
+ "requires": {
+ "ci-info": "^2.0.0"
+ }
+ },
+ "is-directory": {
+ "version": "0.3.1",
+ "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz",
+ "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=",
+ "dev": true
+ },
+ "is-expression": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-expression/-/is-expression-3.0.0.tgz",
+ "integrity": "sha1-Oayqa+f9HzRx3ELHQW5hwkMXrJ8=",
+ "dev": true,
+ "requires": {
+ "acorn": "~4.0.2",
+ "object-assign": "^4.0.1"
+ },
+ "dependencies": {
+ "acorn": {
+ "version": "4.0.13",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz",
+ "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=",
+ "dev": true
+ }
+ }
+ },
+ "is-extglob": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
+ "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=",
+ "dev": true
+ },
+ "is-fullwidth-code-point": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
+ "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
+ "dev": true,
+ "requires": {
+ "number-is-nan": "^1.0.0"
+ }
+ },
+ "is-glob": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz",
+ "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==",
+ "dev": true,
+ "requires": {
+ "is-extglob": "^2.1.1"
+ }
+ },
+ "is-number": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
+ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
+ "dev": true
+ },
+ "is-obj": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz",
+ "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=",
+ "dev": true
+ },
+ "is-plain-obj": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz",
+ "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=",
+ "dev": true
+ },
+ "is-promise": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz",
+ "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=",
+ "dev": true
+ },
+ "is-regex": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz",
+ "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==",
+ "dev": true,
+ "requires": {
+ "has": "^1.0.3"
+ }
+ },
+ "is-stream": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
+ "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=",
+ "dev": true
+ },
+ "is-text-path": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-1.0.1.tgz",
+ "integrity": "sha1-Thqg+1G/vLPpJogAE5cgLBd1tm4=",
+ "dev": true,
+ "requires": {
+ "text-extensions": "^1.0.0"
+ }
+ },
+ "isarray": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+ "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
+ "dev": true
+ },
+ "isexe": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
+ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=",
+ "dev": true
+ },
+ "js-stringify": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/js-stringify/-/js-stringify-1.0.2.tgz",
+ "integrity": "sha1-Fzb939lyTyijaCrcYjCufk6Weds=",
+ "dev": true
+ },
+ "js-yaml": {
+ "version": "3.13.0",
+ "resolved": "",
+ "dev": true,
+ "requires": {
+ "argparse": "^1.0.7",
+ "esprima": "^4.0.0"
+ }
+ },
+ "json-parse-better-errors": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz",
+ "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==",
+ "dev": true
+ },
+ "jsonparse": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz",
+ "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=",
+ "dev": true
+ },
+ "jstransformer": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/jstransformer/-/jstransformer-1.0.0.tgz",
+ "integrity": "sha1-7Yvwkh4vPx7U1cGkT2hwntJHIsM=",
+ "dev": true,
+ "requires": {
+ "is-promise": "^2.0.0",
+ "promise": "^7.0.1"
+ }
+ },
+ "kind-of": {
+ "version": "3.2.2",
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+ "dev": true,
+ "requires": {
+ "is-buffer": "^1.1.5"
+ }
+ },
+ "lazy-cache": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz",
+ "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=",
+ "dev": true
+ },
+ "load-json-file": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz",
+ "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=",
+ "dev": true,
+ "requires": {
+ "graceful-fs": "^4.1.2",
+ "parse-json": "^4.0.0",
+ "pify": "^3.0.0",
+ "strip-bom": "^3.0.0"
+ }
+ },
+ "locate-path": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz",
+ "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=",
+ "dev": true,
+ "requires": {
+ "p-locate": "^2.0.0",
+ "path-exists": "^3.0.0"
+ }
+ },
+ "lodash": {
+ "version": "4.17.15",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
+ "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
+ "dev": true
+ },
+ "lodash._reinterpolate": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz",
+ "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=",
+ "dev": true
+ },
+ "lodash.template": {
+ "version": "4.5.0",
+ "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.5.0.tgz",
+ "integrity": "sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A==",
+ "dev": true,
+ "requires": {
+ "lodash._reinterpolate": "^3.0.0",
+ "lodash.templatesettings": "^4.0.0"
+ }
+ },
+ "lodash.templatesettings": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz",
+ "integrity": "sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ==",
+ "dev": true,
+ "requires": {
+ "lodash._reinterpolate": "^3.0.0"
+ }
+ },
+ "log-update": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/log-update/-/log-update-1.0.2.tgz",
+ "integrity": "sha1-GZKfZMQJPS0ucHWh2tivWcKWuNE=",
+ "dev": true,
+ "requires": {
+ "ansi-escapes": "^1.0.0",
+ "cli-cursor": "^1.0.2"
+ }
+ },
+ "longest": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz",
+ "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=",
+ "dev": true
+ },
+ "loud-rejection": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz",
+ "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=",
+ "dev": true,
+ "requires": {
+ "currently-unhandled": "^0.4.1",
+ "signal-exit": "^3.0.0"
+ }
+ },
+ "lru-cache": {
+ "version": "4.1.5",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz",
+ "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==",
+ "dev": true,
+ "requires": {
+ "pseudomap": "^1.0.2",
+ "yallist": "^2.1.2"
+ }
+ },
+ "map-obj": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-2.0.0.tgz",
+ "integrity": "sha1-plzSkIepJZi4eRJXpSPgISIqwfk=",
+ "dev": true
+ },
+ "meow": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/meow/-/meow-5.0.0.tgz",
+ "integrity": "sha512-CbTqYU17ABaLefO8vCU153ZZlprKYWDljcndKKDCFcYQITzWCXZAVk4QMFZPgvzrnUQ3uItnIE/LoUOwrT15Ig==",
+ "dev": true,
+ "requires": {
+ "camelcase-keys": "^4.0.0",
+ "decamelize-keys": "^1.0.0",
+ "loud-rejection": "^1.0.0",
+ "minimist-options": "^3.0.1",
+ "normalize-package-data": "^2.3.4",
+ "read-pkg-up": "^3.0.0",
+ "redent": "^2.0.0",
+ "trim-newlines": "^2.0.0",
+ "yargs-parser": "^10.0.0"
+ }
+ },
+ "minimatch": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
+ "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
+ "dev": true,
+ "requires": {
+ "brace-expansion": "^1.1.7"
+ }
+ },
+ "minimist": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
+ "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
+ "dev": true
+ },
+ "minimist-options": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-3.0.2.tgz",
+ "integrity": "sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ==",
+ "dev": true,
+ "requires": {
+ "arrify": "^1.0.1",
+ "is-plain-obj": "^1.1.0"
+ }
+ },
+ "mkdirp": {
+ "version": "0.5.1",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
+ "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
+ "dev": true,
+ "requires": {
+ "minimist": "0.0.8"
+ },
+ "dependencies": {
+ "minimist": {
+ "version": "0.0.8",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
+ "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
+ "dev": true
+ }
+ }
+ },
+ "mute-stream": {
+ "version": "0.0.5",
+ "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.5.tgz",
+ "integrity": "sha1-j7+rsKmKJT0xhDMfno3rc3L6xsA=",
+ "dev": true
+ },
+ "nice-try": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
+ "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==",
+ "dev": true
+ },
+ "node-localstorage": {
+ "version": "0.6.0",
+ "resolved": "https://registry.npmjs.org/node-localstorage/-/node-localstorage-0.6.0.tgz",
+ "integrity": "sha1-RaBgHGky395mRKIzYfG+Fzx1068=",
+ "dev": true
+ },
+ "normalize-package-data": {
+ "version": "2.5.0",
+ "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz",
+ "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==",
+ "dev": true,
+ "requires": {
+ "hosted-git-info": "^2.1.4",
+ "resolve": "^1.10.0",
+ "semver": "2 || 3 || 4 || 5",
+ "validate-npm-package-license": "^3.0.1"
+ }
+ },
+ "normalize-path": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
+ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
+ "dev": true
+ },
+ "npm-run-path": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
+ "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=",
+ "dev": true,
+ "requires": {
+ "path-key": "^2.0.0"
+ }
+ },
+ "number-is-nan": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
+ "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
+ "dev": true
+ },
+ "object-assign": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
+ "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
+ "dev": true
+ },
+ "once": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+ "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
+ "dev": true,
+ "requires": {
+ "wrappy": "1"
+ }
+ },
+ "onetime": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz",
+ "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=",
+ "dev": true
+ },
+ "p-finally": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz",
+ "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=",
+ "dev": true
+ },
+ "p-limit": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz",
+ "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==",
+ "dev": true,
+ "requires": {
+ "p-try": "^1.0.0"
+ }
+ },
+ "p-locate": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz",
+ "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=",
+ "dev": true,
+ "requires": {
+ "p-limit": "^1.1.0"
+ }
+ },
+ "p-try": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz",
+ "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=",
+ "dev": true
+ },
+ "parent-module": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
+ "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",
+ "dev": true,
+ "requires": {
+ "callsites": "^3.0.0"
+ }
+ },
+ "parse-json": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz",
+ "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=",
+ "dev": true,
+ "requires": {
+ "error-ex": "^1.3.1",
+ "json-parse-better-errors": "^1.0.1"
+ }
+ },
+ "path-exists": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
+ "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
+ "dev": true
+ },
+ "path-is-absolute": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
+ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
+ "dev": true
+ },
+ "path-key": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
+ "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=",
+ "dev": true
+ },
+ "path-parse": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
+ "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==",
+ "dev": true
+ },
+ "path-type": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz",
+ "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==",
+ "dev": true,
+ "requires": {
+ "pify": "^3.0.0"
+ }
+ },
+ "picomatch": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.1.tgz",
+ "integrity": "sha512-ISBaA8xQNmwELC7eOjqFKMESB2VIqt4PPDD0nsS95b/9dZXvVKOlz9keMSnoGGKcOHXfTvDD6WMaRoSc9UuhRA==",
+ "dev": true
+ },
+ "pify": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
+ "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
+ "dev": true
+ },
+ "pkg-dir": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz",
+ "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==",
+ "dev": true,
+ "requires": {
+ "find-up": "^3.0.0"
+ },
+ "dependencies": {
+ "find-up": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
+ "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
+ "dev": true,
+ "requires": {
+ "locate-path": "^3.0.0"
+ }
+ },
+ "locate-path": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
+ "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
+ "dev": true,
+ "requires": {
+ "p-locate": "^3.0.0",
+ "path-exists": "^3.0.0"
+ }
+ },
+ "p-limit": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz",
+ "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==",
+ "dev": true,
+ "requires": {
+ "p-try": "^2.0.0"
+ }
+ },
+ "p-locate": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
+ "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
+ "dev": true,
+ "requires": {
+ "p-limit": "^2.0.0"
+ }
+ },
+ "p-try": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.1.0.tgz",
+ "integrity": "sha512-H2RyIJ7+A3rjkwKC2l5GGtU4H1vkxKCAGsWasNVd0Set+6i4znxbWy6/j16YDPJDWxhsgZiKAstMEP8wCdSpjA==",
+ "dev": true
+ }
+ }
+ },
+ "please-upgrade-node": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.1.1.tgz",
+ "integrity": "sha512-KY1uHnQ2NlQHqIJQpnh/i54rKkuxCEBx+voJIS/Mvb+L2iYd2NMotwduhKTMjfC1uKoX3VXOxLjIYG66dfJTVQ==",
+ "dev": true,
+ "requires": {
+ "semver-compare": "^1.0.0"
+ }
+ },
+ "process-nextick-args": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
+ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==",
+ "dev": true
+ },
+ "promise": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz",
+ "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==",
+ "dev": true,
+ "requires": {
+ "asap": "~2.0.3"
+ }
+ },
+ "pseudomap": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
+ "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=",
+ "dev": true
+ },
+ "pug": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/pug/-/pug-2.0.4.tgz",
+ "integrity": "sha512-XhoaDlvi6NIzL49nu094R2NA6P37ijtgMDuWE+ofekDChvfKnzFal60bhSdiy8y2PBO6fmz3oMEIcfpBVRUdvw==",
+ "dev": true,
+ "requires": {
+ "pug-code-gen": "^2.0.2",
+ "pug-filters": "^3.1.1",
+ "pug-lexer": "^4.1.0",
+ "pug-linker": "^3.0.6",
+ "pug-load": "^2.0.12",
+ "pug-parser": "^5.0.1",
+ "pug-runtime": "^2.0.5",
+ "pug-strip-comments": "^1.0.4"
+ }
+ },
+ "pug-attrs": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/pug-attrs/-/pug-attrs-2.0.4.tgz",
+ "integrity": "sha512-TaZ4Z2TWUPDJcV3wjU3RtUXMrd3kM4Wzjbe3EWnSsZPsJ3LDI0F3yCnf2/W7PPFF+edUFQ0HgDL1IoxSz5K8EQ==",
+ "dev": true,
+ "requires": {
+ "constantinople": "^3.0.1",
+ "js-stringify": "^1.0.1",
+ "pug-runtime": "^2.0.5"
+ }
+ },
+ "pug-code-gen": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/pug-code-gen/-/pug-code-gen-2.0.2.tgz",
+ "integrity": "sha512-kROFWv/AHx/9CRgoGJeRSm+4mLWchbgpRzTEn8XCiwwOy6Vh0gAClS8Vh5TEJ9DBjaP8wCjS3J6HKsEsYdvaCw==",
+ "dev": true,
+ "requires": {
+ "constantinople": "^3.1.2",
+ "doctypes": "^1.1.0",
+ "js-stringify": "^1.0.1",
+ "pug-attrs": "^2.0.4",
+ "pug-error": "^1.3.3",
+ "pug-runtime": "^2.0.5",
+ "void-elements": "^2.0.1",
+ "with": "^5.0.0"
+ }
+ },
+ "pug-error": {
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/pug-error/-/pug-error-1.3.3.tgz",
+ "integrity": "sha512-qE3YhESP2mRAWMFJgKdtT5D7ckThRScXRwkfo+Erqga7dyJdY3ZquspprMCj/9sJ2ijm5hXFWQE/A3l4poMWiQ==",
+ "dev": true
+ },
+ "pug-filters": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/pug-filters/-/pug-filters-3.1.1.tgz",
+ "integrity": "sha512-lFfjNyGEyVWC4BwX0WyvkoWLapI5xHSM3xZJFUhx4JM4XyyRdO8Aucc6pCygnqV2uSgJFaJWW3Ft1wCWSoQkQg==",
+ "dev": true,
+ "requires": {
+ "clean-css": "^4.1.11",
+ "constantinople": "^3.0.1",
+ "jstransformer": "1.0.0",
+ "pug-error": "^1.3.3",
+ "pug-walk": "^1.1.8",
+ "resolve": "^1.1.6",
+ "uglify-js": "^2.6.1"
+ }
+ },
+ "pug-lexer": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/pug-lexer/-/pug-lexer-4.1.0.tgz",
+ "integrity": "sha512-i55yzEBtjm0mlplW4LoANq7k3S8gDdfC6+LThGEvsK4FuobcKfDAwt6V4jKPH9RtiE3a2Akfg5UpafZ1OksaPA==",
+ "dev": true,
+ "requires": {
+ "character-parser": "^2.1.1",
+ "is-expression": "^3.0.0",
+ "pug-error": "^1.3.3"
+ }
+ },
+ "pug-linker": {
+ "version": "3.0.6",
+ "resolved": "https://registry.npmjs.org/pug-linker/-/pug-linker-3.0.6.tgz",
+ "integrity": "sha512-bagfuHttfQOpANGy1Y6NJ+0mNb7dD2MswFG2ZKj22s8g0wVsojpRlqveEQHmgXXcfROB2RT6oqbPYr9EN2ZWzg==",
+ "dev": true,
+ "requires": {
+ "pug-error": "^1.3.3",
+ "pug-walk": "^1.1.8"
+ }
+ },
+ "pug-load": {
+ "version": "2.0.12",
+ "resolved": "https://registry.npmjs.org/pug-load/-/pug-load-2.0.12.tgz",
+ "integrity": "sha512-UqpgGpyyXRYgJs/X60sE6SIf8UBsmcHYKNaOccyVLEuT6OPBIMo6xMPhoJnqtB3Q3BbO4Z3Bjz5qDsUWh4rXsg==",
+ "dev": true,
+ "requires": {
+ "object-assign": "^4.1.0",
+ "pug-walk": "^1.1.8"
+ }
+ },
+ "pug-parser": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/pug-parser/-/pug-parser-5.0.1.tgz",
+ "integrity": "sha512-nGHqK+w07p5/PsPIyzkTQfzlYfuqoiGjaoqHv1LjOv2ZLXmGX1O+4Vcvps+P4LhxZ3drYSljjq4b+Naid126wA==",
+ "dev": true,
+ "requires": {
+ "pug-error": "^1.3.3",
+ "token-stream": "0.0.1"
+ }
+ },
+ "pug-runtime": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/pug-runtime/-/pug-runtime-2.0.5.tgz",
+ "integrity": "sha512-P+rXKn9un4fQY77wtpcuFyvFaBww7/91f3jHa154qU26qFAnOe6SW1CbIDcxiG5lLK9HazYrMCCuDvNgDQNptw==",
+ "dev": true
+ },
+ "pug-strip-comments": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/pug-strip-comments/-/pug-strip-comments-1.0.4.tgz",
+ "integrity": "sha512-i5j/9CS4yFhSxHp5iKPHwigaig/VV9g+FgReLJWWHEHbvKsbqL0oP/K5ubuLco6Wu3Kan5p7u7qk8A4oLLh6vw==",
+ "dev": true,
+ "requires": {
+ "pug-error": "^1.3.3"
+ }
+ },
+ "pug-walk": {
+ "version": "1.1.8",
+ "resolved": "https://registry.npmjs.org/pug-walk/-/pug-walk-1.1.8.tgz",
+ "integrity": "sha512-GMu3M5nUL3fju4/egXwZO0XLi6fW/K3T3VTgFQ14GxNi8btlxgT5qZL//JwZFm/2Fa64J/PNS8AZeys3wiMkVA==",
+ "dev": true
+ },
+ "pump": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
+ "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
+ "dev": true,
+ "requires": {
+ "end-of-stream": "^1.1.0",
+ "once": "^1.3.1"
+ }
+ },
+ "q": {
+ "version": "1.5.1",
+ "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
+ "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=",
+ "dev": true
+ },
+ "quick-lru": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-1.1.0.tgz",
+ "integrity": "sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g=",
+ "dev": true
+ },
+ "read-pkg": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz",
+ "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=",
+ "dev": true,
+ "requires": {
+ "load-json-file": "^4.0.0",
+ "normalize-package-data": "^2.3.2",
+ "path-type": "^3.0.0"
+ }
+ },
+ "read-pkg-up": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz",
+ "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=",
+ "dev": true,
+ "requires": {
+ "find-up": "^2.0.0",
+ "read-pkg": "^3.0.0"
+ }
+ },
+ "readable-stream": {
+ "version": "2.3.7",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
+ "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
+ "dev": true,
+ "requires": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.3",
+ "isarray": "~1.0.0",
+ "process-nextick-args": "~2.0.0",
+ "safe-buffer": "~5.1.1",
+ "string_decoder": "~1.1.1",
+ "util-deprecate": "~1.0.1"
+ }
+ },
+ "readdirp": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.3.0.tgz",
+ "integrity": "sha512-zz0pAkSPOXXm1viEwygWIPSPkcBYjW1xU5j/JBh5t9bGCJwa6f9+BJa6VaB2g+b55yVrmXzqkyLf4xaWYM0IkQ==",
+ "dev": true,
+ "requires": {
+ "picomatch": "^2.0.7"
+ }
+ },
+ "readline2": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/readline2/-/readline2-1.0.1.tgz",
+ "integrity": "sha1-QQWWCP/BVHV7cV2ZidGZ/783LjU=",
+ "dev": true,
+ "requires": {
+ "code-point-at": "^1.0.0",
+ "is-fullwidth-code-point": "^1.0.0",
+ "mute-stream": "0.0.5"
+ }
+ },
+ "redent": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/redent/-/redent-2.0.0.tgz",
+ "integrity": "sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo=",
+ "dev": true,
+ "requires": {
+ "indent-string": "^3.0.0",
+ "strip-indent": "^2.0.0"
+ }
+ },
+ "regenerator-runtime": {
+ "version": "0.11.1",
+ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
+ "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==",
+ "dev": true
+ },
+ "repeat-string": {
+ "version": "1.6.1",
+ "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz",
+ "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=",
+ "dev": true
+ },
+ "resolve": {
+ "version": "1.10.0",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz",
+ "integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==",
+ "dev": true,
+ "requires": {
+ "path-parse": "^1.0.6"
+ }
+ },
+ "resolve-from": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz",
+ "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==",
+ "dev": true
+ },
+ "resolve-global": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-global/-/resolve-global-1.0.0.tgz",
+ "integrity": "sha512-zFa12V4OLtT5XUX/Q4VLvTfBf+Ok0SPc1FNGM/z9ctUdiU618qwKpWnd0CHs3+RqROfyEg/DhuHbMWYqcgljEw==",
+ "dev": true,
+ "requires": {
+ "global-dirs": "^0.1.1"
+ }
+ },
+ "restore-cursor": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz",
+ "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=",
+ "dev": true,
+ "requires": {
+ "exit-hook": "^1.0.0",
+ "onetime": "^1.0.0"
+ }
+ },
+ "right-align": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz",
+ "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=",
+ "dev": true,
+ "requires": {
+ "align-text": "^0.1.1"
+ }
+ },
+ "rimraf": {
+ "version": "2.7.1",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
+ "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
+ "dev": true,
+ "requires": {
+ "glob": "^7.1.3"
+ }
+ },
+ "run-async": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/run-async/-/run-async-0.1.0.tgz",
+ "integrity": "sha1-yK1KXhEGYeQCp9IbUw4AnyX444k=",
+ "dev": true,
+ "requires": {
+ "once": "^1.3.0"
+ }
+ },
+ "run-node": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/run-node/-/run-node-1.0.0.tgz",
+ "integrity": "sha512-kc120TBlQ3mih1LSzdAJXo4xn/GWS2ec0l3S+syHDXP9uRr0JAT8Qd3mdMuyjqCzeZktgP3try92cEgf9Nks8A==",
+ "dev": true
+ },
+ "rx-lite": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-3.1.2.tgz",
+ "integrity": "sha1-Gc5QLKVyZl87ZHsQk5+X/RYV8QI=",
+ "dev": true
+ },
+ "safe-buffer": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+ "dev": true
+ },
+ "sass": {
+ "version": "1.25.0",
+ "resolved": "https://registry.npmjs.org/sass/-/sass-1.25.0.tgz",
+ "integrity": "sha512-uQMjye0Y70SEDGO56n0j91tauqS9E1BmpKHtiYNQScXDHeaE9uHwNEqQNFf4Bes/3DHMNinB6u79JsG10XWNyw==",
+ "dev": true,
+ "requires": {
+ "chokidar": ">=2.0.0 <4.0.0"
+ }
+ },
+ "semver": {
+ "version": "5.6.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz",
+ "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==",
+ "dev": true
+ },
+ "semver-compare": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz",
+ "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=",
+ "dev": true
+ },
+ "shebang-command": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
+ "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
+ "dev": true,
+ "requires": {
+ "shebang-regex": "^1.0.0"
+ }
+ },
+ "shebang-regex": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
+ "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=",
+ "dev": true
+ },
+ "signal-exit": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
+ "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
+ "dev": true
+ },
+ "slash": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz",
+ "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==",
+ "dev": true
+ },
+ "source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "dev": true
+ },
+ "spdx-correct": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz",
+ "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==",
+ "dev": true,
+ "requires": {
+ "spdx-expression-parse": "^3.0.0",
+ "spdx-license-ids": "^3.0.0"
+ }
+ },
+ "spdx-exceptions": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz",
+ "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==",
+ "dev": true
+ },
+ "spdx-expression-parse": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz",
+ "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==",
+ "dev": true,
+ "requires": {
+ "spdx-exceptions": "^2.1.0",
+ "spdx-license-ids": "^3.0.0"
+ }
+ },
+ "spdx-license-ids": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.3.tgz",
+ "integrity": "sha512-uBIcIl3Ih6Phe3XHK1NqboJLdGfwr1UN3k6wSD1dZpmPsIkb8AGNbZYJ1fOBk834+Gxy8rpfDxrS6XLEMZMY2g==",
+ "dev": true
+ },
+ "split2": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/split2/-/split2-2.2.0.tgz",
+ "integrity": "sha512-RAb22TG39LhI31MbreBgIuKiIKhVsawfTgEGqKHTK87aG+ul/PB8Sqoi3I7kVdRWiCfrKxK3uo4/YUkpNvhPbw==",
+ "dev": true,
+ "requires": {
+ "through2": "^2.0.2"
+ }
+ },
+ "sprintf-js": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
+ "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
+ "dev": true
+ },
+ "string-to-stream": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/string-to-stream/-/string-to-stream-1.1.1.tgz",
+ "integrity": "sha512-QySF2+3Rwq0SdO3s7BAp4x+c3qsClpPQ6abAmb0DGViiSBAkT5kL6JT2iyzEVP+T1SmzHrQD1TwlP9QAHCc+Sw==",
+ "dev": true,
+ "requires": {
+ "inherits": "^2.0.1",
+ "readable-stream": "^2.1.0"
+ }
+ },
+ "string-width": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
+ "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
+ "dev": true,
+ "requires": {
+ "code-point-at": "^1.0.0",
+ "is-fullwidth-code-point": "^1.0.0",
+ "strip-ansi": "^3.0.0"
+ }
+ },
+ "string_decoder": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+ "dev": true,
+ "requires": {
+ "safe-buffer": "~5.1.0"
+ }
+ },
+ "strip-ansi": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
+ "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
+ "dev": true,
+ "requires": {
+ "ansi-regex": "^2.0.0"
+ }
+ },
+ "strip-bom": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
+ "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=",
+ "dev": true
+ },
+ "strip-eof": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
+ "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=",
+ "dev": true
+ },
+ "strip-indent": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz",
+ "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=",
+ "dev": true
+ },
+ "supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^3.0.0"
+ }
+ },
+ "text-extensions": {
+ "version": "1.9.0",
+ "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.9.0.tgz",
+ "integrity": "sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ==",
+ "dev": true
+ },
+ "throat": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/throat/-/throat-4.1.0.tgz",
+ "integrity": "sha1-iQN8vJLFarGJJua6TLsgDhVnKmo=",
+ "dev": true
+ },
+ "through": {
+ "version": "2.3.8",
+ "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
+ "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=",
+ "dev": true
+ },
+ "through2": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz",
+ "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==",
+ "dev": true,
+ "requires": {
+ "readable-stream": "~2.3.6",
+ "xtend": "~4.0.1"
+ }
+ },
+ "to-fast-properties": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz",
+ "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=",
+ "dev": true
+ },
+ "to-regex-range": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
+ "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
+ "dev": true,
+ "requires": {
+ "is-number": "^7.0.0"
+ }
+ },
+ "token-stream": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/token-stream/-/token-stream-0.0.1.tgz",
+ "integrity": "sha1-zu78cXp2xDFvEm0LnbqlXX598Bo=",
+ "dev": true
+ },
+ "trim-newlines": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-2.0.0.tgz",
+ "integrity": "sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA=",
+ "dev": true
+ },
+ "trim-off-newlines": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz",
+ "integrity": "sha1-n5up2e+odkw4dpi8v+sshI8RrbM=",
+ "dev": true
+ },
+ "typescript": {
+ "version": "3.7.5",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.5.tgz",
+ "integrity": "sha512-/P5lkRXkWHNAbcJIiHPfRoKqyd7bsyCma1hZNUGfn20qm64T6ZBlrzprymeu918H+mB/0rIg2gGK/BXkhhYgBw==",
+ "dev": true
+ },
+ "uglify-js": {
+ "version": "2.8.29",
+ "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz",
+ "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=",
+ "dev": true,
+ "requires": {
+ "source-map": "~0.5.1",
+ "uglify-to-browserify": "~1.0.0",
+ "yargs": "~3.10.0"
+ },
+ "dependencies": {
+ "source-map": {
+ "version": "0.5.7",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
+ "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
+ "dev": true
+ }
+ }
+ },
+ "uglify-to-browserify": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz",
+ "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=",
+ "dev": true,
+ "optional": true
+ },
+ "util-deprecate": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
+ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
+ "dev": true
+ },
+ "validate-npm-package-license": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",
+ "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==",
+ "dev": true,
+ "requires": {
+ "spdx-correct": "^3.0.0",
+ "spdx-expression-parse": "^3.0.0"
+ }
+ },
+ "void-elements": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz",
+ "integrity": "sha1-wGavtYK7HLQSjWDqkjkulNXp2+w=",
+ "dev": true
+ },
+ "vorpal": {
+ "version": "1.12.0",
+ "resolved": "https://registry.npmjs.org/vorpal/-/vorpal-1.12.0.tgz",
+ "integrity": "sha1-S+eypOSPj8/JzzZIxBnTEcUiFZ0=",
+ "dev": true,
+ "requires": {
+ "babel-polyfill": "^6.3.14",
+ "chalk": "^1.1.0",
+ "in-publish": "^2.0.0",
+ "inquirer": "0.11.0",
+ "lodash": "^4.5.1",
+ "log-update": "^1.0.2",
+ "minimist": "^1.2.0",
+ "node-localstorage": "^0.6.0",
+ "strip-ansi": "^3.0.0",
+ "wrap-ansi": "^2.0.0"
+ },
+ "dependencies": {
+ "ansi-styles": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
+ "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
+ "dev": true
+ },
+ "chalk": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
+ "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^2.2.1",
+ "escape-string-regexp": "^1.0.2",
+ "has-ansi": "^2.0.0",
+ "strip-ansi": "^3.0.0",
+ "supports-color": "^2.0.0"
+ }
+ },
+ "supports-color": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
+ "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
+ "dev": true
+ }
+ }
+ },
+ "which": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
+ "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
+ "dev": true,
+ "requires": {
+ "isexe": "^2.0.0"
+ }
+ },
+ "window-size": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz",
+ "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=",
+ "dev": true
+ },
+ "with": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/with/-/with-5.1.1.tgz",
+ "integrity": "sha1-+k2qktrzLE6pTtRTyB8EaGtXXf4=",
+ "dev": true,
+ "requires": {
+ "acorn": "^3.1.0",
+ "acorn-globals": "^3.0.0"
+ }
+ },
+ "wordwrap": {
+ "version": "0.0.2",
+ "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz",
+ "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=",
+ "dev": true
+ },
+ "wrap-ansi": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",
+ "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=",
+ "dev": true,
+ "requires": {
+ "string-width": "^1.0.1",
+ "strip-ansi": "^3.0.1"
+ }
+ },
+ "wrappy": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
+ "dev": true
+ },
+ "xtend": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
+ "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
+ "dev": true
+ },
+ "yallist": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
+ "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=",
+ "dev": true
+ },
+ "yargs": {
+ "version": "3.10.0",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz",
+ "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=",
+ "dev": true,
+ "requires": {
+ "camelcase": "^1.0.2",
+ "cliui": "^2.1.0",
+ "decamelize": "^1.0.0",
+ "window-size": "0.1.0"
+ },
+ "dependencies": {
+ "camelcase": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz",
+ "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=",
+ "dev": true
+ }
+ }
+ },
+ "yargs-parser": {
+ "version": "10.1.0",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz",
+ "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==",
+ "dev": true,
+ "requires": {
+ "camelcase": "^4.1.0"
+ }
+ }
+ }
+}
diff --git a/front-end-libraries/learn-typescript-by-building-a-poker-game/package.json b/front-end-libraries/learn-typescript-by-building-a-poker-game/package.json
new file mode 100644
index 000000000..d6b3790ef
--- /dev/null
+++ b/front-end-libraries/learn-typescript-by-building-a-poker-game/package.json
@@ -0,0 +1,39 @@
+{
+ "name": "freecodecampproject",
+ "version": "1.0.0",
+ "description": "freeCodeCamp project demo",
+ "main": "index.js",
+ "scripts": {
+ "test": "test",
+ "commit": "commit"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/S1ngS1ng/freeCodeCampProject.git"
+ },
+ "keywords": [
+ "freeCodeCamp",
+ "fcc",
+ "project"
+ ],
+ "author": "S1ngS1ng",
+ "license": "BSD-3-Clause",
+ "bugs": {
+ "url": "https://github.com/S1ngS1ng/freeCodeCampProject/issues"
+ },
+ "homepage": "https://github.com/S1ngS1ng/freeCodeCampProject#readme",
+ "devDependencies": {
+ "@commitlint/cli": "^7.6.1",
+ "@commitlint/config-conventional": "^7.6.0",
+ "@commitlint/prompt-cli": "^7.6.1",
+ "husky": "^1.3.1",
+ "pug": "^2.0.4",
+ "sass": "^1.25.0",
+ "typescript": "^3.7.5"
+ },
+ "husky": {
+ "hooks": {
+ "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
+ }
+ }
+}
diff --git a/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/README.md b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/README.md
new file mode 100644
index 000000000..b14f0e125
--- /dev/null
+++ b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/README.md
@@ -0,0 +1,97 @@
+# Application Recipe
+**Note: This is the order in which I built this app. Hence it is just F.Y.I.**
+
+## Prerequisite
+### Workflow
+Generally, the workflow of this application is pretty straightforward:
+1. User type in the `username` (default to `'Ninja Cat'`)
+2. Create a session for the user with the initial cash of $100
+3. User set the bet and start the round
+4. Generate poker hands for the bot and the user
+5. Compare both poker hands, determine the winner and update the cash
+6. Show result
+7. User may start another round (goto step 3) or "cash out" (goto step 1)
+### Structure
+Consider the modules that we need to build this application. Here is what I thought by then:
+ - A Session module that handles user name and cash
+ - A Player module that handles player's hand (cards that the player holds). This turned out to be the Game module
+ - A Poker service that handles the logic of determining poker hand type and comparing poker hand
+ - Also, we'll need some place to cache the poker that has appeared so far. This is implemented in the Deck module
+
+## Generate card
+1. Consider types, as per TypeScript. Poker hand (either the player's or the bot's) are nothing but several poker cards, with each generated randomly. Deck is just bunch of poker cards. That said, we need a `PokerCard` class. Some may consider its better to name it as an interface. But I opt-in for class due to its versatility, and the ability to use it as a constructor. In my code, I name it as `Poker`
+2. So, how should we identify a real poker card? Simple, just `suit` (Spade, Heart, Club and Diamond) and `value` (from 2 to A). Both will be the attributes of `Poker`. In the application, here is what we've got so far:
+ - `CardSuit` and `CardValue` as `enum`
+ - `Card` as in `class`, this is the "PokerCard" mentioned above
+3. It is obvious that both `PokerHand` and `Deck` are `Poker[]` (some prefers the other notation `Array`), despite their difference in the `Poker` quantity
+4. Then, we may start working on the logic of generating random cards. Note that this action is related to the `Deck` as well. We don't want an Ace of Spade to appear twice on the table, nor do we want to overuse the deck. That's the reason why we need to keep a `cache` in the deck. For every card that is randomly generated, we'll save its suit and value to the `cache`
+5. In order to prevent generating duplicate cards, we'll need to check if the card is already generated in the `cache` object. If it is, just create another random card. It won't take hundreds of times before you get a valid card, no worries
+6. Moreover, I decided to do a "reshuffle" when certain amount of cards are plucked out from the current deck. Since I noticed in the real casino, they never use up a full deck of card. So, we'll need to keep a counter (named `count`) in the `Deck` module as well. As you may guess, "reshuffle" is just clearing/resetting the cache object, simple yet practical
+
+## Compare card
+### Cases
+1. There are altogether 11 poker hands, ranked from high to low (though, depending on the rule, Wheel and Steel Wheel may not apply):
+ 1. Straight flush (including Royal Flush, which is the highest)
+ 2. Steel wheel (a straight that starts with an A, then 2, 3, 4, 5. All in the same suit)
+ 3. Four of a kind
+ 4. Full house
+ 5. Flush
+ 6. Straight
+ 7. Wheel (a straight that starts with an A, then 2, 3, 4, 5)
+ 8. Three of a kind
+ 9. Two pair
+ 10. One pair
+ 11. High card
+2. The High Card should always be determined as an "else" (or "fallback") case. That said, when checks for all other poker hands (e.g. straight, one pair, full house, etc.) fail, then we can conclude that it is a High Card
+3. The logic to check for flush is tricky, especially for multi-deck game. For example, a two-deck game may form One Pair or Two Pair while it is still Flush at the same time. Since Flush ranks higher than either One Pair or Two Pair, checking for Flush should happen prior to determining One Pair or Two Pair
+4. Honestly, it is much easier for single-deck game, which is the rule that this app goes by. In this case, any poker hands other than Straight or its alike above High Card cannot be a Flush (Flush itself excluded, for sure). Hence, we just need to handle the logic of Steel Wheel and Straight Flush
+### Methodology
+1. Regarding a poker hand to be determined, it will be beneficial if we "massage" the data first. As mentioned above, `PokerHand` is `Poker[]` while `Poker` is simply an object with attributes `suit` and `value`
+2. Further more, consider the following cases:
+ - If there is only 1 kind of suit in a poker hand, then it is a Flush
+ - If there are 4 different values in a poker hand, then it must be a One Pair. e.g. player has `[5Spade, 2Club, 4Spade, 2Diamond, 9Heart]`, the values are `[5, 2, 4, 2, 9]`. Hence there are 4 different kinds of values
+ - If there are 3 different values in a poker hand, then it could be a Three of a kind, or it could also be a Two Pair as well
+ - If there are 2 different values in a poker hand, then it could be a Four of a kind, or it could also be a Full House
+3. The above cases introduce us to a crucial statement: **We need to get the count of the suit(s) and value(s) in a poker hand**
+4. Consider the following cases:
+ - When both the player and the bot have High Card, to determine the winner, we need to compare the largest card. If it is identical, we move to comparing the second largest card, then the third, etc. If all cards are identical in card value, it is a draw
+ - When both the player and the bot have Two Pairs, to determine the winner, we need to compare the largest pair, then the second largest pair, then the single card. If all are identical, it is a draw
+ - ...and so on
+5. The above cases lead to another crucial statement: **We need to sort each poker hand values for comparison**
+### Implementation of poker hand type determination
+1. Some of the poker hands are easy to determine:
+ - When a poker hand is both a Straight and a Flush, then it is a Straight Flush
+ - When a poker hand is both a Wheel and a Flush, then it is a Steel Wheel
+ - When a poker hand is a Wheel/Straight/Flush **ONLY**, then it is a Wheel/Straight/Flush, respectively
+2. Apparently, we'll need to build several functions for each check:
+ - `isStraight`: iterate through the poker hand and check if card value is consecutive by comparing the adjacent ones
+ - `isWheel`: since the only case for Wheel is `[2, 3, 4, 5, A]`, I decided to perform this check specifically
+ - `isFlush`: when the count of Suit is equal to `1` (i.e. only one Card Suit in the poker hand), it is a Flush
+3. For the rest, e.g. when there are altogether 2 different values in the poker hand, since it could be a Four of a kind, or it could be a Full House. But we should be able to tell if we can calculate the count of values. For Four of a kind, the count of values must be `4` and `1`. While for Full House, the count of values is `3` and `2`. Likewise, we could determine Three of a kind and Two Pair in this way.
+ - When `valueCount` is `2`
+ - When count of values includes `4`, it is Four of a kind
+ - Or else, it is a Full House
+ - When `valueCount` is `3`
+ - When count of values includes `3`, it is Three of a kind
+ - Or else, it is a Two Pair
+ - When `valueCount` is `4`
+ - It is a One Pair
+ - Else, it is High Card
+### Implementation of winner determination
+1. Compare the hand type. Higher hand type always wins
+2. If both the player and the bot have the same hand type
+ 1. Compare starting from the largest "special" card. For example, the largest pair in Two Pair, the three-card in Full House
+ 2. Compare second largest "special" card, if any. For example, the second largest pair in Two Pair
+ 3. Compare the largest "normal" card. For example, the largest single card in One Pair
+ 4. Compare the second largest "normal" card, if any. For example, the second largest single card in One Pair
+ 5. ...and so on
+3. If everything is identical, then it is a Draw
+
+# Some Random Thoughts
+## Singleton
+- There will be only one player in this game, hence only one `Session` is needed
+- Since there is only one `Session`, it makes sense to have only one `Deck` as well
+- `CardService` handles the logic of generating cards and the calculation of rank. Its instance is created upon using, a.k.a. lazy initialization. There is no need to make multiple instances co-exist. Hence the name "service" rather than "factory"
+- Classes under `util` are similar to the services. No multiple instance is needed
+## Barrel files
+- Personally, I consider [barrel file](https://basarat.gitbook.io/typescript/main-1/barrel) to be beneficial. With the help of barrel file, we don't have to specify the exact file that we are looking for when we `import` something. Normally, we are pretty sure which folder the thing we are looking for resides in
diff --git a/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/app/bind-listener.ts b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/app/bind-listener.ts
new file mode 100644
index 000000000..049ab7b68
--- /dev/null
+++ b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/app/bind-listener.ts
@@ -0,0 +1,21 @@
+import { $, Handler } from '../util';
+
+export class Listener {
+ public clickTokens: string[];
+ public handler: Handler;
+
+ constructor() {
+ this.handler = Handler.instance;
+ // ID of elements that will be attached w/ click listener
+ this.clickTokens = ['start', 'bet', 'next', 'refill', 'end'];
+ }
+
+ bind(): void {
+ this.clickTokens.forEach(token => {
+ // Use arrow function to retain the original this as this.handler
+ $(`#${token}`).onclick = () => this.handler[token]();
+ });
+ $('#bet-range-input').oninput = this.handler.betRangeInput;
+ }
+}
+
diff --git a/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/app/game.ts b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/app/game.ts
new file mode 100644
index 000000000..0aae525fd
--- /dev/null
+++ b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/app/game.ts
@@ -0,0 +1,134 @@
+import { $all, hide, setContent, show, showAll } from "../util";
+import { Card } from '../component/card';
+import { Deck } from '../component/card-collection/deck.model';
+import { Session } from "./session";
+import { CardService } from '../service/card.service';
+import { ContentService } from '../service/content.service';
+import { PokerHand } from "../component/card-collection/hand-type.interface";
+
+enum Winner {
+ Bot = -1,
+ Draw,
+ Player
+}
+
+interface Result {
+ botRank: PokerHand;
+ playerRank: PokerHand;
+ winnerRef: Winner;
+}
+
+export class Game {
+ botHand: Card[];
+ playerHand: Card[];
+ card: CardService;
+ content: ContentService;
+ session: Session = Session.instance;
+ private result: Result;
+
+ constructor(
+ private bet: number,
+ private deck: Deck
+ ) {
+ this.card = CardService.instance;
+ this.content = ContentService.instance;
+ this.botHand = this.deck.createCardHand(5);
+ this.playerHand = this.deck.createCardHand(5);
+ this.result = this.card.getCompareResult(this.botHand, this.playerHand);
+ this.showResult(this.result);
+ setContent(this.content.getHand({
+ botHand: this.botHand,
+ playerHand: this.playerHand,
+ }));
+ this.showCard();
+ };
+
+ /**
+ * @function showResult
+ * @private
+ * @desc Set content while result container is hidden. Reveal result and update cash after 5 seconds
+ */
+ private showResult({ botRank, playerRank, winnerRef }: Result) {
+ setContent(this.content.getResult({
+ botRank,
+ playerRank,
+ winnerRef,
+ bet: this.bet,
+ }));
+ this.updateCash(winnerRef);
+
+ setTimeout(() => {
+ showAll('result-rank-container', 'bot-rank');
+ }, 2500);
+
+ setTimeout(() => {
+ showAll('player-rank', 'result-text-container');
+ setContent({
+ cash: this.session.cash
+ });
+ }, 5000);
+ }
+
+ /**
+ * @function updateCash
+ * @private
+ * @desc Update player's cash based on the winnerRef
+ * @param {Winner} winnerRef - 1, 0 or -1
+ */
+ private updateCash(winnerRef: Winner) {
+ const currentCash = this.session.cash;
+ if (winnerRef === Winner.Player) {
+ this.session.setCash(currentCash + this.bet);
+ } else if (winnerRef === Winner.Bot) {
+ this.session.setCash(currentCash - this.bet);
+ }
+
+ this.checkBalance(this.session.cash);
+ }
+
+ /**
+ * @function showCard
+ * @private
+ * @desc Show all 10 cards at the speed of 1 card per 0.5 second
+ */
+ private showCard() {
+ const cards = $all('.poker-hand-result-item');
+
+ cards.forEach((card, index) => {
+ this.rotate(card, index * 500);
+ });
+ }
+
+ /**
+ * @function rotate
+ * @private
+ * @param {Object} item - The DOM ref of a card
+ * @param {number} timeout - The timeout to be set
+ * @desc Add rotateY transform to card, excuted after the given time period
+ */
+ private rotate(item, timeout) {
+ setTimeout(() => {
+ item.style.transform = 'translateX(-100%) rotateY(180deg)';
+ }, timeout);
+ }
+
+ /**
+ * @function checkBalance
+ * @private
+ * @desc Check the remaining cash, determine which action button to display after 5 seconds
+ */
+ private checkBalance(cash) {
+ if (cash > 0) {
+ hide('refill');
+ show('next');
+ } else {
+ setTimeout(() => {
+ hide('next');
+ show('refill');
+ }, 5000);
+ }
+ setTimeout(() => {
+ show('action-container');
+ }, 5000);
+ }
+}
diff --git a/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/app/session.ts b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/app/session.ts
new file mode 100644
index 000000000..e4d423bff
--- /dev/null
+++ b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/app/session.ts
@@ -0,0 +1,69 @@
+import { Deck } from '../component/card-collection/deck.model';
+import { Game } from './game';
+
+export class Session {
+ private static self: Session;
+ deck: Deck;
+ game: Game;
+ user: string;
+ cash: number;
+
+ // Singleton
+ public static get instance() {
+ return this.self || (this.self = new this());
+ };
+
+ constructor() {
+ this.user = null;
+ this.cash = 0;
+ this.deck = new Deck();
+ }
+
+ /**
+ * @function nextGame
+ * @desc The callback function of starting a new game
+ * @param {number} bet - The initial bet
+ */
+ nextGame(bet) {
+ this.game = new Game(bet, this.deck);
+ }
+
+ /**
+ * @function clear
+ * @desc Clear current session
+ */
+ clear(): void {
+ this.user = null;
+ this.cash = 0;
+ }
+
+ /**
+ * @function init
+ * @desc Initialize a session
+ * @param {string} userName - The user name based on user input, default to "Ninja Cat"
+ */
+ init(userName: string = 'Ninja Cat'): Session {
+ this.user = userName;
+ this.cash = 100;
+
+ return this;
+ }
+
+ /**
+ * @function isActive
+ * @desc Check if there is an active session
+ */
+ isActive(): boolean {
+ return this.user !== null;
+ }
+
+ /**
+ * @function setCash
+ * @desc Update cash
+ * @param {number} amount
+ */
+ setCash(amount: number): void {
+ this.cash = amount;
+ }
+}
+
diff --git a/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/component/card-collection/card-pile.model.ts b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/component/card-collection/card-pile.model.ts
new file mode 100644
index 000000000..8669fd88c
--- /dev/null
+++ b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/component/card-collection/card-pile.model.ts
@@ -0,0 +1,27 @@
+import { CardSuit, CardValue } from '../card';
+
+export class CardPile {
+ protected readonly suits = [
+ CardSuit.Spade,
+ CardSuit.Heart,
+ CardSuit.Club,
+ CardSuit.Diamond
+ ];
+ protected readonly values = [
+ CardValue.Two,
+ CardValue.Three,
+ CardValue.Four,
+ CardValue.Five,
+ CardValue.Six,
+ CardValue.Seven,
+ CardValue.Eight,
+ CardValue.Nine,
+ CardValue.Ten,
+ CardValue.Jack,
+ CardValue.Queen,
+ CardValue.King,
+ CardValue.Ace
+ ];
+
+ constructor() { }
+}
diff --git a/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/component/card-collection/deck.model.ts b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/component/card-collection/deck.model.ts
new file mode 100644
index 000000000..15f1caa34
--- /dev/null
+++ b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/component/card-collection/deck.model.ts
@@ -0,0 +1,70 @@
+import { CardPile } from './card-pile.model';
+import { Card, CardSuit, CardValue } from '../card';
+
+type Cache = {
+ [key in CardSuit]: CardValue[]
+};
+
+export class Deck extends CardPile {
+ private static self: Deck;
+ cache: Cache = {
+ [CardSuit.Spade]: [],
+ [CardSuit.Heart]: [],
+ [CardSuit.Club]: [],
+ [CardSuit.Diamond]: []
+ };
+ count: number = 0;
+
+ constructor() {
+ super();
+ };
+
+ // Singleton
+ public static get instance() {
+ return this.self || (this.self = new this());
+ };
+
+ createCardHand(amount): Card[] {
+ let cards: Card[] = [];
+
+ while (amount > 0) {
+ let card: Card = this.generateRandom();
+ let { suit, value } = card;
+
+ this.count++;
+ this.cache[suit].push(value);
+ cards.push(card);
+ amount--;
+ }
+
+ if (this.count >= 30) {
+ this.reset();
+ }
+
+ return cards;
+ }
+
+ reset() {
+ // Reset cache object
+ Object.keys(this.cache).forEach(key => {
+ this.cache[key] = [];
+ });
+ this.count = 0;
+ }
+
+ private generateRandom(): Card {
+ let suit: CardSuit;
+ let value: CardValue;
+
+ do {
+ suit = this.getRandomElement(this.suits);
+ value = this.getRandomElement(this.values);
+ } while (this.cache[suit].includes(value));
+
+ return new Card({ suit, value })
+ }
+
+ private getRandomElement(arr: T[]): T {
+ return arr[Math.floor(Math.random() * arr.length)];
+ }
+}
diff --git a/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/component/card-collection/hand-type.interface.ts b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/component/card-collection/hand-type.interface.ts
new file mode 100644
index 000000000..1898dbe6b
--- /dev/null
+++ b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/component/card-collection/hand-type.interface.ts
@@ -0,0 +1,14 @@
+export enum PokerHand {
+ HighCard,
+ OnePair,
+ TwoPair,
+ ThreeOfAKind,
+ Wheel,
+ Straight,
+ Flush,
+ FullHouse,
+ FourOfAKind,
+ SteelWheel,
+ StraightOrRoyalFlush
+}
+
diff --git a/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/component/card/card.interface.ts b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/component/card/card.interface.ts
new file mode 100644
index 000000000..bebc371c3
--- /dev/null
+++ b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/component/card/card.interface.ts
@@ -0,0 +1,28 @@
+export enum CardValue {
+ Two = 2,
+ Three,
+ Four,
+ Five,
+ Six,
+ Seven,
+ Eight,
+ Nine,
+ Ten,
+ Jack,
+ Queen,
+ King,
+ Ace
+}
+
+export enum CardSuit {
+ Spade,
+ Heart,
+ Club,
+ Diamond
+}
+
+export interface CardInterface {
+ suit: CardSuit;
+ value: CardValue;
+}
+
diff --git a/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/component/card/card.model.ts b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/component/card/card.model.ts
new file mode 100644
index 000000000..748d342fb
--- /dev/null
+++ b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/component/card/card.model.ts
@@ -0,0 +1,11 @@
+import { CardInterface, CardSuit, CardValue } from './card.interface';
+
+export class Card implements CardInterface {
+ readonly suit: CardSuit;
+ readonly value: CardValue;
+
+ constructor({ suit, value }: CardInterface) {
+ this.suit = suit;
+ this.value = value;
+ }
+}
diff --git a/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/component/card/index.ts b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/component/card/index.ts
new file mode 100644
index 000000000..773a82162
--- /dev/null
+++ b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/component/card/index.ts
@@ -0,0 +1,3 @@
+export * from './card.interface'
+export * from './card.model'
+
diff --git a/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/index.pug b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/index.pug
new file mode 100644
index 000000000..bd447f9a9
--- /dev/null
+++ b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/index.pug
@@ -0,0 +1,5 @@
+doctype html
+html(lang='en')
+ include partial/head
+ include partial/body
+ script(src='./index.ts')
diff --git a/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/index.ts b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/index.ts
new file mode 100644
index 000000000..976c327e4
--- /dev/null
+++ b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/index.ts
@@ -0,0 +1,22 @@
+import { Listener } from './app/bind-listener';
+
+/**
+ * @summary This module controls the overall process of the poker game
+ * @desc There are 3 steps in total:
+ * - 0: The initial page - before a user starts his session
+ * - Welcome header
+ * - Username input
+ * - Button "Start"
+ * - 1: The second page - when the user starts his session, or when the user would like to put a new bet
+ * - Welcome header, w/ username and cash amount
+ * - "Place your bet" label, bet as in range input, bet as in number input and button "Bet"
+ * - 2: The third page - after the user places his bet
+ * - Welcome header, w/ username and cash amount (after the calculation of winner)
+ * - Poker hand of the player and the bot
+ * - Winner info
+ * - Cash amount update
+ * - The "Next" button and the "End" button
+ */
+
+new Listener().bind();
+
diff --git a/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/partial/_bet-container.pug b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/partial/_bet-container.pug
new file mode 100644
index 000000000..642b1028b
--- /dev/null
+++ b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/partial/_bet-container.pug
@@ -0,0 +1,7 @@
+#bet-container
+ label(for='bet-range-input') Place your bet:
+ input#bet-range-input.mdl-slider.mdl-js-slider(type='range', min='1')
+ span#bet-value-container.mdl-chip.mdl-chip--contact
+ span#mdl-chip__token.mdl-chip__contact
+ span#bet-value-input-val.mdl-chip__text
+ button#bet.mdl-button.mdl-js-button.mdl-button--primary Bet
diff --git a/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/partial/_profile-container.pug b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/partial/_profile-container.pug
new file mode 100644
index 000000000..6e7836239
--- /dev/null
+++ b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/partial/_profile-container.pug
@@ -0,0 +1,7 @@
+#profile-container
+ h2
+ | Welcome
+ span#user-name
+ span#cash-container.mdl-chip.mdl-chip--contact
+ span.mdl-chip__contact.mdl-color--teal.mdl-color-text--white $
+ span#cash.mdl-chip__text
diff --git a/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/partial/_result-container.pug b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/partial/_result-container.pug
new file mode 100644
index 000000000..f32c57061
--- /dev/null
+++ b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/partial/_result-container.pug
@@ -0,0 +1,26 @@
+#result-container
+ h3
+ | Your bet is $
+ span#bet-in-result
+ | . Good luck!
+ #poker-table-container
+ #bot-result-container
+ h2 Bot
+ #bot-result
+ #player-result-container
+ h2 You
+ #player-result
+ #result-rank-container
+ #bot-rank
+ #player-rank
+ br
+ #result-text-container
+ #winner-text
+ #cash-result
+ #action-container
+ button#end.mdl-button.mdl-js-button.mdl-button--raised.mdl-js-ripple-effect.mdl-button--accent
+ | End
+ button#next.mdl-button.mdl-js-button.mdl-button--primary
+ | Next
+ button#refill.mdl-button.mdl-js-button.mdl-button--primary
+ | Refill $100
diff --git a/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/partial/_welcome-container.pug b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/partial/_welcome-container.pug
new file mode 100644
index 000000000..cc6fc09c0
--- /dev/null
+++ b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/partial/_welcome-container.pug
@@ -0,0 +1,7 @@
+#welcome-container
+ .mdl-textfield.mdl-js-textfield
+ input#user-name-input.mdl-textfield__input(type='text')
+ label.mdl-textfield__label(for='user-name-input')
+ | Please enter your name:
+ button#start.mdl-button.mdl-button--primary.mdl-js-button
+ | Start
diff --git a/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/partial/body.pug b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/partial/body.pug
new file mode 100644
index 000000000..6196867ae
--- /dev/null
+++ b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/partial/body.pug
@@ -0,0 +1,5 @@
+body
+ include _profile-container
+ include _welcome-container
+ include _bet-container
+ include _result-container
diff --git a/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/partial/head.pug b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/partial/head.pug
new file mode 100644
index 000000000..9d126ae32
--- /dev/null
+++ b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/partial/head.pug
@@ -0,0 +1,8 @@
+head
+ meta(charset='UTF-8')
+ meta(name='viewport', content='width=device-width, initial-scale=1.0')
+ meta(http-equiv='X-UA-Compatible', content='ie=edge')
+ link(rel='stylesheet', href='https://code.getmdl.io/1.3.0/material.indigo-pink.min.css')
+ script(defer='', src='https://code.getmdl.io/1.3.0/material.min.js')
+ link(rel='stylesheet', href='style.scss')
+ title Poker game
diff --git a/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/service/card.service.ts b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/service/card.service.ts
new file mode 100644
index 000000000..dc786d2b4
--- /dev/null
+++ b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/service/card.service.ts
@@ -0,0 +1,222 @@
+import { Card, CardSuit, CardValue } from '../component/card';
+import { PokerHand } from '../component/card-collection/hand-type.interface';
+
+type Count = { [value in CardSuit]: number } | {};
+
+enum Winner {
+ Bot = -1,
+ Draw,
+ Player
+}
+
+interface ParsedHand {
+ suit: Count;
+ value: Count;
+ sortedValue: CardValue[];
+}
+
+interface ComparedResult {
+ botRank: PokerHand;
+ playerRank: PokerHand;
+ winnerRef: Winner
+}
+
+export class CardService {
+ private static self: CardService;
+
+ // Singleton
+ public static get instance() {
+ return this.self || (this.self = new this());
+ };
+
+ constructor() { }
+
+ /**
+ * @function getCompareResult
+ * @private
+ * @desc Compare both hands and determine the winner. The return value contains both hands for the rendering of UI
+ * @param bot - The bot's poker hand
+ * @param player - The player's poker hand
+ * @return {Object} - Parsed hand object of bot and player, together with the winnerRef to represent the winner
+ */
+ getCompareResult(bot: Card[], player: Card[]): ComparedResult {
+ const botHand: ParsedHand = this.parseHand(bot);
+ const playerHand: ParsedHand = this.parseHand(player);
+ const playerRank: PokerHand = this.getHandType(playerHand);
+ const botRank: PokerHand = this.getHandType(botHand);
+
+ let result = { playerRank, botRank };
+
+ if (playerRank !== botRank) {
+ return Object.assign(result, {
+ winnerRef: playerRank > botRank ? Winner.Player : Winner.Bot
+ });
+ }
+
+ let index = 0;
+ const playerValues = this.constructSortedValue(playerHand.value);
+ const botValues = this.constructSortedValue(botHand.value);
+ // Compare each card from the beginning
+ while (index < playerValues.length) {
+ let playerCurr = playerValues[index];
+ let botCurr = botValues[index];
+ if (playerCurr !== botCurr) {
+ return Object.assign(result, {
+ winnerRef: this.comparator(playerCurr, botCurr) === 1 ? Winner.Player : Winner.Bot
+ });
+ }
+ index++;
+ }
+
+ return Object.assign(result, {
+ winnerRef: Winner.Draw
+ });
+ }
+
+ /**
+ * @function getHandType
+ * @private
+ * @desc Calculate poker hand type
+ * @param {Card[]} hand - The card array to be calculated
+ * @return {PokerHand}
+ */
+ private getHandType({ sortedValue: values, suit, value }): PokerHand {
+ const isFlush = this.isFlush(suit);
+ if (this.isStraight(values) && isFlush) {
+ return PokerHand.StraightOrRoyalFlush;
+ } else if (this.isWheel(values) && isFlush) {
+ return PokerHand.SteelWheel;
+ } else if (this.isWheel(values)) {
+ return PokerHand.Wheel;
+ } else if (this.isStraight(values)) {
+ return PokerHand.Straight;
+ } else if (this.isFlush(suit)) {
+ return PokerHand.Flush;
+ }
+
+ let valueCount = Object.keys(value).length;
+ let countArr = Object.values(value);
+
+ if (valueCount === 2) {
+ return countArr.includes(4) ? PokerHand.FourOfAKind : PokerHand.FullHouse;
+ } else if (valueCount === 3) {
+ return countArr.includes(3) ? PokerHand.ThreeOfAKind : PokerHand.TwoPair;
+ } else if (valueCount === 4) {
+ return PokerHand.OnePair;
+ } else {
+ return PokerHand.HighCard;
+ }
+ }
+
+ /**
+ * @function constructSortedValue
+ * @private
+ * @desc Sort the card value array (no dupes) based on both value count (descendingly) and value point (descendingly)
+ * This array is for further comparison when two poker hands have the same rank point
+ * @param {Count} valueCount - The object of cardValue => count
+ * @return {CardValue[]} - The sort result
+ */
+ private constructSortedValue(valueCount: Count) {
+ return Object.keys(valueCount)
+ .map(Number)
+ .sort((a, b) => {
+ if (valueCount[a] < valueCount[b]) {
+ return 1;
+ } else if (valueCount[a] > valueCount[b]) {
+ return -1
+ } else {
+ if (a < b) {
+ return 1;
+ } else {
+ return -1;
+ }
+ }
+ });
+ }
+
+ /**
+ * @function parseHand
+ * @private
+ * @desc Sort poker hand values, calculate suit count and value count for rank determination
+ * @param {Card[]} cardList - The poker hand array to be calculated
+ * @return {ParsedHand} - The hand object returned
+ */
+ private parseHand(cardList: Card[]): ParsedHand {
+ let valueCount = {};
+ let suitCount = {};
+ let sortedValue = cardList.map(card => card.value).sort(this.comparator);
+
+ // Calculate the count of value and suit
+ for (let i = 0; i < cardList.length; i++) {
+ let { value, suit } = cardList[i];
+ if (valueCount[value] === undefined) {
+ valueCount[value] = 1;
+ } else {
+ valueCount[value]++;
+ }
+
+ if (suitCount[suit] === undefined) {
+ suitCount[suit] = 1;
+ } else {
+ suitCount[suit]++;
+ }
+ }
+
+ return {
+ sortedValue,
+ suit: suitCount,
+ value: valueCount,
+ };
+ }
+
+ /**
+ * @function comparator
+ * @private
+ * @desc A wrapper of isLargerThan, where a transform function of bool => 1 or -1 has been passed in
+ * This may be used as the callback of sort function
+ */
+ private comparator = (a, b): number => a > b ? 1 : -1;
+
+ /**
+ * @function isWheel
+ * @private
+ * @desc Check if a poker hand is wheel straight
+ * @param {Object} values - The object of cardValue => count
+ * @return {boolean}
+ */
+ private isWheel(values): boolean {
+ // This is the only case to form a wheel
+ return values[0] === 2 && values[1] === 3 && values[2] === 4 &&
+ values[3] === 5 && values[4] === 14;
+ }
+
+ /**
+ * @function isStraight
+ * @private
+ * @desc Check if a poker hand is straight
+ * @param {Object} values - The object of cardValue => count
+ * @return {boolean}
+ */
+ private isStraight(values): boolean {
+ // Determine if the first four values are ascending
+ for (let i = 0; i < values.length - 1; i++) {
+ if (CardValue[values[i + 1]] !== CardValue[values[i] + 1]) {
+ return false;
+ }
+ }
+
+ // This does not apply to (steel) wheel straight
+ return values[4] === values[3] + 1;
+ }
+
+ /**
+ * @function isFlush
+ * @private
+ * @desc Check if a poker hand is flush
+ * @param {Object} suitCount - The object of suit => count
+ * @return {boolean}
+ */
+ private isFlush(suitCount): boolean {
+ return Object.keys(suitCount).length === 1;
+ }
+}
diff --git a/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/service/content.service.ts b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/service/content.service.ts
new file mode 100644
index 000000000..2194e561e
--- /dev/null
+++ b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/service/content.service.ts
@@ -0,0 +1,211 @@
+import { PokerHand } from "../component/card-collection/hand-type.interface";
+import { Card, CardValue } from "../component/card";
+
+/**
+ * @interface TemplateObject - Object that contains pairs as in id => content
+ * @property {string} name - The tag name
+ * @property {string|TemplateObject[]} content - The content within the tag:
+ * - For string, use as is
+ * - For TemplateObject[], construct HTML content for each item before adding in between the tag
+ * @property {string} [className] - The class to be assigned
+ * @property {string} [idName] - The id to be assigned
+ */
+interface TemplateObject {
+ name: string;
+ content: string | TemplateObject[];
+ className?: string;
+ idName?: string;
+}
+
+interface HandContent {
+ 'bot-result': string;
+ 'player-result': string;
+}
+
+type ResultPartial = {
+ 'winner-text': string,
+ 'cash-result': string,
+}
+
+type ResultContent = {
+ 'bot-rank': string,
+ 'player-rank': string,
+} & ResultPartial;
+
+enum Winner {
+ Bot = -1,
+ Draw,
+ Player
+}
+export class ContentService {
+ private suitArr = ['♠️', '♥️', '♣️', '♦️'];
+ private static self: ContentService;
+
+ // Singleton
+ public static get instance() {
+ return this.self || (this.self = new this());
+ };
+
+ constructor() { }
+
+ /**
+ * @function getHand
+ * @desc Generate the hand type content object (id => content) that is used directly by `setContent`
+ * @param {Object} - An object contains both botHand: Card[] and playerHand: Card[]
+ * @return {HandContent} - The attributes denote the id of the block to be updated and the values are the content.
+ */
+ getHand({ botHand, playerHand }): HandContent {
+ return {
+ 'bot-result': this.cardResult(botHand),
+ 'player-result': this.cardResult(playerHand),
+ };
+ }
+
+ /**
+ * @function getResult
+ * @desc Generate all result content object (id => content) that is used directly by `setContent`
+ * @param {Object} - An object contains botRank, playerRank, winnerRef and bet
+ * @return {ResultContent}: The id of 4 blocks to be updated and their content, respectively. Used directly by `setContent`
+ */
+ getResult({ botRank, playerRank, winnerRef, bet }): ResultContent {
+ let res = {
+ 'bot-rank': `The bot has ${this.getRankText(botRank)}.`,
+ 'player-rank': `Your have ${this.getRankText(playerRank)}.`,
+ };
+
+ return Object.assign({}, res, this.getWinnerContent(winnerRef, bet));
+ }
+
+ /**
+ * @function getWinnerContent
+ * @private
+ * @param {Winner} winnerRef - Number that indicates who is the winner
+ * @param {number} bet - The amount of bet
+ * @return
+ */
+ private getWinnerContent(winnerRef: Winner, bet: number) {
+ let content = {
+ 'winner-text': '',
+ 'cash-result': ''
+ };
+
+ if (winnerRef === Winner.Draw) {
+ content['winner-text'] = `😉 It's a Draw!`;
+ } else if (winnerRef === Winner.Player) {
+ content['winner-text'] = `😄 You're the winner! Yay!`;
+ content['cash-result'] = `🤑 You won $${bet}!`;
+ } else {
+ content['winner-text'] = `😒 The bot won! Darn it!`;
+ content['cash-result'] = `💸 You lost $${bet}!`;
+ }
+
+ return content;
+ }
+
+ /**
+ * @function getRankText
+ * @private
+ * @param {PokerHand} hand - The poker hand as defined in hand-type.interface
+ * @return The text of a poker hand, to be displayed in the result section
+ */
+ private getRankText(hand: PokerHand): string {
+ const handType = ['high card', 'a pair', 'two pairs', 'three of a kind',
+ 'a wheel', 'a straight', 'a flush', 'a full house', 'four of a kind',
+ 'a steel wheel', 'a straight flush/royal flush'];
+ return handType[hand];
+ }
+
+ /**
+ * @function cardResult
+ * @private
+ * @desc Generate partial template for displaying cards
+ * @param {Card[]} cardList - The poker hand
+ * @return {string} - The HTML content of the poker hand to be rendered
+ */
+ private cardResult(cardList: Card[]) {
+ return this.tag({
+ name: 'div',
+ className: 'poker-hand-result',
+ content: cardList.map(card => ({
+ name: 'div',
+ className: 'poker-hand-result-item',
+ content: [{
+ name: 'div',
+ className: 'poker-hand-card-front',
+ content: [{
+ name: 'div',
+ className: 'poker-hand-card-value-top',
+ content: this.getPoint(card.value)
+ }, {
+ name: 'div',
+ className: 'poker-hand-card-suit',
+ content: this.suitArr[card.suit]
+ }, {
+ name: 'div',
+ className: 'poker-hand-card-value-bottom',
+ content: this.getPoint(card.value)
+ }]
+ }, {
+ name: 'div',
+ className: 'poker-hand-card-back',
+ content: ''
+ }]
+ }))
+ });
+ }
+
+ /**
+ * @function getPoint
+ * @private
+ * @param {number} value - The card value to be converted
+ * @return {string} The string representation of the card value, which is from '2' - '10' and 'J' to 'A'
+ */
+ private getPoint(value: CardValue): string {
+ const royal = ['J', 'Q', 'K', 'A'];
+
+ if (value > 10) {
+ return royal[value - 11];
+ }
+
+ return `${value}`;
+ }
+
+ /**
+ * @function tag
+ * @private
+ * @desc Generate the HTML content based on the given parameters
+ * @param {TemplateObject} - The template object to be used
+ * @return {string} - The HTML string to be rendered
+ */
+ private tag({
+ className,
+ content,
+ name,
+ idName = ''
+ }: TemplateObject): string {
+ // Construct attribute string
+ let attributes = this.attr({
+ class: className,
+ id: idName
+ });
+
+ // Recursive call when the content is of type TemplateObject[]
+ if (Array.isArray(content)) {
+ return `<${name}${attributes}>${content.map(e => this.tag(e)).join('')}${name}>`
+ }
+
+ return `<${name}${attributes}>${content}${name}>`;
+ }
+
+ /**
+ * @function attr
+ * @private
+ * @desc Transform the HTML {attribute => value} object to string, which is to be used when composing the HTML content
+ * Return empty string when value is empty
+ * @param {Object} obj - Pairs of HTML attribute => value that to be applied to the HTML element
+ * @return {string} - The attribute string to be used
+ */
+ private attr(obj): string {
+ return Object.keys(obj).map(key => obj[key] && ` ${key}="${obj[key]}"`).join('');
+ }
+}
diff --git a/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/style.scss b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/style.scss
new file mode 100644
index 000000000..14ad45652
--- /dev/null
+++ b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/style.scss
@@ -0,0 +1,192 @@
+/* Card style CTTO: https://codepen.io/twhy/pen/mwRRdX */
+/* Chip token style CTTO: http://cssdeck.com/labs/pokerchips */
+
+body {
+ display: flex;
+ flex-direction: column;
+}
+
+
+.mdl-chip__text {
+ font-size: 1.5rem;
+}
+
+
+#profile-container {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+
+ #cash-container {
+ // Hide at initial loading
+ // flex later on
+ display: none;
+ margin-left: 10rem;
+ }
+}
+
+#welcome-container {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+}
+
+#bet-container {
+ // Hide at initial loading
+ // flex later on
+ display: none;
+ justify-content: center;
+ align-items: center;
+ font-size: 2rem;
+
+ #bet-value-container {
+ border: 1px solid #dedede;
+ margin: 0 1rem;
+ }
+
+ #mdl-chip__token {
+ font-size: 0.5rem;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ background-color: #dd4631;
+ border-radius: 50%;
+ border: 0.5em dashed white;
+ transition: all 0.5s ease;
+ backface-visibility: hidden;
+ }
+}
+
+#result-container {
+ // Hide at initial loading
+ // flex later on
+ display: none;
+ flex-direction: column;
+ justify-content: center;
+
+ & h3 {
+ text-align: center;
+ }
+
+ #poker-table-container {
+ background-color: #0d9461;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ border-style: solid;
+ border-width: 5px;
+ border-color: #c1ba23;
+ border-radius: 50px;
+ padding: 1rem;
+ margin: 1rem;
+ min-width: 500px;
+
+ #bot-result-container, #player-result-container {
+ display: flex;
+ align-items: center;
+
+ h2 {
+ margin-right: 1.5rem;
+ color: #e5e5e5;
+ }
+
+ .poker-hand-result {
+ display: flex;
+
+ .poker-hand-result-item {
+ display: flex;
+ width: 4rem;
+ height: 6rem;
+ margin: 1rem;
+ position: relative;
+ transition: .6s;
+ transform-style: preserve-3d;
+ border-radius: 6px;
+ border: 1px solid #ccc;
+ background-color: transparent;
+ perspective: 600px;
+ transform-origin: center right;
+
+ .poker-hand-card-front,
+ .poker-hand-card-back {
+ width: 100%;
+ height: 100%;
+ border-radius: 6px;
+ position: absolute;
+ border: 1px solid #ccc;
+ }
+
+ .poker-hand-card-back {
+ -webkit-transform: rotate(0);
+ -ms-transform: rotate(0);
+ transform: rotate(0);
+ background: -webkit-repeating-linear-gradient(45deg, tomato, tomato 8px, white 8px, white 16px);
+ background: -o-repeating-linear-gradient(45deg, tomato, tomato 8px, white 8px, white 16px);
+ background: repeating-linear-gradient(45deg, tomato, tomato 8px, white 8px, white 16px);
+ backface-visibility: hidden;
+ }
+
+ .poker-hand-card-front {
+ background: white;
+ -webkit-transform: rotateY(180deg) translateZ(0.01px);
+ -ms-transform: rotateY(180deg) translateZ(0.01px);
+ transform: rotateY(180deg) translateZ(0.01px);
+ backface-visibility: visible;
+
+ .poker-hand-card-suit {
+ // Or else, emoji won't render as expected
+ font-family: '';
+ top: 53%;
+ left: 50%;
+ font-size: 2.5rem;
+ position: absolute;
+ -webkit-transform: translate(-50%, -50%);
+ -ms-transform: translate(-50%, -50%);
+ transform: translate(-50%, -50%);
+ }
+
+ .poker-hand-card-value-top {
+ position: absolute;
+ font-size: 1.3rem;
+ top: 0;
+ left: 0.5rem;
+ }
+
+ .poker-hand-card-value-bottom {
+ position: absolute;
+ font-size: 1.3rem;
+ bottom: 0;
+ right: 0.5rem;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ #result-rank-container {
+ font-size: 1.8rem;
+ line-height: 1.5;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ }
+
+ #result-text-container {
+ font-size: 2.4rem;
+ line-height: 1.5;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ }
+
+ #action-container {
+ display: flex;
+ flex-direction: row;
+ justify-content: space-evenly;
+ }
+}
+
diff --git a/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/util/dom.ts b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/util/dom.ts
new file mode 100644
index 000000000..116485770
--- /dev/null
+++ b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/util/dom.ts
@@ -0,0 +1,85 @@
+// querySelector applies to both HTMLElement (e.g. p tag) and HTMLInputElement (e.g. input tag), hence the &
+export const $ = (query: string): HTMLElement & HTMLInputElement => document.querySelector(query);
+export const $all = (query: string): NodeListOf => document.querySelectorAll(query);
+
+/**
+ * @function setContent
+ * @desc Update the content (innerHTML) of each element with `id`
+ * @param obj - The id of an element, and its content to be set
+ */
+export const setContent = obj => {
+ for (let id in obj) {
+ $(`#${id}`).innerHTML = obj[id];
+ }
+};
+
+/**
+ * @function setAttr
+ * @desc Update the value(s) for the attribute(s) within the element of ${id}
+ * @param {string} id - The id of a DOM element
+ * @param ...pairs - Rest of the parameter, which are pairs of the element attributes and their value to be set
+ */
+export const setAttr = ({ id, ...pairs }) => {
+ let ref = $(`#${id}`);
+ for (let attr in pairs) {
+ if (attr === 'style') {
+ let styleObj = pairs.style;
+ for (let styleAttr in styleObj) {
+ ref.style[styleAttr] = styleObj[styleAttr];
+ }
+ } else {
+ ref[attr] = pairs[attr];
+ }
+ }
+};
+
+/**
+ * @function hide
+ * @desc Hide element of id
+ * @param {string} id - The id of an element that should be hidden
+ */
+export const hide = (id: string) => {
+ setAttr({
+ id,
+ style: {
+ display: 'none'
+ }
+ });
+};
+
+/**
+ * @function hideAll
+ * @desc Hide all elements based on the id list passed in
+ * @param {...string[]} idList - The id(s) of the element(s) that should be hidden
+ */
+export const hideAll = (...idList: string[]) => {
+ for (let i = 0; i < idList.length; i++) {
+ hide(idList[i]);
+ }
+};
+
+/**
+ * @function show
+ * @desc Show element of id
+ * @param {string} id - The id of an element that should be displayed
+ * If the id is ending with 'container', set `display` to 'flex'
+ */
+export const show = (id: string) => {
+ setAttr({
+ id,
+ style: {
+ display: /container$/.test(id) ? 'flex' : 'block'
+ }
+ });
+};
+
+/**
+ * @function showAll
+ * @desc Show all elements based on the id list passed in
+ * @param {...string[]} idList - The id(s) of the element(s) that should be hidden
+ */
+export const showAll = (...idList: string[]) => {
+ for (let i = 0; i < idList.length; i++) {
+ show(idList[i]);
+ }
+};
diff --git a/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/util/handler.ts b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/util/handler.ts
new file mode 100644
index 000000000..aa1c8aae4
--- /dev/null
+++ b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/util/handler.ts
@@ -0,0 +1,145 @@
+import { $, hide, hideAll, setAttr, setContent, show, showAll } from './dom';
+import { Deck } from "../component/card-collection/deck.model";
+import { Session } from '../app/session';
+
+interface MaterialSliderElement extends HTMLInputElement {
+ MaterialSlider: {
+ change(value: number);
+ disable();
+ enable();
+ }
+}
+
+/**
+ * @class Handler
+ * @desc The module that contains all event handler
+ */
+export class Handler {
+ private static self: Handler;
+ public rankMap: Object;
+ private session: Session;
+ private deck: Deck;
+
+ // Singleton
+ public static get instance() {
+ return this.self || (this.self = new this());
+ };
+
+ constructor() {
+ this.deck = Deck.instance;
+ this.session = Session.instance;
+
+ this.rankMap = {
+ 1: 'high card',
+ 2: 'a pair',
+ 3: 'two pairs',
+ 4: 'three of a kind',
+ 5: 'a straight',
+ 6: 'a flush',
+ 7: 'a full house',
+ 8: 'four of a kind',
+ 9: 'a straight flush/royal flush'
+ };
+
+ hideAll('cash-container', 'bet-container', 'result-container', 'result-rank-container');
+ }
+
+ /**
+ * @function start
+ * @desc Click handler of the #start button
+ */
+ start() {
+ showAll('bet-container', 'cash-container');
+ hideAll('welcome-container', 'result-container');
+
+ let userName = $('#user-name-input').value || 'Ninja Cat';
+ let betRangeInputRef = $('#bet-range-input') as MaterialSliderElement;
+
+ // Check if there is an on-going session
+ // Create one if not
+ if (!this.session.isActive()) {
+ this.session = this.session.init(userName);
+ }
+
+ // Set name and cash
+ setContent({
+ cash: this.session.cash,
+ 'user-name': userName
+ });
+
+ // "Two-way binding" of both (slider and text) input
+ // See: https://getmdl.io/components/index.html#sliders-section
+ betRangeInputRef.MaterialSlider.change(+Math.ceil(this.session.cash / 4));
+ setAttr({
+ id: 'bet-range-input',
+ max: this.session.cash
+ });
+
+ setContent({
+ 'bet-value-input-val': +Math.ceil(this.session.cash / 4)
+ });
+ }
+
+ /**
+ * @function bet
+ * @desc Click handler of the #bet button
+ */
+ bet() {
+ show('result-container');
+ hideAll('bet-container', 'result-text-container', 'action-container', 'result-rank-container', 'bot-rank', 'player-rank');
+
+ let betValue = +$('#bet-range-input').value;
+ setContent({ 'bet-in-result': betValue });
+
+ this.session.nextGame(betValue);
+ }
+
+ /**
+ * @function refill
+ * @desc Click handler of the #refill button, add $100 to cash
+ */
+ refill() {
+ this.session.cash += 100;
+ this.start();
+ }
+
+ /**
+ * @function next
+ * @desc Click handler of the #next button
+ */
+ next() {
+ hide('result-container');
+ this.start();
+ }
+
+ /**
+ * @function end
+ * @desc Click handler of the #end button
+ */
+ end() {
+ hideAll('cash-container', 'bet-container', 'result-container');
+ setContent({
+ 'user-name': ''
+ });
+ setAttr({
+ id: 'user-name-input',
+ value: ''
+ });
+ show('welcome-container');
+
+ this.session.clear();
+ // Reset the deck for the new session later on
+ this.deck.reset();
+ }
+
+ /**
+ * @function betRangeInput
+ * @desc Input handler of the #bet-range-input slider
+ * @param {Object} e - The event object
+ */
+ betRangeInput = e => {
+ setContent({
+ 'bet-value-input-val': +e.target.value
+ });
+ };
+}
diff --git a/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/util/index.ts b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/util/index.ts
new file mode 100644
index 000000000..3ca2318c4
--- /dev/null
+++ b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game-ts/util/index.ts
@@ -0,0 +1,2 @@
+export * from './handler';
+export * from './dom';
diff --git a/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game/index.html b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game/index.html
new file mode 100644
index 000000000..95dd57331
--- /dev/null
+++ b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game/index.html
@@ -0,0 +1,96 @@
+
+
+
+
+
+
+
+
+
+
+ Poker game
+
+
+
+
Welcome
+
+ $
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Your bet is $. Good luck!
+
+
+
Bot
+
+
+
+
You
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game/index.js b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game/index.js
new file mode 100644
index 000000000..d8893b148
--- /dev/null
+++ b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game/index.js
@@ -0,0 +1,22 @@
+import Listener from './util/bind-listener.js';
+
+/**
+ * @summary This module controls the overall process of the poker game
+ * @desc There are 3 steps in total:
+ * - 0: The initial page - before a user starts his session
+ * - Welcome header
+ * - Username input
+ * - Button "Start"
+ * - 1: The second page - when the user starts his session, or when the user would like to put a new bet
+ * - Welcome header, w/ username and cash amount
+ * - "Place bet" label, bet as in range input, bet as in number input and button "Set"
+ * - 2: The third page - after the user places his bet
+ * - Welcome header, w/ username and cash amount (after the calculation of winner)
+ * - Poker hand of the player and the bot
+ * - Winner info
+ * - Cash amount update
+ * - The "Next" button and the "Quit" button
+ */
+
+new Listener().bind();
+
diff --git a/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game/lib/compare.js b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game/lib/compare.js
new file mode 100644
index 000000000..53bcc3219
--- /dev/null
+++ b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game/lib/compare.js
@@ -0,0 +1,280 @@
+/**
+ * @module Compare
+ * @desc The module that contains method of comparing poker hands
+ */
+export default class Compare {
+ constructor() {
+ this.royalPoints = {
+ J: 11,
+ Q: 12,
+ K: 13,
+ A: 14
+ };
+ }
+
+ /**
+ * Winning object type definition
+ * @typedef {Object} WinnerObj
+ * @property {RankObj~rank} playerRank - The rank point of player's hand
+ * @property {RankObj~rank} botRank - The rank point of bot's hand
+ * @property {1 | 0 | -1} val - The value count object of the poker hand
+ * - `1` denotes that player is the winner
+ * - `-1` denotes that bot is the winner
+ * - `0` denotes a draw
+ */
+ /**
+ * @function Compare~isPlayerWinning
+ * @desc Check if player is the winner
+ * @param {Poker[]} player - The poker hand of player
+ * @param {Poker[]} bot - The poker hand of bot
+ * @see generate.js for Poker type def
+ * @return {WinnerObj} - The object that contains winner info, used by handler
+ */
+ isPlayerWinning(player, bot) {
+ const playerHand = this._generateHandObj(player);
+ const botHand = this._generateHandObj(bot);
+
+ const { values: playerValues, rank: playerRank } = this._calculateHandRank(playerHand);
+ const { values: botValues, rank: botRank } = this._calculateHandRank(botHand);
+
+ let result = { playerRank, botRank };
+
+ if (playerRank !== botRank) {
+ return Object.assign(result, {
+ val: playerRank > botRank ? 1 : -1
+ });
+ }
+
+ let index = 0;
+ // Compare each card from the beginning
+ while (index < playerValues.length) {
+ let playerCurr = playerValues[index];
+ let botCurr = botValues[index];
+ if (playerCurr !== botCurr) {
+ return Object.assign(result, {
+ val: this._comparator(playerCurr, botCurr)
+ });
+ }
+ index++;
+ }
+
+ return Object.assign(result, {
+ val: 0
+ });
+ }
+
+ /**
+ * @function Compare~_getPoint
+ * @private
+ * @desc Get the point of a card. 2 ~ 10 as is, J ~ A as in 11 ~ 14
+ * @param {CardValue} val - The card value
+ * @return {Number} - The result with range of [2, 14]
+ */
+ _getPoint(val) {
+ if (typeof val === 'number') {
+ return val;
+ } else {
+ return this.royalPoints[val];
+ }
+ }
+
+ /**
+ * @function Compare~_isLargerThan
+ * @private
+ * @desc Compare two card values passed in
+ * @param {CardValue} a - The card value
+ * @param {CardValue} b - The card value
+ * @param {Function} [transformFunc] - The transform function (boolean => any) to be applied before finalizing the result
+ * @return {Boolean|any} - Comparison result:
+ * - When no transform function is passed in, return boolean
+ * - Else, it depends on the return value of the transform function
+ */
+ _isLargerThan(a, b, transformFunc) {
+ let temp = this._getPoint(a) > this._getPoint(b);
+
+ if (typeof transformFunc === 'function') {
+ return transformFunc(temp);
+ }
+
+ return temp;
+ }
+
+ /**
+ * @function Compare~_comparator
+ * @private
+ * @desc A wrapper of _isLargerThan, where a transform function of bool => 1 or -1 has been passed in
+ * This may be used as the callback of sort function
+ */
+ _comparator = (a, b) => {
+ return this._isLargerThan(a, b, bool => bool ? 1 : -1);
+ }
+
+ /**
+ * Poker object type definition
+ * @typedef {Object} HandObj
+ * @property {CardValue[]} sortedValue - Poker hand values sorted by _comparator, ascendingly
+ * @property {Object} suit - The suit count object of the poker hand
+ * @property {Object} value - The value count object of the poker hand
+ */
+ /**
+ * @function Compare~_generateHandObj
+ * @private
+ * @desc Sort poker hand values, calculate suit count and value count for rank determination
+ * @param {Poker[]} cardList - The poker hand array to be calculated
+ * @return {HandObj} - The hand object returned
+ */
+ _generateHandObj(cardList) {
+ let valueCount = {};
+ let suitCount = {};
+ let sortedValue = cardList.map(card => card.value).sort(this._comparator);
+
+ for (let i = 0; i < cardList.length; i++) {
+ let { value, suit } = cardList[i];
+ if (valueCount[value] === undefined) {
+ valueCount[value] = 1;
+ } else {
+ valueCount[value]++;
+ }
+
+ if (suitCount[suit] === undefined) {
+ suitCount[suit] = 1;
+ } else {
+ suitCount[suit]++;
+ }
+ }
+
+ return {
+ sortedValue,
+ suit: suitCount,
+ value: valueCount,
+ };
+ }
+
+ /**
+ * Rank object type definition
+ * @typedef {Object} RankObj
+ * @property {CardValue[]} values - Card values sorted based on both value count and value point
+ * This is for further comparison when two poker hands have the same rank point
+ * @property {1|2|3|4|5|6|7|8|9} rank - The rank point, where:
+ * - 1: High card
+ * - 2: Pair
+ * - 3: Two pairs
+ * - 4: Three of a kind
+ * - 5: Straight
+ * - 6: Flush
+ * - 7: Full house
+ * - 8: Four of a kind
+ * - 9: Straight flush/Royal flush
+ */
+ /**
+ * @function Compare~_calculateHandRank
+ * @private
+ * @desc Calculate poker hand rank point
+ * @param {HandObj} - The hand object to be calculated
+ * @return {RankObj} - The result for further comparison
+ */
+ _calculateHandRank({ sortedValue: values, suit, value }) {
+ let result = {
+ values: this._constructSortedValue(value)
+ };
+ // Check if is straight/flush, or both
+ if (this._isStraight(values) && this._isFlush(suit)) {
+ return Object.assign(result, {
+ rank: 9
+ });
+ } else if (this._isStraight(values)) {
+ return Object.assign(result, {
+ rank: 5
+ });
+ } else if (this._isFlush(suit)) {
+ return Object.assign(result, {
+ rank: 6
+ });
+ }
+
+ let valueCount = Object.keys(value).length;
+ let countArr = Object.values(value);
+
+ if (valueCount === 2) {
+ // Four of a kind or full house
+ return Object.assign(result, {
+ rank: countArr.includes(4) ? 8 : 7
+ });
+ } else if (valueCount === 3) {
+ // Three of a kind or two pairs
+ return Object.assign(result, {
+ rank: countArr.includes(3) ? 4 : 3
+ });
+ } else if (valueCount === 4) {
+ // One pair
+ return Object.assign(result, {
+ rank: 2
+ });
+ } else {
+ // High card
+ return Object.assign(result, {
+ rank: 1
+ });
+ }
+ }
+
+ /**
+ * @function Compare~_constructSortedValue
+ * @private
+ * @desc Sort the card value array (no dupes) based on both value count (descendingly) and value point (descendingly)
+ * This array is for further comparison when two poker hands have the same rank point
+ * @param {HandObj~value} valueObj - The object of cardValue => count
+ * @return {CardValue[]} - The sort result
+ */
+ _constructSortedValue(valueObj) {
+ return Object.keys(valueObj)
+ // Map [2, 10] to number, retain ['J', 'A']
+ .map(key => +key || key)
+ .sort((a, b) => {
+ if (valueObj[a] < valueObj[b]) {
+ return 1;
+ } else if (valueObj[a] > valueObj[b]) {
+ return -1
+ } else {
+ if (this._getPoint(a) < this._getPoint(b)) {
+ return 1;
+ } else {
+ return -1;
+ }
+ }
+ });
+ }
+
+ /**
+ * @function Compare~_isStraight
+ * @private
+ * @desc Check if a poker hand is straight
+ * @param {HandObj~value} values - The object of cardValue => count
+ * @return {Boolean}
+ */
+ _isStraight(values) {
+ // Determine if the first four values are ascending
+ for (let i = 0; i < values.length - 1; i++) {
+ if (this._getPoint(values[i + 1]) !== this._getPoint(values[i] + 1)) {
+ return false;
+ }
+ }
+
+ // Check if is wheel
+ // If not, check the last two items
+ return values[0] === 2 && values[4] === 'A' ||
+ this._getPoint(values[4]) === this._getPoint(values[3]) + 1;
+ }
+
+ /**
+ * @function Compare~_isFlush
+ * @private
+ * @desc Check if a poker hand is flush
+ * @param {HandObj~suit} suit - The object of suit => count
+ * @return {Boolean}
+ */
+ _isFlush(suit) {
+ return Object.keys(suit).length === 1;
+ }
+}
+
diff --git a/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game/lib/generate.js b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game/lib/generate.js
new file mode 100644
index 000000000..22090d06f
--- /dev/null
+++ b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game/lib/generate.js
@@ -0,0 +1,106 @@
+/**
+ * Poker related type def
+ * @typedef {2|3|4|5|6|7|8|9|10|"J"|"Q"|"K"|"A"} CardValue
+ * @typedef {"S"|"H"|"C"|"D"} SuitValue
+ */
+/**
+ * Poker object type def
+ * @typedef {Object} Poker
+ * @property {SuitValue} suit - The suit of a single card
+ * @property {CardValue} value - The value of a single card
+ */
+/**
+ * Cache object type def
+ * @typedef {Object} Cache
+ * @property {Object} suit - With value of CardValue[], denoting the cards that have been generated
+ */
+
+/**
+ * @module Generate
+ * @desc The module that contains method of generating poker hand
+ */
+export default class Generate {
+ constructor() {
+ this.cache = {};
+ this.suit = ['S', 'H', 'C', 'D'];
+ this.value = [2, 3, 4, 5, 6, 7, 8, 9, 10, 'J', 'Q', 'K', 'A'];
+ this.total = 0;
+
+ this._init();
+ }
+
+ /**
+ * @function Generate~hand
+ * @public
+ * @desc Generate a poker hand, 5 cards
+ */
+ hand() {
+ let result = [];
+
+ for (let i = 0; i < 5; i++) {
+ let card = this._generateSingle(this.cache);
+ let { suit, value } = card;
+ this.cache[suit].push(value);
+ this.total++;
+ result.push(card);
+ }
+
+ // Reshuffle
+ if (this.total > 30) {
+ this._clear();
+ }
+
+ return result;
+ }
+
+ /**
+ * @function Generate~_clear
+ * @private
+ * @desc Clear current card count and the cache object, then call _init
+ */
+ _clear() {
+ this.total = 0;
+ this._init();
+ }
+
+ /**
+ * @function Generate~_generateSingle
+ * @private
+ * @desc Generate a single card object
+ * @param {Cache} cache - the cache object
+ * @return {Poker} - The randomly generated poker card
+ */
+ _generateSingle(cache) {
+ let card = {};
+
+ do {
+ card.suit = this.suit[this._getRandomNumber(this.suit.length - 1)];
+ card.value = this.value[this._getRandomNumber(this.value.length - 1)];
+ } while (this.cache[card.suit].includes(card.value));
+
+ return card;
+ }
+
+ /**
+ * @function Generate~_getRandomNumber
+ * @private
+ * @desc Generate a random integer within a given range
+ * @param {Number} max - The upper limit of the random integer
+ * @return {Number} - The generated random integer
+ */
+ _getRandomNumber(max) {
+ return Math.floor(Math.random() * (max + 1));
+ }
+
+ /**
+ * @function Generate~_init
+ * @private
+ * @desc Init the cache object, this is to mimic the behavior of adding a new card deck by calling this method
+ */
+ _init() {
+ for (let i = 0; i < this.suit.length; i++) {
+ this.cache[this.suit[i]] = [];
+ }
+ }
+}
+
diff --git a/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game/lib/session.js b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game/lib/session.js
new file mode 100644
index 000000000..26a554b96
--- /dev/null
+++ b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game/lib/session.js
@@ -0,0 +1,9 @@
+export default class Session {
+ constructor(
+ user = 'Ninja Cat'
+ ) {
+ this.user = user;
+ this.cash = 100;
+ }
+}
+
diff --git a/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game/style.css b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game/style.css
new file mode 100644
index 000000000..056bb502b
--- /dev/null
+++ b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game/style.css
@@ -0,0 +1,162 @@
+/* Card style CTTO: https://codepen.io/twhy/pen/mwRRdX */
+/* Chip token style CTTO: http://cssdeck.com/labs/pokerchips */
+body {
+ display: flex;
+ flex-direction: column;
+}
+
+.mdl-chip__text {
+ font-size: 1.5rem;
+}
+
+#profile-container {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+}
+#profile-container #cash-container {
+ display: none;
+ margin-left: 10rem;
+}
+
+#welcome-container {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+}
+
+#bet-container {
+ display: none;
+ justify-content: center;
+ align-items: center;
+ font-size: 2rem;
+}
+#bet-container #bet-value-container {
+ border: 1px solid #dedede;
+ margin: 0 1rem;
+}
+#bet-container #mdl-chip__token {
+ font-size: 0.5rem;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ background-color: #dd4631;
+ border-radius: 50%;
+ border: 0.5em dashed white;
+ transition: all 0.5s ease;
+ backface-visibility: hidden;
+}
+
+#result-container {
+ display: none;
+ flex-direction: column;
+ justify-content: center;
+}
+#result-container h3 {
+ text-align: center;
+}
+#result-container #poker-table-container {
+ background-color: #0d9461;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ border-style: solid;
+ border-width: 5px;
+ border-color: #c1ba23;
+ border-radius: 50px;
+ padding: 1rem;
+ margin: 1rem;
+ min-width: 500px;
+}
+#result-container #poker-table-container #bot-result-container, #result-container #poker-table-container #player-result-container {
+ display: flex;
+ align-items: center;
+}
+#result-container #poker-table-container #bot-result-container h2, #result-container #poker-table-container #player-result-container h2 {
+ margin-right: 1.5rem;
+ color: #e5e5e5;
+}
+#result-container #poker-table-container #bot-result-container .poker-hand-result, #result-container #poker-table-container #player-result-container .poker-hand-result {
+ display: flex;
+}
+#result-container #poker-table-container #bot-result-container .poker-hand-result .poker-hand-result-item, #result-container #poker-table-container #player-result-container .poker-hand-result .poker-hand-result-item {
+ display: flex;
+ width: 4rem;
+ height: 6rem;
+ margin: 1rem;
+ position: relative;
+ transition: 0.6s;
+ transform-style: preserve-3d;
+ border-radius: 6px;
+ border: 1px solid #ccc;
+}
+#result-container #poker-table-container #bot-result-container .poker-hand-result .poker-hand-result-item .poker-hand-card-front,
+#result-container #poker-table-container #bot-result-container .poker-hand-result .poker-hand-result-item .poker-hand-card-back, #result-container #poker-table-container #player-result-container .poker-hand-result .poker-hand-result-item .poker-hand-card-front,
+#result-container #poker-table-container #player-result-container .poker-hand-result .poker-hand-result-item .poker-hand-card-back {
+ width: 100%;
+ height: 100%;
+ border-radius: 6px;
+ position: absolute;
+ border: 1px solid #ccc;
+ backface-visibility: hidden;
+}
+#result-container #poker-table-container #bot-result-container .poker-hand-result .poker-hand-result-item .poker-hand-card-back, #result-container #poker-table-container #player-result-container .poker-hand-result .poker-hand-result-item .poker-hand-card-back {
+ -webkit-transform: rotate(0);
+ -ms-transform: rotate(0);
+ transform: rotate(0);
+ background: -webkit-repeating-linear-gradient(45deg, tomato, tomato 8px, white 8px, white 16px);
+ background: -o-repeating-linear-gradient(45deg, tomato, tomato 8px, white 8px, white 16px);
+ background: repeating-linear-gradient(45deg, tomato, tomato 8px, white 8px, white 16px);
+}
+#result-container #poker-table-container #bot-result-container .poker-hand-result .poker-hand-result-item .poker-hand-card-front, #result-container #poker-table-container #player-result-container .poker-hand-result .poker-hand-result-item .poker-hand-card-front {
+ background: white;
+ -webkit-transform: rotateY(180deg);
+ -ms-transform: rotateY(180deg);
+ transform: rotateY(180deg);
+}
+#result-container #poker-table-container #bot-result-container .poker-hand-result .poker-hand-result-item .poker-hand-card-front .poker-hand-card-suit, #result-container #poker-table-container #player-result-container .poker-hand-result .poker-hand-result-item .poker-hand-card-front .poker-hand-card-suit {
+ font-family: "";
+ top: 53%;
+ left: 50%;
+ font-size: 2.5rem;
+ position: absolute;
+ -webkit-transform: translate(-50%, -50%);
+ -ms-transform: translate(-50%, -50%);
+ transform: translate(-50%, -50%);
+}
+#result-container #poker-table-container #bot-result-container .poker-hand-result .poker-hand-result-item .poker-hand-card-front .poker-hand-card-value-top, #result-container #poker-table-container #player-result-container .poker-hand-result .poker-hand-result-item .poker-hand-card-front .poker-hand-card-value-top {
+ position: absolute;
+ font-size: 1.3rem;
+ top: 0;
+ left: 0.5rem;
+}
+#result-container #poker-table-container #bot-result-container .poker-hand-result .poker-hand-result-item .poker-hand-card-front .poker-hand-card-value-bottom, #result-container #poker-table-container #player-result-container .poker-hand-result .poker-hand-result-item .poker-hand-card-front .poker-hand-card-value-bottom {
+ position: absolute;
+ font-size: 1.3rem;
+ bottom: 0;
+ right: 0.5rem;
+}
+#result-container #result-rank-container {
+ font-size: 1.8rem;
+ line-height: 1.5;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+}
+#result-container #result-text-container {
+ font-size: 2.4rem;
+ line-height: 1.5;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+}
+#result-container #action-container {
+ display: flex;
+ flex-direction: row;
+ justify-content: space-evenly;
+}
+
+/*# sourceMappingURL=style.css.map */
diff --git a/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game/style.css.map b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game/style.css.map
new file mode 100644
index 000000000..eb2faad7a
--- /dev/null
+++ b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game/style.css.map
@@ -0,0 +1 @@
+{"version":3,"sourceRoot":"","sources":["style.scss"],"names":[],"mappings":"AAAA;AACA;AAEA;EACI;EACA;;;AAIJ;EACI;;;AAIJ;EACI;EACA;EACA;;AAEA;EAGI;EACA;;;AAIR;EACI;EACA;EACA;;;AAGJ;EAGI;EACA;EACA;EACA;;AAEA;EACI;EACA;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAIR;EAGI;EACA;EACA;;AAEA;EACI;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACI;EACA;;AAEA;EACI;EACA;;AAGJ;EACI;;AAEA;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;AAAA;AAAA;EAEI;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;;AAEA;EAEI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;;AAQxB;EACI;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA","file":"style.css"}
\ No newline at end of file
diff --git a/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game/style.scss b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game/style.scss
new file mode 100644
index 000000000..abb7585d1
--- /dev/null
+++ b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game/style.scss
@@ -0,0 +1,188 @@
+/* Card style CTTO: https://codepen.io/twhy/pen/mwRRdX */
+/* Chip token style CTTO: http://cssdeck.com/labs/pokerchips */
+
+body {
+ display: flex;
+ flex-direction: column;
+}
+
+
+.mdl-chip__text {
+ font-size: 1.5rem;
+}
+
+
+#profile-container {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+
+ #cash-container {
+ // Hide at initial loading
+ // flex later on
+ display: none;
+ margin-left: 10rem;
+ }
+}
+
+#welcome-container {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+}
+
+#bet-container {
+ // Hide at initial loading
+ // flex later on
+ display: none;
+ justify-content: center;
+ align-items: center;
+ font-size: 2rem;
+
+ #bet-value-container {
+ border: 1px solid #dedede;
+ margin: 0 1rem;
+ }
+
+ #mdl-chip__token {
+ font-size: 0.5rem;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ background-color: #dd4631;
+ border-radius: 50%;
+ border: 0.5em dashed white;
+ transition: all 0.5s ease;
+ backface-visibility: hidden;
+ }
+}
+
+#result-container {
+ // Hide at initial loading
+ // flex later on
+ display: none;
+ flex-direction: column;
+ justify-content: center;
+
+ & h3 {
+ text-align: center;
+ }
+
+ #poker-table-container {
+ background-color: #0d9461;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ border-style: solid;
+ border-width: 5px;
+ border-color: #c1ba23;
+ border-radius: 50px;
+ padding: 1rem;
+ margin: 1rem;
+ min-width: 500px;
+
+ #bot-result-container, #player-result-container {
+ display: flex;
+ align-items: center;
+
+ h2 {
+ margin-right: 1.5rem;
+ color: #e5e5e5;
+ }
+
+ .poker-hand-result {
+ display: flex;
+
+ .poker-hand-result-item {
+ display: flex;
+ width: 4rem;
+ height: 6rem;
+ margin: 1rem;
+ position: relative;
+ transition: .6s;
+ transform-style: preserve-3d;
+ border-radius: 6px;
+ border: 1px solid #ccc;
+
+ .poker-hand-card-front,
+ .poker-hand-card-back {
+ width: 100%;
+ height: 100%;
+ border-radius: 6px;
+ position: absolute;
+ border: 1px solid #ccc;
+ backface-visibility: hidden;
+ }
+
+ .poker-hand-card-back {
+ -webkit-transform: rotate(0);
+ -ms-transform: rotate(0);
+ transform: rotate(0);
+ background: -webkit-repeating-linear-gradient(45deg, tomato, tomato 8px, white 8px, white 16px);
+ background: -o-repeating-linear-gradient(45deg, tomato, tomato 8px, white 8px, white 16px);
+ background: repeating-linear-gradient(45deg, tomato, tomato 8px, white 8px, white 16px);
+ }
+
+ .poker-hand-card-front {
+ background: white;
+ -webkit-transform: rotateY(180deg);
+ -ms-transform: rotateY(180deg);
+ transform: rotateY(180deg);
+
+ .poker-hand-card-suit {
+ // Or else, emoji won't render as expected
+ font-family: '';
+ top: 53%;
+ left: 50%;
+ font-size: 2.5rem;
+ position: absolute;
+ -webkit-transform: translate(-50%, -50%);
+ -ms-transform: translate(-50%, -50%);
+ transform: translate(-50%, -50%);
+ }
+
+ .poker-hand-card-value-top {
+ position: absolute;
+ font-size: 1.3rem;
+ top: 0;
+ left: 0.5rem;
+ }
+
+ .poker-hand-card-value-bottom {
+ position: absolute;
+ font-size: 1.3rem;
+ bottom: 0;
+ right: 0.5rem;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ #result-rank-container {
+ font-size: 1.8rem;
+ line-height: 1.5;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ }
+
+ #result-text-container {
+ font-size: 2.4rem;
+ line-height: 1.5;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ }
+
+ #action-container {
+ display: flex;
+ flex-direction: row;
+ justify-content: space-evenly;
+ }
+}
+
diff --git a/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game/util/bind-listener.js b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game/util/bind-listener.js
new file mode 100644
index 000000000..041039116
--- /dev/null
+++ b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game/util/bind-listener.js
@@ -0,0 +1,17 @@
+import { $ } from './query.js';
+import Handler from './handler.js';
+
+export default class Listener {
+ constructor() {
+ this.handler = new Handler();
+ this.clickTokens = ['start', 'bet', 'next', 'refill', 'end'];
+ }
+
+ bind() {
+ this.clickTokens.forEach(token => {
+ $(`#${token}`).onclick = this.handler[token];
+ });
+ $('#bet-range-input').oninput = this.handler.betRangeInput;
+ }
+}
+
diff --git a/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game/util/compose-content.js b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game/util/compose-content.js
new file mode 100644
index 000000000..3733c6e4a
--- /dev/null
+++ b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game/util/compose-content.js
@@ -0,0 +1,103 @@
+/**
+ * Object that contains pairs as in id => content
+ * @typedef {Object} TemplateObject
+ *name, content, className = '', idName = ''
+ * @property {String} name - The tag name
+ * @property {String|TemplateObject[]} content - The content within the tag:
+ * - For string, use as is
+ * - For TemplateObject[], construct HTML content for each item before adding in between the tag
+ * @property {String} [className] - The class to be assigned
+ * @property {String} [idName] - The id to be assigned
+ */
+
+/**
+ * @module ComposeContent
+ * @desc The module to be used for creating HTML content
+ */
+export default class ComposeContent {
+ constructor() {
+ this.suitMap = {
+ S: '♠️',
+ H: '♥️',
+ C: '♣️',
+ D: '♦️'
+ }
+ }
+
+ /**
+ * @function ComposeContent~card
+ * @public
+ * @desc Generate the partial template for displaying cards
+ * @param {Poker[]} cardList - The poker hand
+ * @param {"player" | "bot"} owner - Denotes the owner of the poker hand
+ * @see ../lib/generate.js for Poker type def
+ * @return {String} - The HTML content of the poker hand
+ */
+ card(cardList, owner) {
+ return this._tag({
+ name: 'div',
+ className: 'poker-hand-result',
+ content: cardList.map(card => ({
+ name: 'div',
+ className: 'poker-hand-result-item',
+ content: [{
+ name: 'div',
+ className: 'poker-hand-card-front',
+ content: [{
+ name: 'div',
+ className: 'poker-hand-card-value-top',
+ content: card.value
+ }, {
+ name: 'div',
+ className: 'poker-hand-card-suit',
+ content: this.suitMap[card.suit]
+ }, {
+ name: 'div',
+ className: 'poker-hand-card-value-bottom',
+ content: card.value
+ }]
+ }, {
+ name: 'div',
+ className: 'poker-hand-card-back',
+ content: ''
+ }]
+ }))
+ });
+ }
+
+
+ /**
+ * @function ComposeContent~_tag
+ * @private
+ * @desc Generate the HTML content based on the given parameters
+ * @param {TemplateObject} - The template object to be used
+ * @return {String} - The HTML content
+ */
+ _tag({ name, content, className = '', idName = '' }) {
+ // Construct attribute string
+ let attributes = this._attr({
+ class: className,
+ id: idName
+ });
+
+ // Recursive call when the content is of type TemplateObject[]
+ if (Array.isArray(content)) {
+ return `<${name}${attributes}>${content.map(e => this._tag(e)).join('')}${name}>`
+ }
+
+ return `<${name}${attributes}>${content}${name}>`;
+ }
+
+ /**
+ * @function ComposeContent~_attr
+ * @private
+ * @desc Transform the HTML attribute => value object to string, which is to be used when composing the HTML content
+ * Return empty string when value is empty
+ * @param {Object} obj - Pairs of HTML attribute => value
+ * @return {String} - The attribute string to be used
+ */
+ _attr(obj) {
+ return Object.keys(obj).map(key => obj[key] && ` ${key}="${obj[key]}"`).join('');
+ }
+}
+
diff --git a/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game/util/handler.js b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game/util/handler.js
new file mode 100644
index 000000000..5df10ec47
--- /dev/null
+++ b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game/util/handler.js
@@ -0,0 +1,354 @@
+import { $, $all } from './query.js';
+import Session from '../lib/session.js';
+import Generate from '../lib/generate.js';
+import Compare from '../lib/compare.js';
+import ComposeContent from './compose-content.js';
+
+/**
+ * Object that contains pairs as in id => content
+ * @typedef {Object} ElementContent
+ * @property {String} ${id} - The content to be updated on the element of ${id}
+ */
+/**
+ * Object that contains pairs as in attribute => value of a DOM element
+ * @typedef {Object} AttrValue
+ * @property {String} ${attr} - The value(s) to be updated for the attribute(s) of a given DOM element
+ * @property {AttrValue} [style] - The style attribute and value that to be applied on a given DOM element
+ */
+/**
+ * Object used for setting result content
+ * @typedef {Object} ResultContent
+ * @property {Number} botRank - The number that represents the type of bot's poker hand
+ * @property {String} cashContent - The content to be displayed as cash change info
+ * @property {Number} playerRank - The number that represents the type of player's poker hand
+ * @property {String} winnerContent - The content to be displayed as winner info
+ */
+
+/**
+ * @module Handler
+ * @desc The module that contains all event handler
+ */
+export default class Handler {
+ constructor() {
+ this.session = null;
+ this.Session = Session;
+ this.generate = new Generate();
+ this.compare = new Compare();
+ this.composeContent = new ComposeContent();
+ this.rankMap = {
+ 1: 'high card',
+ 2: 'a pair',
+ 3: 'two pairs',
+ 4: 'three of a kind',
+ 5: 'a straight',
+ 6: 'a flush',
+ 7: 'a full house',
+ 8: 'four of a kind',
+ 9: 'a straight flush/royal flush'
+ };
+
+ this._hideAll('cash-container', 'bet-container', 'result-container', 'result-rank-container');
+ }
+
+ /**
+ * @function Handler~start
+ * @desc Click handler of the #start button
+ */
+ start = () => {
+ this._showAll('bet-container', 'cash-container');
+ this._hideAll('welcome-container', 'result-container');
+
+ let userName = $('#user-name-input').value || 'Ninja Cat';
+
+ // Check if there is an on-going session
+ // Create one if not
+ if (!this.session) {
+ this.session = new this.Session(userName);
+ }
+
+ // Set name and cash
+ this._setContent({
+ cash: this.session.cash,
+ 'user-name': userName
+ });
+
+ // "Two-way binding" of both (slider and text) input
+ // See: https://getmdl.io/components/index.html#sliders-section
+ $('#bet-range-input').MaterialSlider.change(+Math.ceil(this.session.cash / 4));
+ this._setAttr({
+ id: 'bet-range-input',
+ max: this.session.cash
+ });
+
+ this._setContent({
+ 'bet-value-input-val': +Math.ceil(this.session.cash / 4)
+ });
+ };
+
+ /**
+ * @function Handler~bet
+ * @desc Click handler of the #bet button
+ */
+ bet = () => {
+ this._show('result-container');
+ this._hideAll('bet-container', 'result-text-container', 'action-container', 'result-rank-container', 'bot-rank', 'player-rank');
+
+ let betValue = +$('#bet-range-input').value;
+
+ this._setContent({ 'bet-in-result': betValue });
+
+ let playerHand = this.generate.hand();
+ let botHand = this.generate.hand();
+ let { botRank, playerRank, val: winnerRef } = this.compare.isPlayerWinning(playerHand, botHand);
+ let result = {
+ botRank: this.rankMap[botRank],
+ playerRank: this.rankMap[playerRank],
+ };
+
+ this._setContent({
+ 'bot-result': this.composeContent.card(botHand, 'bot'),
+ 'player-result': this.composeContent.card(playerHand, 'player')
+ });
+
+ this._showCard();
+
+ if (winnerRef === 0) {
+ this._showResult(Object.assign(result, {
+ winnerContent: `😉 It's a Draw!`,
+ cashContent: ''
+ }));
+ } else {
+ let userWin = winnerRef > 0;
+
+ // Update winner info and calculate cash
+ if (userWin) {
+ this.session.cash += betValue;
+ this._showResult(Object.assign(result, {
+ winnerContent: `😄 You're the winner! Yay!`,
+ cashContent: `🤑 You won $${betValue}!`
+ }));
+ } else {
+ this.session.cash -= betValue;
+ this._showResult(Object.assign(result, {
+ winnerContent: `😒 The bot won! Darn it!`,
+ cashContent: `💸 You lost $${betValue}!`
+ }));
+ }
+
+ this._checkBalance(this.session.cash);
+ }
+ };
+
+ /**
+ * @function Handler~refill
+ * @desc Click handler of the #refill button, add $100 to cash
+ */
+ refill = () => {
+ this.session.cash += 100;
+ this.start();
+ };
+
+ /**
+ * @function Handler~next
+ * @desc Click handler of the #next button
+ */
+ next = () => {
+ this._hide('result-container');
+ this.start();
+ };
+
+ /**
+ * @function Handler~end
+ * @desc Click handler of the #end button
+ */
+ end = () => {
+ this._hideAll('cash-container', 'bet-container', 'result-container');
+ this._setContent({
+ 'user-name': ''
+ });
+ this._setAttr({
+ id: 'user-name-input',
+ value: 'Ninja Cat'
+ });
+ this._show('welcome-container');
+ this.session = null;
+ };
+
+ /**
+ * @function Handler~betRangeInput
+ * @desc Input handler of the #bet-range-input slider
+ * @param {Object} e - The event object
+ */
+ betRangeInput = e => {
+ this._setContent({
+ 'bet-value-input-val': +e.target.value
+ });
+ };
+
+ /**
+ * @function Handler~_checkBalance
+ * @private
+ * @desc Check the remaining cash, determine which action button to display after 5 seconds
+ */
+ _checkBalance(cash) {
+ if (cash > 0) {
+ this._hide('refill');
+ this._show('next');
+ } else {
+ setTimeout(() => {
+ this._hide('next');
+ this._show('refill');
+ }, 5000);
+ }
+ setTimeout(() => {
+ this._show('action-container');
+ }, 5000);
+ }
+
+ /**
+ * @function Handler~_showCard
+ * @private
+ * @desc Show each card after half of a second
+ */
+ _showCard = () => {
+ const cards = $all('.poker-hand-result-item');
+
+ cards.forEach((card, index) => {
+ this._rotate(card, index * 500);
+ });
+ };
+
+ /**
+ * @function Handler~_showResult
+ * @private
+ * @desc Set content while result container is hidden. Reveal result and update cash after 5 seconds
+ * @param {ResultContent} - The object contains content of result
+ */
+ _showResult = ({
+ botRank,
+ cashContent,
+ playerRank,
+ winnerContent,
+ }) => {
+ this._setContent({
+ 'winner-text': winnerContent,
+ 'cash-result': cashContent,
+ 'bot-rank': `The bot has ${botRank}.`,
+ 'player-rank': `Your have ${playerRank}.`
+ });
+
+ setTimeout(() => {
+ this._showAll('result-rank-container', 'bot-rank');
+ }, 2500);
+
+ setTimeout(() => {
+ this._showAll('player-rank', 'result-text-container');
+ this._setContent({
+ cash: this.session.cash
+ });
+ }, 5000);
+ }
+
+
+ /**
+ * @function Handler~_rotate
+ * @private
+ * @param {Object} item - The DOM ref of a card
+ * @param {Number} timeout - The timeout to be set
+ * @desc Add rotateY transform to card, excuted after the given time period
+ */
+ _rotate = (item, timeout) => {
+ setTimeout(() => {
+ item.style.transform = 'rotateY(180deg)';
+ }, timeout);
+ };
+
+ /**
+ * @function Handler~_setContent
+ * @private
+ * @desc Update the content (innerHTML) of each element with `id`
+ * @param {ElementContent} obj - Pairs of id => content
+ */
+ _setContent(obj) {
+ for (let id in obj) {
+ $(`#${id}`).innerHTML = obj[id];
+ }
+ }
+
+ /**
+ * @function Handler~_setAttr
+ * @private
+ * @desc Update the value(s) for the attribute(s) within the element of ${id}
+ * @param {String} id - The id of a DOM element
+ * @param {AttrValue} obj - Rest of the parameter, which are pairs of attr => value
+ */
+ _setAttr({ id, ...pairs }) {
+ let ref = $(`#${id}`);
+ for (let attr in pairs) {
+ if (attr === 'style') {
+ let styleObj = pairs.style;
+ for (let styleAttr in styleObj) {
+ ref.style[styleAttr] = styleObj[styleAttr];
+ }
+ } else {
+ ref[attr] = pairs[attr];
+ }
+ }
+ }
+
+ /**
+ * @function Handler~_hide
+ * @private
+ * @desc Hide element of id
+ * @param {String} id - The id of an element that should be hidden
+ */
+ _hide(id) {
+ this._setAttr({
+ id,
+ style: {
+ display: 'none'
+ }
+ });
+ }
+
+ /**
+ * @function Handler~_hideAll
+ * @private
+ * @desc Hide all elements based on the id list passed in
+ * @param {...String} idList - The id(s) of the element(s) that should be hidden
+ */
+ _hideAll(...idList) {
+ for (let i = 0; i < idList.length; i++) {
+ this._hide(idList[i]);
+ }
+ }
+
+ /**
+ * @function Handler~_show
+ * @private
+ * @desc Show element of id
+ * @param {String} id - The id of an element that should be displayed
+ * If the id is ending with 'container', set `display` to 'flex'
+ */
+ _show(id) {
+ this._setAttr({
+ id,
+ style: {
+ display: /container$/.test(id) ? 'flex' : 'block'
+ }
+ });
+ }
+
+ /**
+ * @function Handler~_showAll
+ * @private
+ * @desc Show all elements based on the id list passed in
+ * @param {...String} idList - The id(s) of the element(s) that should be hidden
+ */
+ _showAll(...idList) {
+ for (let i = 0; i < idList.length; i++) {
+ this._show(idList[i]);
+ }
+ }
+}
+
diff --git a/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game/util/query.js b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game/util/query.js
new file mode 100644
index 000000000..8d540aa58
--- /dev/null
+++ b/front-end-libraries/learn-typescript-by-building-a-poker-game/poker-game/util/query.js
@@ -0,0 +1,3 @@
+export const $ = document.querySelector.bind(document);
+export const $all = document.querySelectorAll.bind(document);
+
diff --git a/front-end-libraries/learn-typescript-by-building-a-poker-game/tsconfig.json b/front-end-libraries/learn-typescript-by-building-a-poker-game/tsconfig.json
new file mode 100644
index 000000000..d403fad31
--- /dev/null
+++ b/front-end-libraries/learn-typescript-by-building-a-poker-game/tsconfig.json
@@ -0,0 +1,27 @@
+{
+ "compilerOptions": {
+ "module": "es2015",
+ "moduleResolution": "node",
+ "newLine": "LF",
+ "target": "es5",
+ "sourceMap": true,
+ "lib": [
+ "dom",
+ "es5",
+ "es6",
+ "es2016",
+ "es2017.object"
+ ],
+ "strict": false,
+ "noUnusedLocals": true,
+ "noUnusedParameters": true,
+ "noImplicitReturns": true,
+ "noFallthroughCasesInSwitch": true
+ },
+ "include": [
+ "**/*.ts"
+ ],
+ "exclude": [
+ "node_modules"
+ ]
+}
diff --git a/fullstack-cert/css-projects/availability-table/index.html b/fullstack-cert/css-projects/availability-table/index.html
new file mode 100644
index 000000000..35d4d8f2b
--- /dev/null
+++ b/fullstack-cert/css-projects/availability-table/index.html
@@ -0,0 +1,163 @@
+
+
+
+
+
+
+ Meeting Scheduler
+
+
+
+
+
+
+
+
+
+
9 AM
+
Monday
+
Tuesday
+
Wednesday
+
Thursday
+
Friday
+
+
+
+
+
+
+
+
+
+
10 AM
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
11 AM
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
12 PM
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
1 PM
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
2 PM
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
3 PM
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
4 PM
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
5 PM
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Availability
+
0
+ 5+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/fullstack-cert/css-projects/availability-table/styles.css b/fullstack-cert/css-projects/availability-table/styles.css
new file mode 100644
index 000000000..ffb6db53f
--- /dev/null
+++ b/fullstack-cert/css-projects/availability-table/styles.css
@@ -0,0 +1,129 @@
+:root {
+ font-size: 22px;
+ font-family: Arial, Helvetica, sans-serif;
+ --color0: hsl(0, 0%, 100%);
+ --color1: hsl(120, 95%, 90%);
+ --color2: hsl(120, 95%, 80%);
+ --color3: hsl(120, 95%, 65%);
+ --color4: hsl(120, 95%, 40%);
+ --color5: hsl(120, 95%, 25%);
+ --solid-border: 0.1rem solid black;
+ --dashed-border: 0.09rem dashed black;
+}
+
+* {
+ box-sizing: border-box;
+ margin: 0;
+ padding: 0;
+}
+
+body {
+ background-color: hsl(150, 30%, 75%);
+ width: 100vw;
+ height: 100vh;
+}
+
+main {
+ width: 100%;
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: space-evenly;
+}
+
+table {
+ border-collapse: collapse;
+ table-layout: fixed;
+ width: 40rem;
+}
+
+tr {
+ height: 1.1rem;
+}
+
+tr :first-child {
+ width: 4rem;
+}
+
+td {
+ border-right: var(--solid-border);
+ border-left: var(--solid-border);
+}
+
+.sharp td[class*="available"],
+.sharp th {
+ border-bottom: var(--solid-border);
+}
+
+.half td {
+ border-bottom: var(--dashed-border);
+}
+
+tbody :last-child td {
+ border: 0;
+}
+
+.time {
+ text-align: right;
+ border: 0;
+ padding: 0.4rem;
+}
+
+.available-0 {
+ background-color: var(--color0);
+}
+
+.available-1 {
+ background-color: var(--color1);
+}
+
+.available-2 {
+ background-color: var(--color2);
+}
+
+.available-3 {
+ background-color: var(--color3);
+}
+
+.available-4 {
+ background-color: var(--color4);
+}
+
+.available-5 {
+ background-color: var(--color5);
+}
+
+#legend {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ width: 18rem;
+ height: 3.5rem;
+ text-align: center;
+}
+
+#legend span {
+ display: inline-block;
+ width: 5rem;
+ height: 2rem;
+}
+
+#legend-gradient {
+ width: 100%;
+ height: 60%;
+ border: var(--solid-border);
+ background-image: linear-gradient(90deg,
+ var(--color0) 0% 17%,
+ var(--color1) 17% 34%,
+ var(--color2) 34% 50%,
+ var(--color3) 50% 67%,
+ var(--color4) 67% 83%,
+ var(--color5) 83% 100%);
+}
+
+#legend-line {
+ width: 60%;
+ height: 100%;
+ display: flex;
+}
\ No newline at end of file
diff --git a/fullstack-cert/css-projects/availability-table/user-stories.md b/fullstack-cert/css-projects/availability-table/user-stories.md
new file mode 100644
index 000000000..3a634b23c
--- /dev/null
+++ b/fullstack-cert/css-projects/availability-table/user-stories.md
@@ -0,0 +1,13 @@
+1. You should have a table with at least 3 columns and 5 rows, headings included.
+
+1. Cells in the first column should contain time values and have the `class` of `time`.
+
+1. All the other cells should have the `class` of `available-#`, where `#` is a number from `0` to `5` that specifies the number of available people at that time.
+
+1. In your `root` selector, you should define CSS variables named `--color#`, where `#` is a number from `0` to `5`, and used them to give a background color to the corresponding `.available-#` elements.
+
+1. In your `root` selector, you should define CSS variables named `--solid-border` and `--dashed-border`. You should use them to alternate the internal border of your table rows between solid and dashed borders.
+
+1. You should have a `div` element with the `id` of `legend`. It should contain a `span` element with the text of `Availability` and a `div` element with the `id` of `legend-gradient`.
+
+1. You should give the `#legend-gradient` element a linear gradient that change from `--color0` to `--color5`. Each color value should have two color-stops (expressed in percentage) to make the transition from one color to the following color a hard line.
\ No newline at end of file
diff --git a/fullstack-cert/css-projects/blog-post-card/cover-photo.jpg b/fullstack-cert/css-projects/blog-post-card/cover-photo.jpg
new file mode 100644
index 000000000..d4e256fcc
Binary files /dev/null and b/fullstack-cert/css-projects/blog-post-card/cover-photo.jpg differ
diff --git a/fullstack-cert/css-projects/blog-post-card/index.html b/fullstack-cert/css-projects/blog-post-card/index.html
new file mode 100644
index 000000000..73f62ce19
--- /dev/null
+++ b/fullstack-cert/css-projects/blog-post-card/index.html
@@ -0,0 +1,19 @@
+
+
+
+
+
+ Blog Post Card
+
+
+
+
+
+
+
Learn Web Development in 2024
+
Stay ahead of the curve with the latest trends in web development. Discover what's new and exciting in 2024
+
+
diff --git a/fullstack-cert/css-projects/blog-post-card/styles.css b/fullstack-cert/css-projects/blog-post-card/styles.css
new file mode 100644
index 000000000..d5d41e34a
--- /dev/null
+++ b/fullstack-cert/css-projects/blog-post-card/styles.css
@@ -0,0 +1,53 @@
+body {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ height: 100vh;
+ margin: 0;
+ background-color: #f0f0f0;
+ font-family: Arial, sans-serif;
+}
+
+.blog-post-card {
+ background-color: white;
+ border-radius: 15px;
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
+ overflow: hidden;
+ width: 350px;
+ margin: 20px;
+ text-align: center;
+}
+
+.post-img {
+ width: 100%;
+ height: auto;
+ border-bottom: 5px solid #333;
+}
+
+.post-content {
+ padding: 20px;
+}
+
+.post-title {
+ color: #333;
+ margin: 0 0 10px;
+}
+
+.post-excerpt {
+ color: #667;
+ margin: 10px 0;
+}
+
+.read-more {
+ display: inline-block;
+ margin-top: 10px;
+ padding: 10px 15px;
+ background-color: #333;
+ color: white;
+ text-decoration: none;
+ border-radius: 5px;
+}
+
+.read-more:hover {
+ background-color: #555;
+}
diff --git a/fullstack-cert/css-projects/blog-post-card/user-stories.md b/fullstack-cert/css-projects/blog-post-card/user-stories.md
new file mode 100644
index 000000000..0f9f53be8
--- /dev/null
+++ b/fullstack-cert/css-projects/blog-post-card/user-stories.md
@@ -0,0 +1,20 @@
+1. You should have a `div` with a class of `blog-post-card` to hold all your card elements.
+
+2. You should have an image with a valid `alt` text and the class of `post-img`. You can use `cover-photo.jpg` for the `src` attribute of your image.
+
+3. You should have a `div` with a class of `post-content`. Within the `.post-content` `div`:
+ - You should have a `h2` with a class of `post-title`. Assign some text to act as the title of your blog post.
+ - You should have a `p` with a class of `post-excerpt`. Assign some text to summarize the blog post (maximum of 20 words).
+ - You should an have an `a` with a class of `read-more`. Assign the text `Read More` to it.
+
+4. The `blog-post-card` class should add a white background, rounded corners, shadow for depth, overflow hidden to round the image borders, and control the card width and text alignment.
+
+5. The `post-img` class should ensure that the image fills the card's width and adds a border at the bottom.
+
+6. The `post-content` class should add padding inside the card for spacing.
+
+7. The `post-title` and `post-excerpt` elements within `post-content` should be styled for text color and margin.
+
+The `read-more` element should be styled for text color, background color, margin, `inline-block` display, `border-radius`, and `padding`. It should be styled like a button.
+
+9. The `read-more` element should have a hover effect that changes the background color.
\ No newline at end of file
diff --git a/fullstack-cert/css-projects/book-inventory/index.html b/fullstack-cert/css-projects/book-inventory/index.html
new file mode 100644
index 000000000..b9c6a22f6
--- /dev/null
+++ b/fullstack-cert/css-projects/book-inventory/index.html
@@ -0,0 +1,95 @@
+
+
+
+
+
+ Book Inventory
+
+
+
+
+
+
Book Inventory
+
+
+
+
Title
+
Author
+
Category
+
Status
+
Rate
+
+
+
+
+
The Three Musketeers
+
Alexandre Dumas
+
Historical novel
+
Read
+
+
+
+
+
+
+
+
The Plague
+
Albert Camus
+
Philosofical Novel
+
To Read
+
+
+
+
+
+
+
+
The Metamorphosis
+
Franz Kafka
+
Novella
+
Read
+
+
+
+
+
+
+
+
Dead Souls
+
Nikolai Gogol
+
Picaresque
+
Read
+
+
+
+
+
+
+
+
Lord of the Flies
+
William Golding
+
Allegorical Novel
+
In Progress
+
+
+
+
+
+
+
+
Do Androids Dream of Electric Sheep?
+
Philip K. Dick
+
Science fiction
+
Read
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/fullstack-cert/css-projects/book-inventory/styles.css b/fullstack-cert/css-projects/book-inventory/styles.css
new file mode 100644
index 000000000..f80d33ce1
--- /dev/null
+++ b/fullstack-cert/css-projects/book-inventory/styles.css
@@ -0,0 +1,86 @@
+* {
+ box-sizing: border-box;
+ font-family: Arial, sans-serif;
+}
+
+table {
+ border-collapse: collapse;
+ width: 100vw;
+}
+
+thead {
+ background-image: linear-gradient(hsl(197, 92%, 77%, 0.60), hsl(197, 92%, 50%, 0.60));
+}
+
+th {
+ padding: 0.4em;
+}
+
+td {
+ text-align: center;
+ padding: 0.3em;
+}
+
+tr[class="read"] {
+ background-image: linear-gradient(hsl(120, 100%, 85%, 0.6), hsl(120, 100%, 65%, 0.6));
+}
+
+tr[class="to-read"] {
+ background-image: linear-gradient(hsl(120, 20%, 95%, 0.6), hsl(120, 20%, 75%, 0.6));
+}
+
+tr[class="in-progress"] {
+ background-image: linear-gradient(hsl(40, 100%, 85%, 0.60), hsl(40, 100%, 65%, 0.6));
+}
+
+span {
+ display: inline-block;
+}
+
+span[class="status"] {
+ border-radius: 20%/60%;
+}
+
+span[class="status"],
+span[class^="rate"] {
+ height: 1.85em;
+ width: 7em;
+ padding: 0.3em;
+}
+
+tr[class="to-read"] span[class="status"] {
+ border: 0.1em solid hsl(5, 100%, 45%);
+ background-image: linear-gradient(hsl(5, 100%, 75%), hsl(5, 100%, 50%));
+}
+
+tr[class="read"] span[class="status"] {
+ border: 0.1em solid hsl(120, 75%, 45%);
+ background-image: linear-gradient(hsl(120, 75%, 75%), hsl(120, 75%, 50%));
+}
+
+tr[class="in-progress"] span[class="status"] {
+ border: 0.1em solid hsl(40, 90%, 40%);
+ background-image: linear-gradient(hsl(40, 90%, 75%), hsl(40, 90%, 50%));
+}
+
+span[class^="rate"] span {
+ border: 0.1em solid hsl(0, 0%, 50%);
+ border-radius: 50%;
+ background-color: hsl(0, 15%, 95%);
+ height: 100%;
+ width: 20%;
+ margin: 0.1em;
+}
+
+span[class~="three"] span {
+ background-image: linear-gradient(hsl(50, 100%, 70%), hsl(50, 100%, 50%));
+}
+
+span[class~="two"] :nth-child(1),
+span[class~="two"] :nth-child(2) {
+ background-image: linear-gradient(hsl(50, 100%, 70%), hsl(50, 100%, 50%));
+}
+
+span[class~="one"] :first-child {
+ background-image: linear-gradient(hsl(50, 100%, 70%), hsl(50, 100%, 50%));
+}
\ No newline at end of file
diff --git a/fullstack-cert/css-projects/book-inventory/user-stories.md b/fullstack-cert/css-projects/book-inventory/user-stories.md
new file mode 100644
index 000000000..97d05dd55
--- /dev/null
+++ b/fullstack-cert/css-projects/book-inventory/user-stories.md
@@ -0,0 +1,29 @@
+1. You should have an `h1` element with the text `Book Inventory`.
+
+1. You should have a `table` element with columns named `Title`, `Author`, `Category`, `Status`, and `Rate`.
+
+1. Each table row inside the table body should have either the class `read`, `to-read`, or `in-progress`.
+
+1. `td` elements of the `Status` column should contain a `span` element with the `class` of `status` surrounding the text `Read`, `To Read`, or `In Progress`, depending on the class of that row.
+
+1. `td` elements of the `Rate` column should contain a `span` element with the `class` of `rate` wrapping three empty `span` elements.
+
+1. `.rate` elements placed inside `.read` rows should have an additional class with the value of either `one`, `two`, or `three`, depending on the personal rate. This value should come after `rate`.
+
+1. You should create three attribute selectors to target the elements with the class of `read`, `to-read`, and `in-progress`, and set their `background-image` property to use a `linear-gradient` of your choice.
+
+1. You should set the `display` property of each `span` element to `inline-block`.
+
+1. You should use an attribute selector to target the descendants of `span` elements with the class of `to-read` that have the class of `status` and set their `border` and `background-image` properties.
+
+1. You should use an attribute selector to target the descendants of `span` elements with the class of `read` that have the class of `status` and set their `border` and `background-image` properties.
+
+1. You should use an attribute selector to target the descendants of `span` elements with the class of `in-progress` that have the class of `status` and set their `border` and `background-image` properties.
+
+1. You should use an attribute selector to target the `span` elements which are children of `span` elements with the `class` value starting with `rate` and set their `border`, `border-radius`, `margin`, `height`, `width`, and `background-color` properties.
+
+1. You should use an attribute selector to target the first descendant of `span` elements that have `one` as a part of their `class` value and set its `background-image` property to use a `linear-gradient`.
+
+1. You should use an attribute selector to target the first two descendants of `span` elements that have `two` as a part of their `class` value and set their `background-image` property to use a `linear-gradient`.
+
+1. You should use an attribute selector to target the three `span` elements that are descendants of `span` elements that have `three` as a part of their `class` value and set their `background-image` property to use a `linear-gradient`.
\ No newline at end of file
diff --git a/fullstack-cert/css-projects/business-card/flower.jpg b/fullstack-cert/css-projects/business-card/flower.jpg
new file mode 100644
index 000000000..26589e511
Binary files /dev/null and b/fullstack-cert/css-projects/business-card/flower.jpg differ
diff --git a/fullstack-cert/css-projects/business-card/index.html b/fullstack-cert/css-projects/business-card/index.html
new file mode 100644
index 000000000..107f5823e
--- /dev/null
+++ b/fullstack-cert/css-projects/business-card/index.html
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+ Digital Business Card
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/fullstack-cert/css-projects/business-card/styles.css b/fullstack-cert/css-projects/business-card/styles.css
new file mode 100644
index 000000000..5bcc7a03a
--- /dev/null
+++ b/fullstack-cert/css-projects/business-card/styles.css
@@ -0,0 +1,65 @@
+body {
+ background-color: rosybrown;
+ font-family: 'Arial', sans-serif;
+}
+
+.business-card {
+ background-color: lavenderblush;
+ border: 3px solid darkslategray;
+ padding: 20px;
+ text-align: center;
+ font-size: 16px;
+ width: 300px;
+ margin-left: auto;
+ margin-right: auto;
+ margin-top: 100px;
+}
+
+.profile-image {
+ width: 150px;
+ height: 150px;
+ margin-bottom: 10px;
+ border: 2px solid lightgray;
+}
+
+.full-name {
+ font-size: 24px;
+ color: darkslategray;
+}
+
+.designation {
+ font-size: 18px;
+ color: gray;
+}
+
+.company {
+ font-size: 16px;
+ color: darkgray;
+}
+
+p {
+ margin: 5px 0;
+}
+
+a {
+ text-decoration: none;
+}
+
+a:hover {
+ text-decoration: underline;
+}
+
+.social-media {
+ margin-top: 10px;
+ font-size: 14px;
+}
+
+.social-media a {
+ margin: 10px;
+ color: maroon
+}
+
+hr {
+ border-top: 1px dashed slategray;
+ margin: 20px 0;
+}
\ No newline at end of file
diff --git a/fullstack-cert/css-projects/business-card/user-stories.md b/fullstack-cert/css-projects/business-card/user-stories.md
new file mode 100644
index 000000000..ae57e50a5
--- /dev/null
+++ b/fullstack-cert/css-projects/business-card/user-stories.md
@@ -0,0 +1,27 @@
+1. Your page background should be `rosybrown`. The overall font should be `Arial`, with a fallback of `sans-serif`.
+
+2. All of the `p` tags should have a top and bottom margin of `5px` and a left and right margin of `0px`.
+
+3. All links on the page should have a default of no underline. When you hover over the links, there should be an underline.
+
+4. You should have a `div` with the class `business-card`.
+
+5. The `business-card` class should be `300px` wide and it should have a background color of `lavenderblush`. There should be a padding of `20px` all around and a top margin of `100px`. The text should be center aligned and the font size should be `16px`. The left and right margins should be set to `auto`.
+
+6. Inside the `buisness-card` div, there should be an `img` tag with the class `profile-image`. The image source should be set to `flower.jpg` and there should be an `alt` attribute should be set to a meaningful description. The image size should be `150px by 150px`. The bottom margin should be `10px` and there should be a `2px` solid `lightgray` border around the image.
+
+7. Inside the `business-card` `div`, after the `img` element, you should have three `p` elements with the class `full-name`, `designation`, and `company`, respectively.
+
+8. The first `p` element should contain your name. Its font size should be `24px` and the `color` should be `darkslategray`.
+
+9. The second `p` element should contain your designation. Its `font-size` property should be `18px` and the `color` should be set to `gray`.
+
+10. The third `p` element should have your company name. Its font size should be `16px` and the `color` should be set to `darkgray`.
+
+11. There should be an `hr` element below the last `p` element. The `hr` element in general should have a `1px` dashed top border in `slategray` color. There should be a top and bottom `margin` of `20px` and a left and right `margin` of `0px`.
+
+12. After the `hr` element, there should be three `p` elements. In the first `p` element, you should have an email address as the text. In the second `p` element, the text should be a phone number. The third `p` element should have the text `Portfolio: ` and an `a` element with any valid link. Add an `hr` element after the third `p` element.
+
+13. You should have another `div` with the class `social-media`. This div should have a top margin of `10px` and a font size of `14px`. The links inside this div should be `maroon` and should have a margin of `10px` all around. Within this class, there should be a `p` tag with the text `Connect with me`.
+
+14. Inside the `social-media` div, there should be three `a` tags. The `a` tags should have the text `Twitter`, `LinkedIn` and `GitHub` respectively with links to valid sites.
\ No newline at end of file
diff --git a/fullstack-cert/css-projects/cafe-menu/index.html b/fullstack-cert/css-projects/cafe-menu/index.html
new file mode 100644
index 000000000..d7b0017a3
--- /dev/null
+++ b/fullstack-cert/css-projects/cafe-menu/index.html
@@ -0,0 +1,60 @@
+
+
+
+
+
+ Cafe Menu
+
+
+
+
+
+
diff --git a/fullstack-cert/css-projects/colored-boxes-layout/styles.css b/fullstack-cert/css-projects/colored-boxes-layout/styles.css
new file mode 100644
index 000000000..3822cdaa2
--- /dev/null
+++ b/fullstack-cert/css-projects/colored-boxes-layout/styles.css
@@ -0,0 +1,72 @@
+h1 {
+ text-align: center;
+ margin-bottom: 10px;
+}
+
+.flex-container {
+ display: flex;
+ flex-wrap: wrap;
+ width: 70%;
+ height: auto;
+ padding: 10px;
+ margin: 20px auto;
+ height: 400px;
+ /* Show campers the various align-content values */
+ /* align-content: space-between; */
+ /* align-content: start; */
+ /* align-content: center; */
+ /* align-content: end; */
+ /* align-content: space-around; */
+ align-content: space-evenly;
+}
+
+.box {
+ flex: 0 0 250px;
+ /*For flex-grow, start here and state that the first value reps the flex-grow proeprty for all the boxes (making the default 0, which they can override later)*/
+ /*To demonstrate flex-shrink, ask campers to change the second value here to 1 so they can see some boxes become smaller than the others, and that the default (which can be overriden in other boxes) is set here)*/
+ /* After going through order and flex-grow, tell campers to modify the third value here (flex-basis) to observe how flex-grow distribution changes due to different line breaks and remaining space */
+ max-height: 120px;
+ color: #fff;
+ border: 1px solid #000;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ margin: 10px;
+ font-weight: bold;
+ font-size: 1.125rem;
+ border-radius: 5px;
+ order: 0; /* Set an initial order of 0 for all elements at first */
+}
+
+.box1 {
+ background: #f16e79;
+ order: 1; /* Use this to show campers that this would throw box 1 to the end, because every other box has an order of 0 at this point */
+ flex-grow: 1; /* Use this on any box, to show that that box will grow if there's space on its line */
+}
+
+.box2 {
+ background: #f4a261;
+ order: 0; /* This will make box 2 stays in its position (the first on at this point) */
+}
+
+.box3 {
+ background: #ffd166;
+ order: 2; /* This will make box 3 appear after box 1 and after box 2, too */
+ flex-shrink: 3; /* Use this (with flex: 0 0 250px) to show campers that box 3 will shrink three times as much as other boxes if there's not enough space on its line */
+}
+
+.box4 {
+ background: #4caf50;
+ order: 3; /* Make box 4 come after box 3 */
+}
+.box5 {
+ background: #457b9d;
+ order: 4; /* Make box 5 come after box 4 */
+}
+
+.box6 {
+ background: #3f51b5;
+ order: 5; /* Make box 6 come after box 5 */
+ flex-grow: 1; /*Use this to show campers that any flex-grow of 1 and greater will make box 6 (the last box at this point) take up every other remaining space in the container */
+}
diff --git a/fullstack-cert/css-projects/confidential-email/index.html b/fullstack-cert/css-projects/confidential-email/index.html
new file mode 100644
index 000000000..6dfd0197c
--- /dev/null
+++ b/fullstack-cert/css-projects/confidential-email/index.html
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+ Secret Marshmallow Mission
+
+
+
+
+
+
CONFIDENTIAL
+
Dear Agent S'more,
+
We have an emergency. The secret formula for our Mega Marshmallow has been
+ compromised. This formula is what makes our marshmallows the fluffiest and most delicious.
+
We suspect that Professor Puff is behind this. He has taken the formula to his
+ hidden laboratory. Your mission is to infiltrate the lab and secure the formula before it's too late.
+
Be sure to keep the lab's location confidential. Any leak of this information could jeopardize the entire
+ operation.
+
TOP SECRET
+
+
+
+
\ No newline at end of file
diff --git a/fullstack-cert/css-projects/confidential-email/styles.css b/fullstack-cert/css-projects/confidential-email/styles.css
new file mode 100644
index 000000000..959218461
--- /dev/null
+++ b/fullstack-cert/css-projects/confidential-email/styles.css
@@ -0,0 +1,37 @@
+#email {
+ background-color: SeaShell;
+ margin: 50px auto;
+ padding: 50px;
+ width: 500px;
+ border: 2px solid black;
+ box-shadow: 5px 3px 3px gray;
+ box-sizing: border-box;
+}
+
+#confidential {
+ display: inline-block;
+ margin-left: 100px;
+ padding: 10px;
+ text-align: center;
+ font-size: 30px;
+ transform: rotate(-20deg);
+ color: red;
+ border: 5px solid red;
+ font-weight: bold;
+}
+
+#top-secret {
+ margin-left: 200px;
+ display: inline-block;
+ padding: 10px;
+ text-align: center;
+ font-size: 20px;
+ transform: rotate(15deg);
+ color: red;
+ border: 5px solid red;
+ font-weight: bold;
+}
+
+.blurred {
+ filter: blur(3px);
+}
\ No newline at end of file
diff --git a/fullstack-cert/css-projects/confidential-email/user-stories.md b/fullstack-cert/css-projects/confidential-email/user-stories.md
new file mode 100644
index 000000000..03245b4ee
--- /dev/null
+++ b/fullstack-cert/css-projects/confidential-email/user-stories.md
@@ -0,0 +1,10 @@
+1. You should have a `main` element with an id of `email`.
+1. Your `#email` element should have `padding` of `50px`, a `top-margin` of `50px`, a `width` of `500px`, and a `border` that's `2px`.
+1. The total width of your `#email` element should be `500px`.
+1. You should have two `div` elements, one with an id of `confidential` and the other with an id of `top-secret`, within your `main` element.
+1. Your `confidential` and `top-secret` elements should have a `display` of `inline-block`.
+1. Your `confidential` and `top-secret` elements should have a `padding`, a `left-margin`, and a `border`.
+1. Your `confidential` and `top-secret` elements should be rotated along their Y-axis using a CSS transform.
+1. You should have at least three paragraph elements within your `main` element.
+1. You should have a `blurred` class that blurs the element `3px` using a CSS filter.
+1. You should have a least three `span` elements with the `blurred` class in your email.
\ No newline at end of file
diff --git a/fullstack-cert/css-projects/css-colors/index.html b/fullstack-cert/css-projects/css-colors/index.html
new file mode 100644
index 000000000..2093db652
--- /dev/null
+++ b/fullstack-cert/css-projects/css-colors/index.html
@@ -0,0 +1,19 @@
+
+
+
+
+
+ Colored Boxes
+
+
+
+
Colored Boxes
+
+
+
+
+
+
+
+
+
diff --git a/fullstack-cert/css-projects/css-colors/styles.css b/fullstack-cert/css-projects/css-colors/styles.css
new file mode 100644
index 000000000..50c3eef29
--- /dev/null
+++ b/fullstack-cert/css-projects/css-colors/styles.css
@@ -0,0 +1,52 @@
+body {
+ font-family: Arial, sans-serif;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ margin: 0;
+ padding: 20px;
+ background-color: #f4f4f4;
+}
+
+h1 {
+ margin-bottom: 20px;
+}
+
+.color-grid {
+ display: grid;
+ grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
+ gap: 10px;
+ width: 100%;
+ max-width: 800px;
+}
+
+.color-box {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ font-weight: bold;
+ border-radius: 8px;
+ text-align: center;
+ width: 100px;
+ height: 100px;
+}
+
+.color1 {
+ background-color: #33FF57;
+}
+
+.color2 {
+ background-color: rgb(128,0,128);
+}
+
+.color3 {
+ background-color: orange;
+}
+
+.color4 {
+ background-color: hsl(59, 61%, 26%);
+}
+
+.color5 {
+ background-color: red;
+}
diff --git a/fullstack-cert/css-projects/css-colors/user-stories.md b/fullstack-cert/css-projects/css-colors/user-stories.md
new file mode 100644
index 000000000..a3c77dfae
--- /dev/null
+++ b/fullstack-cert/css-projects/css-colors/user-stories.md
@@ -0,0 +1,19 @@
+1. You should set the background color for `body` to `#f4f4f4`.
+
+2. You should have a `div` with a class of `color-grid` to hold all your color elements.
+
+3. You should have five `div` elements within `color-grid` `div`.
+
+4. The five `div` elements should each have a class of `color-box` and `color#`, where # is the number of the order of that `div`. For example: `color1` for the first `div`, `color2` for the second, and so on.
+
+5. The `.color-box` class should have a set `width` and `height` so your `div` elements are visible on the page.
+
+6. The `.color1` element should have a `background-color` that uses hexadecimal color value.
+
+7. The `.color2` element should have a `background-color` that uses an RGB color value.
+
+8. The `.color3` element should have a `background-color` that uses a predefined (word) color value.
+
+9. The `.color4` element should have a `background-color` that uses a HSL color value.
+
+10. The `.color5` element should have a `background-color` set.
\ No newline at end of file
diff --git a/fullstack-cert/css-projects/css-grid/index.html b/fullstack-cert/css-projects/css-grid/index.html
new file mode 100644
index 000000000..c37fd699a
--- /dev/null
+++ b/fullstack-cert/css-projects/css-grid/index.html
@@ -0,0 +1,31 @@
+
+
+
+
+
+ Adventure Magazine
+
+
+
+
+
+
Adventure Awaits
+
+
+
Top 10 Exotic Destinations for 2024
+
Discover the most breathtaking places to visit this year, from hidden beaches to mountain retreats. Our guide takes you through the best spots for your next adventure.
+
+
+
Gear Up: Must-Have Gadgets
+
Check out the latest tech and gear to make your travels more exciting and comfortable.
+
+
+
Meet the Explorers
+
Get to know the modern adventurers who are pushing the boundaries of exploration.
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/fullstack-cert/css-projects/css-grid/styles.css b/fullstack-cert/css-projects/css-grid/styles.css
new file mode 100644
index 000000000..c31cd97b4
--- /dev/null
+++ b/fullstack-cert/css-projects/css-grid/styles.css
@@ -0,0 +1,56 @@
+body {
+ font-family: Arial, sans-serif;
+ margin: 0;
+ padding: 0;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ height: 100vh;
+ background-color: #f0f0f0;
+}
+
+.magazine-cover {
+ display: grid;
+ grid-template-areas:
+ "title title title"
+ "feature-article feature-article cover-image"
+ "small-article1 small-article2 cover-image";
+ grid-template-columns: 1fr 1fr 1fr;
+ grid-template-rows: auto 1fr 1fr;
+ gap: 10px;
+ width: 80%;
+ background-color: #fff;
+}
+
+.title {
+ grid-area: title;
+ background-color: #1B1B32;
+ color: white;
+ padding: 10px;
+ text-align: center;
+}
+
+.feature-article {
+ grid-area: feature-article;
+ background-color: #f9f9f9;
+ padding: 10px;
+}
+
+.small-article1, .small-article2 {
+ background-color: #e9e9e9;
+ padding: 10px;
+}
+
+.cover-image {
+ grid-area: cover-image;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ background-color: #ddd;
+ padding: 10px;
+}
+
+.cover-image img {
+ max-width: 100%;
+ height: auto;
+}
\ No newline at end of file
diff --git a/fullstack-cert/css-projects/css-grid/user-stories.md b/fullstack-cert/css-projects/css-grid/user-stories.md
new file mode 100644
index 000000000..e1072747c
--- /dev/null
+++ b/fullstack-cert/css-projects/css-grid/user-stories.md
@@ -0,0 +1,10 @@
+1. You should have a `main` element with the class `magazine-cover`.
+1. Your `.magazine-cover` should contain a `header` element for the title and `section` elements for each article and the cover image.
+1. You should set the display property of the `.magazine-cover` to `grid.`
+1. The `.magazine-cover` should define a grid layout with the following structure:
+ - The title spanning the top row.
+ - Two feature articles and a cover image in the second row.
+ - Two small articles and the cover image in the third row.
+1. The `.magazine-cover` should have a `grid-template-columns` property that divides the space into three equal parts.
+1. The `.magazine-cover` should have a `grid-template-rows` property. It should be set to `auto` for the first row, and divide equally the space occupied by the remaining two rows.
+1. You should add a gap between grid items and set the width of the `.magazine-cover` to occupy most of the viewport width.
\ No newline at end of file
diff --git a/fullstack-cert/css-projects/event-flyer/index.html b/fullstack-cert/css-projects/event-flyer/index.html
new file mode 100644
index 000000000..452318fd1
--- /dev/null
+++ b/fullstack-cert/css-projects/event-flyer/index.html
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+ Build an Event Flyer Page
+
+
+
+
+
+
+
+
Pet Rock Festival
+
Join us for the first annual Pet Rock Festival!
+
When:Where: Boulder Park
+
+
+
+
+
+
+
Festival Highlights
+
+
Pet Rock Obedience Shows
+
Best Dressed Pet Rock Contest
+
Pet Rock Uphill Racing
+
+
+
+
+
Special Guests
+
+
John Gravel
+
Wendy Cobblestone
+
+
+
+
+
Food Trucks
+
+
Rock 'n' Roll Tacos
+
Granite Grill
+
Stone Cold Smoothies
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/fullstack-cert/css-projects/event-flyer/rock.jpg b/fullstack-cert/css-projects/event-flyer/rock.jpg
new file mode 100644
index 000000000..626547e83
Binary files /dev/null and b/fullstack-cert/css-projects/event-flyer/rock.jpg differ
diff --git a/fullstack-cert/css-projects/event-flyer/styles.css b/fullstack-cert/css-projects/event-flyer/styles.css
new file mode 100644
index 000000000..486b1218f
--- /dev/null
+++ b/fullstack-cert/css-projects/event-flyer/styles.css
@@ -0,0 +1,38 @@
+html {
+ background-color: black;
+}
+
+body {
+ padding: 50px 10px;
+ margin: 0 auto;
+ width: 60vw;
+ height: calc(100vh - 100px);
+ background-color: white;
+ font-family: sans-serif;
+ text-align: center;
+}
+
+hr {
+ margin: 30px auto;
+ width: 80%;
+ background-color: black;
+ height: 2px;
+}
+
+main {
+ margin: 0 auto;
+}
+
+section {
+ text-align: center;
+ padding: 50px 10px;
+ vertical-align: top;
+ display: inline-block;
+ min-height: 100px;
+ width: 25%;
+}
+
+ul {
+ text-align: left;
+ list-style: inside;
+}
diff --git a/fullstack-cert/css-projects/event-flyer/user-stories.md b/fullstack-cert/css-projects/event-flyer/user-stories.md
new file mode 100644
index 000000000..ccab32e17
--- /dev/null
+++ b/fullstack-cert/css-projects/event-flyer/user-stories.md
@@ -0,0 +1,8 @@
+You should have a `header` element with an image in it for your event, and an `h1` in it with your event title, in that order.
+You should have a `main` element with at least two `section` elements within it showcasing the event features.
+Your body should have a top and bottom padding of `50px`.
+Your body should have a top and bottom margin of `0`, and a left and right margin that centers itself.
+Your body should have a width set relative to the width of the viewport.
+Your body should use the `calc` function to set its height to 100% of the viewport's height minus any padding applied to the top and bottom of the body.
+You should have at least one `hr` within your flyer.
+You should the `width` of all `hr` and `section` elements to a percent value relative to its parent.
diff --git a/fullstack-cert/css-projects/feature-selection/index.html b/fullstack-cert/css-projects/feature-selection/index.html
new file mode 100644
index 000000000..b7bba49eb
--- /dev/null
+++ b/fullstack-cert/css-projects/feature-selection/index.html
@@ -0,0 +1,49 @@
+
+
+
+
+
+ Feature Selection
+
+
+
+
Feature Selection
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/fullstack-cert/css-projects/feature-selection/styles.css b/fullstack-cert/css-projects/feature-selection/styles.css
new file mode 100644
index 000000000..39d2933dd
--- /dev/null
+++ b/fullstack-cert/css-projects/feature-selection/styles.css
@@ -0,0 +1,74 @@
+body {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ flex-direction: column;
+ height: 100vh;
+}
+
+.feature-card-container {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 20px;
+ max-width: 600px;
+ justify-content: center;
+}
+
+.feature-card-container > * {
+ flex: 1 1 180px;
+}
+
+.feature-card {
+ border: 2px solid #ccc;
+ border-radius: 12px;
+ padding: 20px;
+ text-align: center;
+ position: relative;
+ cursor: pointer;
+ transition: 0.3s;
+}
+
+.feature-card:hover {
+ border-color: #f1be32;
+ box-shadow: 0 4px 12px rgba(255, 201, 53, 0.6);
+}
+
+.feature-card input[type='checkbox'] {
+ position: absolute;
+ top: 5px;
+ right: 5px;
+ width: 24px;
+ height: 24px;
+ cursor: pointer;
+ appearance: none;
+ -webkit-appearance: none;
+ border: 2px solid #ccc;
+ border-radius: 4px;
+ background-color: white;
+ transition: all 0.3s;
+}
+
+.feature-card input[type='checkbox']:checked {
+ background-color: #f1be32;
+ border-color: #f1be32;
+}
+
+.feature-card input[type='checkbox']:checked::after {
+ content: '✓';
+ display: block;
+ text-align: center;
+ font-weight: bold;
+ color: white;
+ line-height: 20px;
+}
+
+.feature-card h4 {
+ margin: 10px 0 5px;
+ font-size: 1.2rem;
+}
+
+@media (max-width: 600px) {
+ body {
+ height: auto;
+ }
+}
diff --git a/fullstack-cert/css-projects/feature-selection/user-stories.md b/fullstack-cert/css-projects/feature-selection/user-stories.md
new file mode 100644
index 000000000..4aef3bd85
--- /dev/null
+++ b/fullstack-cert/css-projects/feature-selection/user-stories.md
@@ -0,0 +1,11 @@
+# User Stories
+
+1. Your page should have an `h1` element with the text `Feature Selection`.
+2. Your page should have a `div` element with the class `feature-card-container`.
+3. Your page should have at least two `label` elements each with the class `feature-card`.
+4. Each of your `label` elements should each have label text and an `input` element of type `checkbox` in them.
+5. All of your checkbox elements should be set to `appearance: none;` in your CSS.
+6. Each of your checkbox elements should have a border width, color and style of your choosing.
+7. When the checkbox is checked, it should display a checkmark (✓) in the center of the checkbox.
+8. When the checkbox is checked, the background color of the checkbox should change to a color of your choosing.
+9. When the checkbox is checked, the border color of the checkbox should change to a color of your choosing.
diff --git a/fullstack-cert/css-projects/game-settings-panel/index.html b/fullstack-cert/css-projects/game-settings-panel/index.html
new file mode 100644
index 000000000..7894f1629
--- /dev/null
+++ b/fullstack-cert/css-projects/game-settings-panel/index.html
@@ -0,0 +1,18 @@
+
+
+
+
+
+ Game Settings Panel
+
+
+
+
+
+
+
diff --git a/fullstack-cert/css-projects/house-painting/styles.css b/fullstack-cert/css-projects/house-painting/styles.css
new file mode 100644
index 000000000..a14d22e9e
--- /dev/null
+++ b/fullstack-cert/css-projects/house-painting/styles.css
@@ -0,0 +1,136 @@
+* {
+ box-sizing: border-box;
+ }
+
+ body {
+ margin: 0;
+ padding: 0;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ height: 100vh;
+ background: linear-gradient(
+ #b3e6ff,
+ #b3e6ff 60%,
+ green 60%
+ );
+ }
+
+ #house {
+ width: 500px;
+ height: 400px;
+ position: relative;
+ background-color: #ff9980;
+ border: 6px solid #b35900;
+ }
+
+ #chimney {
+ position: relative;
+ width: 90px;
+ height: 100px;
+ top: -100px;
+ left: 65%;
+ background: repeating-linear-gradient(
+ #e6e6e6,
+ #e6e6e6 10%,
+ black 10%,
+ black 12%
+ );
+ border: 2px solid black;
+ z-index: -1;
+ }
+
+ #smoke {
+ width: 40px;
+ height: 40px;
+ background-color: rgba(0,0,0,0.3);
+ position: absolute;
+ top: -20px;
+ left: 20px;
+ border-radius: 50%;
+ box-shadow: 0 -10px 10px 10px rgba(0,0,0,0.3);
+ border: none;
+ }
+
+ #decor {
+ width: 100%;
+ height: 110px;
+ background-color: green;
+ position: absolute;
+ top: 0;
+ background: repeating-linear-gradient(
+ 45deg,
+ #b35900,
+ #b35900 2%,
+ transparent 2%,
+ transparent 5%
+ ), repeating-linear-gradient(
+ -45deg,
+ #b35900,
+ #b35900 2%,
+ #ff9980 2%,
+ #ff9980 5%
+ )
+ }
+
+ .window {
+ width: 100px;
+ height: 100px;
+ background: linear-gradient(
+ to right,
+ #ffffb3,
+ #ffffb3 48%,
+ #b35900 48%,
+ #b35900 52%,
+ #ffffb3 52%,
+ #ffffb3 100%
+ );
+ position: absolute;
+ top: 40%;
+ border: 6px solid #b35900;
+ }
+
+ #window-1 {
+ left: 7.5%;
+ }
+
+ #window-2 {
+ right: 7.5%;
+ }
+
+ #door {
+ width: 130px;
+ height: 180px;
+ position: absolute;
+ bottom: 0%;
+ left: 185px;
+ background-color: #e6e6e6;
+ border: 6px solid #b35900;
+ border-bottom: none;
+ }
+
+ #door-knob {
+ width: 20px;
+ height: 20px;
+ background-color: #b35900;
+ border-radius: 50%;
+ position: absolute;
+ top: 50%;
+ right: 5%;
+ }
+
+ #welcome {
+ font-family: sans-serif;
+ font-weight: bold;
+ width: 130px;
+ height: 40px;
+ position: absolute;
+ bottom: -47px;
+ left: 178px;
+ background-color: #85e085;
+ border: 2px solid black;
+ transform: skewX(-20deg);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ }
\ No newline at end of file
diff --git a/fullstack-cert/css-projects/house-painting/user-stories.md b/fullstack-cert/css-projects/house-painting/user-stories.md
new file mode 100644
index 000000000..c97c3b03d
--- /dev/null
+++ b/fullstack-cert/css-projects/house-painting/user-stories.md
@@ -0,0 +1,8 @@
+1. You should have a `#house` `div`.
+1. Your `#house` should have a `position` set to `relative` so its children can be positioned with respect to it.
+1. Your `#house` should have a width of `500px` and a height of `400px`.
+1. You should have a `#chimney`, `#decor`, `#window-1`, `#window-2`, and `#door` `div`s within the `#house`.
+1. All of the immediate children of the `#house` should have a `position` of `absolute`.
+1. All of the immediate children of the `#house` should have a width and height set.
+1. Your `#chimney` should have a top value that puts it at the top of your `#house`.
+1. Your `#chimney` should have a `z-index` that puts it behind the house.
\ No newline at end of file
diff --git a/fullstack-cert/css-projects/moon-orbit-lab/index.html b/fullstack-cert/css-projects/moon-orbit-lab/index.html
new file mode 100644
index 000000000..41e095b7d
--- /dev/null
+++ b/fullstack-cert/css-projects/moon-orbit-lab/index.html
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+ Moon Orbiting Earth
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/fullstack-cert/css-projects/moon-orbit-lab/styles.css b/fullstack-cert/css-projects/moon-orbit-lab/styles.css
new file mode 100644
index 000000000..73decc505
--- /dev/null
+++ b/fullstack-cert/css-projects/moon-orbit-lab/styles.css
@@ -0,0 +1,57 @@
+body {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ height: 100vh;
+ margin: 0;
+ background-color: #000;
+}
+
+.space {
+ position: relative;
+ width: 200px;
+ height: 200px;
+}
+
+.earth {
+ width: 100px;
+ height: 100px;
+ background-color: blue;
+ border-radius: 50%;
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+ box-shadow: 0 0 20px rgba(0, 0, 255, 0.5);
+}
+
+.orbit {
+ width: 200px;
+ height: 200px;
+ position: absolute;
+ transform: translate(-50%, -50%);
+ animation: orbit 5s linear infinite;
+}
+
+.moon {
+ width: 30px;
+ height: 30px;
+ background-color: gray;
+ border-radius: 50%;
+ position: absolute;
+ top: 0;
+ left: 50%;
+ transform: translateX(-50%);
+ box-shadow: 0 0 10px rgb(255, 255, 255);
+}
+
+
+@keyframes orbit {
+ 0% {
+ transform: rotate(0deg) translate(-50%, -50%);
+ }
+
+ 100% {
+ transform: rotate(360deg) translate(-50%, -50%);
+ }
+}
\ No newline at end of file
diff --git a/fullstack-cert/css-projects/moon-orbit-lab/user-stories.md b/fullstack-cert/css-projects/moon-orbit-lab/user-stories.md
new file mode 100644
index 000000000..6f2324d63
--- /dev/null
+++ b/fullstack-cert/css-projects/moon-orbit-lab/user-stories.md
@@ -0,0 +1,11 @@
+1. You should have a `div` with the class `space`.
+
+1. Inside the `.space` `div`, there should be two more `div` elements with the class `earth` and `orbit`, respectively.
+
+1. Inside the `.orbit` `div`, there should be another `div` with the class `moon`.
+
+1. Your `.earth` and `.moon` `div` elements should have a background color and `border-radius` to make them look like planets.
+
+1. The orbit path for the moon around the Earth should be a circle. The `.orbit` `div` should be centered with respect to `.earth`.
+
+1. You should define a `@keyframes orbit` animation that rotates the `.orbit` element 360 degrees around its center. You should apply this animation to the `.orbit` element with a duration of `5` seconds, a linear timing function, and infinite iterations.
diff --git a/fullstack-cert/css-projects/newspaper-article/index.html b/fullstack-cert/css-projects/newspaper-article/index.html
new file mode 100644
index 000000000..06b3bef63
--- /dev/null
+++ b/fullstack-cert/css-projects/newspaper-article/index.html
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+ Daily Chuckles
+
+
+
+
+
+
Daily Chuckles
+
July 5, 2024
+
Breaking: Grandma Edna Saves Earth
+
Alien Invasion Foiled by Tech-Savvy Grandma's Wi-Fi Password
+
By Jane Doe
+
In an extraordinary twist of fate, Grandma Edna found herself at the forefront of a potential crisis
+ when her clever Wi-Fi security measures unexpectedly thwarted an alien invasion. As alien spacecraft descended
+ upon the town, panic spread until Grandma Edna calmly intervened, resetting her router with a cryptic passphrase
+ known only to her.
+
The aliens, encountering unforeseen technological barriers, struggled to breach Grandma Edna's
+ fortified network. Frustrated and bewildered, they eventually retreated to reassess their invasion strategy,
+ leaving residents both relieved and amazed at Grandma Edna's resourcefulness.
+
+
+
+
\ No newline at end of file
diff --git a/fullstack-cert/css-projects/newspaper-article/styles.css b/fullstack-cert/css-projects/newspaper-article/styles.css
new file mode 100644
index 000000000..8ac94ea53
--- /dev/null
+++ b/fullstack-cert/css-projects/newspaper-article/styles.css
@@ -0,0 +1,64 @@
+html {
+ font-size: 24px;
+ background-color: MintCream;
+ padding-top: 100px;
+}
+
+.newspaper {
+ font-family: 'Open Sans', sans-serif;
+ background-color: #f4f4f4;
+ max-width: 800px;
+ margin: 20px auto;
+ padding: 20px;
+ background-color: white;
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
+ font-size: 16px;
+}
+
+.name {
+ font-family: 'Times New Roman', serif;
+ font-size: 2rem;
+ text-transform: uppercase;
+ text-align: center;
+ margin-bottom: 10px;
+}
+
+.date {
+ font-size: 1em;
+ text-align: center;
+ margin-bottom: 20px;
+}
+
+.headline {
+ font-size: 2em;
+ font-weight: bold;
+ line-height: 1.2;
+ margin-bottom: 10px;
+}
+
+.sub-headline {
+ font-size: 1.5em;
+ font-style: italic;
+ font-weight: 100;
+ line-height: 1.4;
+ margin-bottom: 15px;
+}
+
+.author {
+ font-size: 1em;
+ text-transform: uppercase;
+ font-weight: bold;
+ margin-bottom: 20px;
+}
+
+.text {
+ text-indent: 20px;
+ font-size: 1em;
+ line-height: 2em;
+ margin-bottom: 15px;
+}
+
+.text::first-letter {
+ font-size: 2em;
+ font-weight: bold;
+}
\ No newline at end of file
diff --git a/fullstack-cert/css-projects/newspaper-article/user-stories.md b/fullstack-cert/css-projects/newspaper-article/user-stories.md
new file mode 100644
index 000000000..8ab2e2ecf
--- /dev/null
+++ b/fullstack-cert/css-projects/newspaper-article/user-stories.md
@@ -0,0 +1,12 @@
+1. You should set the root `font-size` of your HTML document to `24px`.
+2. You should have an element with a class of `newspaper` that contains all your other elements.
+3. Your `.newspaper` element should have a `font-size` of `16px` and a font of `Open Sans` with a fallback font of `sans-serif`.
+4. Within your `.newspaper` element, you should have at least seven more elements. One for the newspaper name that has a class of `name`, one for the the date of the article with a class of `date`, one for the headline with a class of `headline`, one for the sub-headline with a class of `sub-headline`, one for the author with a class of `author`, and two paragraphs each with a class of `text`.
+5. Your `.name` element should have a `font-size` that's two times the size of the root elements `font-size` and a font of `Times New Roman` with a fallback font of `serif`.
+6. Your `.name` and `.author` elements should use CSS to make all its characters uppercase.
+7. Your `.headline` element should `font-size` that's two times the size of its parent's `font-size` and use CSS to make it bold.
+8. Your `.sub-headline` element should have a `font-weight` of `100`, a `font-size` that's `1.5` times the size of its parent's `font-size`, and use CSS to make it italicized.
+9. Your `.author` should use CSS to make it bold.
+10. Your `.text` elements should be indented `20px`.
+11. Your `.text` elements should have a `line-height` that's two times the size of its parent's `font-size`.
+12. The first letter of your `.text` elements should be bold and two times the size of its parent's `font-size`. Hint: use the `::first-letter` selector.
\ No newline at end of file
diff --git a/fullstack-cert/css-projects/newspaper-css-grid-lab/index.html b/fullstack-cert/css-projects/newspaper-css-grid-lab/index.html
new file mode 100644
index 000000000..d2d569689
--- /dev/null
+++ b/fullstack-cert/css-projects/newspaper-css-grid-lab/index.html
@@ -0,0 +1,61 @@
+
+
+
+
+
+
+ Newspaper Layout
+
+
+
+
+
+
+
The Daily Local News
+
+
+
+
Breaking News: Volcano Eruption Disrupts Tourism
+
Recently, a volcano erupted in a popular tourist destination. The eruption has caused widespread panic
+ and has disrupted tourism in the area. The volcano has been spewing lava and ash for several days now,
+ and authorities are urging residents and tourists to evacuate the area immediately. The eruption has
+ also caused a number of flights to be cancelled, leaving many tourists stranded. The situation is still
+ developing, and authorities are working to contain the eruption and ensure the safety of everyone in the
+ area.
+
+
+
+
Sports: Local Team Wins Championship
+
Hockey fans are celebrating today as the local team has won the championship. The team, which has been on
+ a winning streak all season, clinched the title in a thrilling final match. Fans took to the streets to
+ celebrate the victory, waving flags and chanting the team's name.
+
+
+
+
Health: Tips for a Balanced Diet
+
A diet high in calories, sugar, and unhealthy fats can lead to a variety of health problems, including
+ obesity, diabetes, and heart disease. To maintain a healthy weight and reduce your risk of chronic
+ diseases, it's important to eat a balanced diet that includes a variety of nutrient-rich foods. Here are
+ some tips for eating a balanced diet:
+
+
+
+
Travel: Top 10 Destinations for 2025
+
Traveling is one of the best ways to experience new cultures, meet new people, and see the world. If
+ you're looking for inspiration for your next trip, here are the top 10 destinations for 2025:
+
+
+
+
Technology: The Rise of AI
+
Artificial intelligence (AI) is changing the way we live and work. From self-driving cars to virtual
+ assistants, AI is revolutionizing the world around us. But what exactly is AI, and how does it work? In
+ this article, we'll explore the rise of AI and its impact on society.
+
+
+
+
+
+
+
+
+
diff --git a/fullstack-cert/css-projects/newspaper-css-grid-lab/styles.css b/fullstack-cert/css-projects/newspaper-css-grid-lab/styles.css
new file mode 100644
index 000000000..704985142
--- /dev/null
+++ b/fullstack-cert/css-projects/newspaper-css-grid-lab/styles.css
@@ -0,0 +1,89 @@
+body {
+ font-family: 'Georgia', 'Times New Roman', Times, serif;
+ padding: 0;
+ margin: 0;
+ background-color: #f0f0f0;
+}
+
+main {
+ display: grid;
+ grid-template-areas:
+ "title title title"
+ "feature-article feature-article cover-image"
+ "secondary-article secondary-article cover-image"
+ "small-article1 small-article2 small-article3";
+ grid-template-columns: 1fr 1fr 1fr;
+ grid-template-rows: auto 1fr 1fr auto auto;
+ gap: 15px;
+ background-color: #fff;
+ padding: 15px;
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
+ box-sizing: border-box;
+ text-align: justify;
+}
+
+header {
+ grid-area: title;
+ background-color: #1B1B32;
+ color: white;
+ padding: 15px;
+ text-align: center;
+}
+
+header h1 {
+ font-size: 2.5rem;
+ line-height: 1.3;
+ margin: 0;
+}
+
+.feature-article,
+.secondary-article {
+ background-color: #f9f9f9;
+ padding: 15px;
+ font-size: 1rem;
+}
+
+.feature-article {
+ grid-area: feature-article;
+}
+
+.secondary-article {
+ grid-area: secondary-article;
+}
+
+.small-article1,
+.small-article2,
+.small-article3 {
+ background-color: #e9e9e9;
+ padding: 15px;
+ font-size: 0.9rem;
+}
+
+.small-article1 {
+ grid-area: small-article1;
+}
+
+.small-article2 {
+ grid-area: small-article2;
+}
+
+.small-article3 {
+ grid-area: small-article3;
+}
+
+figure.cover-image {
+ grid-area: cover-image;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ background-color: #ddd;
+ padding: 15px;
+ margin: 0;
+}
+
+.cover-image img {
+ max-width: 100%;
+ height: 350px;
+ width: 350px;
+ border-radius: 5px;
+}
diff --git a/fullstack-cert/css-projects/newspaper-css-grid-lab/travel.jpg b/fullstack-cert/css-projects/newspaper-css-grid-lab/travel.jpg
new file mode 100644
index 000000000..1a4568790
Binary files /dev/null and b/fullstack-cert/css-projects/newspaper-css-grid-lab/travel.jpg differ
diff --git a/fullstack-cert/css-projects/newspaper-css-grid-lab/userstories.md b/fullstack-cert/css-projects/newspaper-css-grid-lab/userstories.md
new file mode 100644
index 000000000..b052b7253
--- /dev/null
+++ b/fullstack-cert/css-projects/newspaper-css-grid-lab/userstories.md
@@ -0,0 +1,32 @@
+**User Stories:**
+
+1. Your page should contain a `main` element with the class `newspaper-layout`.
+
+2. The `.newspaper-layout` should include a `header` containing an `h1` with the class `title` to display the newspaper's name.
+
+3. The `.newspaper-layout` should include an `article` with the class `feature-article` for the main news article.
+
+4. The `.news-article` should include an `h2` element for the article title and a `p` element for the article content.
+
+5. You should add three more `article` elements for smaller articles, with classes `small-article1`, `small-article2`, and `small-article3`.
+
+6. Each of the smaller articles should include an `h3` element for the article title and a `p` element for the article content.
+
+7. The `.newspaper-layout` should include an `article` element with the class `secondary-article` for an additional news section.
+
+8. The `.newspaper-layout` should include a `figure` with the class `cover-image` to display an image that represents the newspaper's content.
+
+9. Your layout should use CSS Grid with a `grid-template-areas` property to define the arrangement of sections:
+
+ - The `header` should span across the top row.
+ - The `.feature-article` should span two columns in the second row, with the `.cover-image` in the third column.
+ - The `.secondary-article` should span two columns in the third row, with the `.cover-image` in the third column.
+ - The three small articles should appear in the fourth row.
+
+10. The `.newspaper-layout` should have a `grid-template-columns` property that divides the space into three equal columns.
+
+11. You should set the `.newspaper-layout`'s `grid-template-rows` property to `auto` for the first row and divide the remaining space into equal parts for the other rows.
+
+12. Add a gap between grid items and set the width of `.newspaper-layout` to `90%` to take up most of the viewport width.
+
+13. Ensure that the image inside the `.cover-image` `figure` fits within the designated space.
\ No newline at end of file
diff --git a/fullstack-cert/css-projects/parent-teacher-form/index.html b/fullstack-cert/css-projects/parent-teacher-form/index.html
new file mode 100644
index 000000000..fdcf9db3c
--- /dev/null
+++ b/fullstack-cert/css-projects/parent-teacher-form/index.html
@@ -0,0 +1,84 @@
+
+
+
+
+
+ Parent Teacher Conference Form
+
+
+
+
+
Parent Teacher Conference Form
+
+ Please fill out the form below to help schedule your parent-teacher
+ conference.
+
+
+
+
+
+
diff --git a/fullstack-cert/css-projects/parent-teacher-form/styles.css b/fullstack-cert/css-projects/parent-teacher-form/styles.css
new file mode 100644
index 000000000..5f2090274
--- /dev/null
+++ b/fullstack-cert/css-projects/parent-teacher-form/styles.css
@@ -0,0 +1,110 @@
+body {
+ background-color: MidnightBlue;
+ color: whitesmoke;
+}
+
+.container {
+ /* Provide brief explanation for hex code here and explain there will be a whole module on it later. */
+ background-color: #ffffff1a;
+ width: 80%;
+ max-width: 600px;
+ border-radius: 10px;
+ margin: 20px auto;
+ padding: 10px 20px;
+/*Provide brief explanation of box-shadow to campers*/
+ box-shadow: 0 5px 15px black;
+}
+
+.center {
+ text-align: center;
+}
+
+.description {
+ font-size: 1.2rem;
+}
+
+fieldset {
+ border: 1px solid gray;
+ border-radius: 5px;
+ margin: 20px 0;
+ padding: 20px;
+}
+
+fieldset legend {
+ font-size: 1.3rem;
+ /* Teach font-weight here */
+ font-weight: 600;
+}
+
+label {
+ font-size: 1.2rem;
+}
+
+/*explain to campers why :not() is being used here*/
+label:not(.contact-method) {
+ display: block;
+ margin: 10px 0;
+}
+
+/* Would be a good teaching moment to have these styles initially in a
+input selector. Then show campers how that changes the layout and then
+have them move it to this selector below.
+*/
+
+input:not(.contact-method-radio-btn),
+textarea {
+ background-color: #ffffff1a;
+ width: 95%;
+ border: 1px solid gray;
+ border-radius: 5px;
+ padding: 10px;
+}
+
+input,
+input::placeholder,
+textarea {
+ color: whitesmoke;
+}
+
+.contact-method-radio-btn {
+ appearance: none; /* this was mentioned in lectures but make sure to reintroduce it here */
+ width: 20px;
+ height: 20px;
+ border-radius: 50%;
+ border: 2px solid gray;
+ /* not sure when vertical-align was taught. so teach it here */
+ vertical-align: bottom;
+}
+
+.contact-method-radio-btn::before {
+ display: block;
+ content: " ";
+ width: 10px;
+ height: 10px;
+ border-radius: 50%;
+ /* make sure to teach all of these concepts */
+ /* maybe some of these came up in the greeting card workshop. double check first */
+ transform: translate(3px, 3px) scale(0);
+ transition: all 0.3s ease-in;
+}
+
+.contact-method-radio-btn:checked::before {
+ transform: translate(3px, 3px) scale(1);
+ background-color: lightgreen;
+}
+
+.submit-btn {
+ cursor: pointer;
+ background-color: royalblue;
+ color: whitesmoke;
+ border: none;
+ border-radius: 6px;
+ padding: 12px 20px;
+ font-size: 1.1rem;
+ display: block;
+ margin: auto;
+}
+
+.submit-btn:hover {
+ background-color: midnightblue;
+}
diff --git a/fullstack-cert/css-projects/poker-hand/index.html b/fullstack-cert/css-projects/poker-hand/index.html
new file mode 100644
index 000000000..0b6231877
--- /dev/null
+++ b/fullstack-cert/css-projects/poker-hand/index.html
@@ -0,0 +1,105 @@
+
+
+
+
+
+
+ Straight
+
+
+
+
+
+
+
+
A
+
♠
+
+
+
♠
+
+
+
♠
+
A
+
+
+
+
+
+
2
+
♣
+
+
+
♣
+
♣
+
+
+
♣
+
2
+
+
+
+
+
+
3
+
♥
+
+
+
♥
+
♥
+
♥
+
+
+
♥
+
3
+
+
+
+
+
+
4
+
♣
+
+
+
+
♣
+
♣
+
+
+
♣
+
♣
+
+
+
+
♣
+
4
+
+
+
+
+
+
5
+
♦
+
+
+
+
♦
+
♦
+
+
+
♦
+
+
+
♦
+
♦
+
+
+
+
♦
+
5
+
+
+
+
+
+
\ No newline at end of file
diff --git a/fullstack-cert/css-projects/poker-hand/styles.css b/fullstack-cert/css-projects/poker-hand/styles.css
new file mode 100644
index 000000000..644a5828c
--- /dev/null
+++ b/fullstack-cert/css-projects/poker-hand/styles.css
@@ -0,0 +1,57 @@
+body {
+ background-color: Thistle;
+ min-height: 100vh;
+}
+
+.red {
+ color: red;
+}
+
+.flipped {
+ transform: rotate(180deg);
+}
+
+#poker-hand {
+ margin-top: 100px;
+ display: flex;
+ justify-content: center;
+ gap: 20px;
+ flex-wrap: wrap;
+}
+
+.card {
+ background-color: white;
+ border: 1px solid black;
+ border-radius: 10px;
+ box-shadow: 2px 2px 2px gray;
+ min-width: 250px;
+ max-width: 250px;
+ height: 350px;
+ font-size: 30px;
+ font-weight: bold;
+ padding: 5px;
+ box-sizing: border-box;
+ display: flex;
+ justify-content: space-between;
+ text-align: center;
+}
+
+.top {
+ align-self: flex-start;
+}
+
+.middle {
+ align-self: center;
+ display: flex;
+ font-size: 80px;
+ flex-direction: column;
+}
+
+.right {
+ align-self: flex-end;
+}
+
+.middle-section {
+ display: flex;
+ justify-content: center;
+}
diff --git a/fullstack-cert/css-projects/poker-hand/user-stories.md b/fullstack-cert/css-projects/poker-hand/user-stories.md
new file mode 100644
index 000000000..bf5480ae6
--- /dev/null
+++ b/fullstack-cert/css-projects/poker-hand/user-stories.md
@@ -0,0 +1,11 @@
+1. You should have a `main` element with an ID of `poker-hand`.
+1. Within your `#poker-hand` element, you should have at least three `div` elements, each with a class of `card`.
+1. Within each `.card` element, you should have three `div` elements, the first with a class of `left`, the second with a class of `middle`, and the third with a class of `right`.
+1. Your `#poker-hand` element should use flexbox to horizontally center its children, allow them to wrap, and put a `20px` space between them.
+1. Each of your `.card` elements should use flexbox to justify its children using `space-between`.
+1. Each of your `.top` elements should use flexbox item properties to align itself at the start of its parent container.
+1. Each of your `.middle` elements should use flexbox item properties to align itself at the center of its parent container.
+1. Each of your `.right` elements should use flexbox item properties to align itself at the end of its parent container.
+1. Each of your `.middle` elements should use flexbox to display its children in a column.
+
+Here are some characters you can copy and paste to use in your cards if you want: `♠ ♣ ♥ ♦`
diff --git a/fullstack-cert/css-projects/pricing-plans-layout/index.html b/fullstack-cert/css-projects/pricing-plans-layout/index.html
new file mode 100644
index 000000000..d386db0a3
--- /dev/null
+++ b/fullstack-cert/css-projects/pricing-plans-layout/index.html
@@ -0,0 +1,52 @@
+
+
+
+
+
+ Pricing Plans Layout
+
+
+
+
+
+
diff --git a/fullstack-cert/css-projects/pricing-plans-layout/styles.css b/fullstack-cert/css-projects/pricing-plans-layout/styles.css
new file mode 100644
index 000000000..9f62771d4
--- /dev/null
+++ b/fullstack-cert/css-projects/pricing-plans-layout/styles.css
@@ -0,0 +1,128 @@
+body {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ flex-direction: column;
+ min-height: 100vh;
+}
+
+h1 {
+ margin-bottom: 20px;
+}
+
+h2,
+p {
+ margin: 0;
+}
+
+.pricing-container {
+ display: flex;
+ flex-wrap: wrap;
+ align-content: center;
+ border: 2px solid #000;
+ gap: 20px;
+ width: 80%;
+ max-width: 900px;
+ height: 70vh;
+ padding: 0 20px;
+}
+
+.pricing-card {
+ background: rgb(247, 247, 247);
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
+ padding: 20px;
+ flex: 0 0 200px;
+ text-align: center;
+ transition: transform 0.3s ease;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+}
+
+.pricing-card:hover {
+ transform: scale(1.05);
+}
+
+.price {
+ font-size: 1.5rem;
+ font-weight: bold;
+ color: #3e3e3e;
+ margin: 10px;
+ border-bottom: 1px solid #433d28;
+}
+
+.features {
+ list-style-type: none;
+ padding: 0;
+ text-align: left;
+}
+
+.features li {
+ padding: 5px 0;
+ font-size: 0.95rem;
+}
+
+.check {
+ color: #219c54;
+ font-weight: bold;
+ margin-right: 8px;
+}
+
+.cross {
+ color: crimson;
+ font-weight: bold;
+ margin-right: 8px;
+}
+
+a {
+ text-decoration: none;
+ display: inline-block;
+ margin-top: 15px;
+ background: #f1be32;
+ color: #000;
+ font-weight: bold;
+ border: 3px solid #eebe3a;
+ padding: 5px;
+ transition: background 0.3s;
+}
+
+a:hover {
+ background: #f7c436;
+}
+
+.basic-plan {
+ order: 0;
+}
+.pro-plan {
+ order: 1;
+ flex-grow: 2;
+ background: #f0f8ff;
+}
+.premium-plan {
+ order: 2;
+}
+
+@media screen and (max-width: 1000px) {
+ .pricing-container {
+ height: auto;
+ padding-bottom: 20px;
+ }
+
+ h1 {
+ display: block;
+ font-size: 1.5rem;
+ text-align: center;
+ }
+}
+
+@media screen and (max-width: 650px) {
+ .pricing-container {
+ flex-direction: column;
+ height: auto;
+ }
+
+ .pricing-card {
+ flex: 1 1 auto;
+ width: 100%;
+ }
+}
diff --git a/fullstack-cert/css-projects/pricing-plans-layout/user-stories.md b/fullstack-cert/css-projects/pricing-plans-layout/user-stories.md
new file mode 100644
index 000000000..e8c5e3a02
--- /dev/null
+++ b/fullstack-cert/css-projects/pricing-plans-layout/user-stories.md
@@ -0,0 +1,13 @@
+# User Stories
+
+1. Your page should have an `h1` element with the text `Pricing Plans`.
+1. Your page should have three `div` elements with the class `pricing-card` to represent the pricing plans.
+
+ - One of your `div` elements should have the class `pro-plan` in addition to the `pricing-card` class.
+ - One of your `div` elements should have the class `basic-plan` in addition to the `pricing-card` class.
+ - One of your `div` elements should have the class `premium-plan` in addition to the `pricing-card` class.
+
+1. Each of your `.pricing-card` elements should use Flexbox to stack its content in a column and justify the space between the children using `space-between`. Each element should also set the `flex` property to `0 0 200px` to give it a consistent width and prevent it from growing or shrinking in the layout.
+1. The `basic-plan` element should appear first in the layout. You should use the `order` property for this.
+1. The `pro-plan` element should appear second in the layout. You should use the `order` property and set its `flex-grow` property to `2` so it takes up more space than the other plans.
+1. The `premium-plan` element should come last in the layout. You should use the `order` property for this.
diff --git a/fullstack-cert/css-projects/pseudo-classes-lab/index.html b/fullstack-cert/css-projects/pseudo-classes-lab/index.html
new file mode 100644
index 000000000..f1cc51760
--- /dev/null
+++ b/fullstack-cert/css-projects/pseudo-classes-lab/index.html
@@ -0,0 +1,44 @@
+
+
+
+
+
+ Job Application
+
+
+
+
+
Job Application Form
+
+
+
+
\ No newline at end of file
diff --git a/fullstack-cert/css-projects/pseudo-classes-lab/styles.css b/fullstack-cert/css-projects/pseudo-classes-lab/styles.css
new file mode 100644
index 000000000..976927c73
--- /dev/null
+++ b/fullstack-cert/css-projects/pseudo-classes-lab/styles.css
@@ -0,0 +1,109 @@
+body {
+ font-family: Arial, sans-serif;
+ background-color: white;
+ padding: 20px;
+}
+
+.container {
+ max-width: 600px;
+ margin: 0 auto;
+ background-color: white;
+ padding: 20px;
+ border-radius: 8px;
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
+}
+
+h1 {
+ text-align: center;
+}
+
+label {
+ display: block;
+ margin-bottom: 5px;
+ font-weight: bold;
+}
+
+input, select, textarea {
+ width: 100%;
+ padding: 10px;
+ margin-bottom: 15px;
+ border: 1px solid #ccc;
+ border-radius: 4px;
+ box-sizing: border-box;
+}
+
+.radio-group {
+ display: flex;
+ align-items: center;
+ margin-top: 15px;
+}
+.radio-group input[type="radio"] {
+ margin-right: 10px;
+ -webkit-appearance: none;
+ -moz-appearance: none;
+ appearance: none;
+ width: 20px;
+ height: 20px;
+ border: 2px solid #ccc;
+ border-radius: 50%;
+ outline: none;
+ transition: border-color 0.2s;
+}
+
+.radio-group label {
+ margin: 0;
+ font-weight: normal;
+ cursor: pointer;
+}
+
+button {
+ width: 100%;
+ padding: 10px;
+ background-color: green;
+ border: none;
+ color: white;
+ border-radius: 4px;
+ font-size: 16px;
+ cursor: pointer;
+}
+
+input:focus, textarea:focus {
+ border-color: blue;
+ outline: none;
+}
+
+input:invalid, select:invalid, textarea:invalid {
+ border-color: red;
+}
+
+input:valid, select:valid, textarea:valid {
+ border-color: green;
+}
+
+.radio-group input[type="radio"]:checked {
+ border-color: green;
+ background-color: green;
+ box-shadow: inset 0 0 0 4px white;
+}
+
+button:hover {
+ background-color: black;
+}
+
+input[type="radio"]:checked + label {
+ color: green;
+}
+
+button:disabled {
+ background-color: grey;
+}
+
+input:nth-child(1) {
+ border-top-left-radius: 4px;
+ border-top-right-radius: 4px;
+}
+
+textarea:nth-child(5) {
+ border-bottom-left-radius: 4px;
+ border-bottom-right-radius: 4px;
+}
diff --git a/fullstack-cert/css-projects/pseudo-classes-lab/user-stories.md b/fullstack-cert/css-projects/pseudo-classes-lab/user-stories.md
new file mode 100644
index 000000000..1d1565fa8
--- /dev/null
+++ b/fullstack-cert/css-projects/pseudo-classes-lab/user-stories.md
@@ -0,0 +1,17 @@
+1. You should have a `div` element with the class `container`.
+1. Inside the `div` element, you should have a `form` element.
+1. The form should contain an `input` element with the type `text` and the id `name` for entering the user's full name.
+1. You should have another `input` element with the type `email` and the id `email` for entering the user's email address.
+1. The form should include a `select` element with the id `position` that allows users to select a job position.
+1. You should have a set of `input` elements with the type `radio` for selecting availability options (e.g., Full-Time, Part-Time).
+1. You should have a `textarea` element with the id `message` for entering a message.
+1. You should have a `button` element with the type `submit` for submitting the form.
+1. Add a `:focus` pseudo-class to the `input` and `textarea` elements to change their border color when focused.
+1. The `input`, `select` and `textarea` elements should have an `:invalid` pseudo-class that changes the border color to red when invalid input is detected.
+1. The `input`, `select` and `textarea` elements should have a `:valid` pseudo-class that changes the border color to green when valid input is entered.
+1. The `button` element should have a `:hover` pseudo-class that changes the background color when hovered over.
+1. Use the `:checked` pseudo-class on `.radio-group input[type="radio"]` to add a border color, background color and a box shadow when the radio button is selected.
+1. Use the `:checked` pseudo-class on radio buttons to change the text color of the associated `label` when the option is selected.
+1. The `button` element should have a `:disabled` pseudo-class that changes the background color when the form is incomplete or invalid.
+1. Add an `:nth-child` pseudo-class to the `input` elements to style the first input fields differently. (e.g., rounded corners).
+1. Add an `:nth-child` pseudo-class to the `textarea` element to style the fifth textarea field differently. (e.g., border-bottom-left-radius).
diff --git a/fullstack-cert/css-projects/pseudo-classes-workshop/index.html b/fullstack-cert/css-projects/pseudo-classes-workshop/index.html
new file mode 100644
index 000000000..2168373b3
--- /dev/null
+++ b/fullstack-cert/css-projects/pseudo-classes-workshop/index.html
@@ -0,0 +1,34 @@
+
+
+
+
+
+ Greeting Card
+
+
+
+
+
+
Happy Birthday!
+
+ Wishing you all the happiness and joy on your special day!
+
+
+
diff --git a/fullstack-cert/css-projects/styling-forms/styles.css b/fullstack-cert/css-projects/styling-forms/styles.css
new file mode 100644
index 000000000..c475ccd01
--- /dev/null
+++ b/fullstack-cert/css-projects/styling-forms/styles.css
@@ -0,0 +1,54 @@
+body {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ height: 100vh;
+ margin: 0;
+ background: linear-gradient(45deg, #83a4d4, #b6fbff);
+ font-family: Arial, sans-serif;
+}
+
+.form-container {
+ background-color: white;
+ border-radius: 10px;
+ padding: 20px;
+ width: 300px;
+ text-align: center;
+}
+
+form h2 {
+ margin-bottom: 20px;
+ color: #333;
+}
+
+label {
+ display: block;
+ margin: 10px 0 5px;
+ color: #555;
+}
+
+input[type="text"],
+input[type="email"],
+textarea {
+ width: 100%;
+ padding: 10px;
+ margin-bottom: 10px;
+ border: 1px solid #ddd;
+ border-radius: 5px;
+ box-sizing: border-box;
+ resize: vertical;
+}
+
+button {
+ background-color: #4CAF50;
+ color: white;
+ padding: 10px 15px;
+ border: none;
+ border-radius: 5px;
+ cursor: pointer;
+ font-size: 1em;
+}
+
+button:hover {
+ background-color: #45a049;
+}
diff --git a/fullstack-cert/css-projects/styling-forms/user-stories.md b/fullstack-cert/css-projects/styling-forms/user-stories.md
new file mode 100644
index 000000000..5cfba7224
--- /dev/null
+++ b/fullstack-cert/css-projects/styling-forms/user-stories.md
@@ -0,0 +1,31 @@
+1. You should have a `div` with a class of `form-container` to hold your form.
+
+2. You should have a `form` element within the `.form-container` `div`.
+
+3. Within the `form` element, you should have the following elements and input fields:
+ - A `h2` element with the text `Contact Us`.
+ - A text input field for the name with `id="name"`, `name="name"`, and the `required` attribute.
+ - An email input field with `id="email"`, `name="email"`, and the `required` attribute.
+ - A textarea for the message with `id="message"`, `name="message"`, and the `required` attribute.
+ - A `button` element with a `type` attribute of `submit`.
+
+4. Each `input` and `textarea` element should have their corresponding `label` element with a `for` attribute set to the element `id`.
+
+5. The `form-container` `div` should have a background color, and have values for `border-radius`, `padding`, and `width`.
+
+6. The `label` elements should be displayed as block elements, and have values for `margin` and `color`.
+
+7. The `input` and `textarea` elements should have values for:
+ - `width`.
+ - `padding`.
+ - Margin on the bottom.
+ - `border` and `border-radius`.
+
+8. The `button` element should have values for:
+ - Background color.
+ - Text color.
+ - `padding`.
+ - `border` and `borders-radius`.
+ - `font-size`.
+
+9. The button should have a hover effect that changes the background color.
\ No newline at end of file
diff --git a/fullstack-cert/css-projects/technical-document/index.html b/fullstack-cert/css-projects/technical-document/index.html
new file mode 100644
index 000000000..0be77b491
--- /dev/null
+++ b/fullstack-cert/css-projects/technical-document/index.html
@@ -0,0 +1,459 @@
+
+
+
+
+
+
+
+
+
+ Introduction
+
+
+ JavaScript is a cross-platform, object-oriented scripting language.
+ It is a small and lightweight language. Inside a host environment
+ (for example, a web browser), JavaScript can be connected to the
+ objects of its environment to provide programmatic control over
+ them.
+
+
+
+ JavaScript contains a standard library of objects, such as Array,
+ Date, and Math, and a core set of language elements such as
+ operators, control structures, and statements. Core JavaScript can
+ be extended for a variety of purposes by supplementing it with
+ additional objects; for example:
+
+
+
+ Client-side JavaScript extends the core language by supplying
+ objects to control a browser and its Document Object Model (DOM).
+ For example, client-side extensions allow an application to place
+ elements on an HTML form and respond to user events such as mouse
+ clicks, form input, and page navigation.
+
+
+ Server-side JavaScript extends the core language by supplying
+ objects relevant to running JavaScript on a server. For example,
+ server-side extensions allow an application to communicate with a
+ database, provide continuity of information from one invocation to
+ another of the application, or perform file manipulations on a
+ server.
+
+
+
+
+
+ What you should already know
+
+
This guide assumes you have the following basic background:
+
+
+
+ A general understanding of the Internet and the World Wide Web
+ (WWW).
+
+
Good working knowledge of HyperText Markup Language (HTML).
+
+ Some programming experience. If you are new to programming, try
+ one of the tutorials linked on the main page about JavaScript.
+
+
+
+
+
+ JavaScript and Java
+
+
+ JavaScript and Java are similar in some ways but fundamentally
+ different in some others. The JavaScript language resembles Java but
+ does not have Java's static typing and strong type checking.
+ JavaScript follows most Java expression syntax, naming conventions
+ and basic control-flow constructs which was the reason why it was
+ renamed from LiveScript to JavaScript.
+
+
+
+ In contrast to Java's compile-time system of classes built by
+ declarations, JavaScript supports a runtime system based on a small
+ number of data types representing numeric, Boolean, and string
+ values. JavaScript has a prototype-based object model instead of the
+ more common class-based object model. The prototype-based model
+ provides dynamic inheritance; that is, what is inherited can vary
+ for individual objects. JavaScript also supports functions without
+ any special declarative requirements. Functions can be properties of
+ objects, executing as loosely typed methods.
+
+
+ JavaScript is a very free-form language compared to Java. You do not
+ have to declare all variables, classes, and methods. You do not have
+ to be concerned with whether methods are public, private, or
+ protected, and you do not have to implement interfaces. Variables,
+ parameters, and function return types are not explicitly typed.
+
+
+
+
+ Hello world
+
+ To get started with writing JavaScript, open the Scratchpad and write
+ your first "Hello world" JavaScript code:
+ function greetMe(yourName) { alert("Hello " + yourName); }
+ greetMe("World");
+
+
+ Select the code in the pad and hit Ctrl+R to watch it unfold in your
+ browser!
+
+
+
+ Variables
+
+ You use variables as symbolic names for values in your application.
+ The names of variables, called identifiers, conform to certain rules.
+
+
+ A JavaScript identifier must start with a letter, underscore (_), or
+ dollar sign ($); subsequent characters can also be digits (0-9).
+ Because JavaScript is case sensitive, letters include the characters
+ "A" through "Z" (uppercase) and the characters "a" through "z"
+ (lowercase).
+
+
+ You can use ISO 8859-1 or Unicode letters such as å and ü in
+ identifiers. You can also use the Unicode escape sequences as
+ characters in identifiers. Some examples of legal names are
+ Number_hits, temp99, and _name.
+
+
+
+ Declaring variables
+
+ You can declare a variable in three ways:
+
+ With the keyword var. For example, var x = 42. This
+ syntax can be used to declare both local and global variables.
+
+
+ By simply assigning it a value. For example,
+ x = 42. This always declares a global variable. It
+ generates a strict JavaScript warning. You shouldn't use this
+ variant.
+
+
+ With the keyword let. For example, let y = 13. This
+ syntax can be used to declare a block scope local variable. See
+ Variable scope below.
+
+
+
+
+ Variable scope
+
+
+ When you declare a variable outside of any function, it is called a
+ global variable, because it is available to any other code in the
+ current document. When you declare a variable within a function, it
+ is called a local variable, because it is available only within that
+ function.
+
+
+
+ JavaScript before ECMAScript 2015 does not have block statement
+ scope; rather, a variable declared within a block is local to the
+ function (or global scope) that the block resides within. For
+ example the following code will log 5, because the scope of x is the
+ function (or global context) within which x is declared, not the
+ block, which in this case is an if statement.
+
+ if (true) { var x = 5; } console.log(x); // 5
+
+ This behavior changes, when using the let declaration introduced in
+ ECMAScript 2015.
+
+
+ if (true) { let y = 5; } console.log(y); // ReferenceError: y is
+ not defined
+
+
+
+ Global variables
+
+
+ Global variables are in fact properties of the global object. In web
+ pages the global object is window, so you can set and access global
+ variables using the window.variable syntax.
+
+
+
+ Consequently, you can access global variables declared in one window
+ or frame from another window or frame by specifying the window or
+ frame name. For example, if a variable called phoneNumber is
+ declared in a document, you can refer to this variable from an
+ iframe as parent.phoneNumber.
+
+
+
+
+ Constants
+
+
+ You can create a read-only, named constant with the const keyword.
+ The syntax of a constant identifier is the same as for a variable
+ identifier: it must start with a letter, underscore or dollar sign
+ and can contain alphabetic, numeric, or underscore characters.
+
+
+ const PI = 3.14;
+
+ A constant cannot change value through assignment or be re-declared
+ while the script is running. It has to be initialized to a value.
+
+
+
+ The scope rules for constants are the same as those for let block
+ scope variables. If the const keyword is omitted, the identifier is
+ assumed to represent a variable.
+
+
+
+ You cannot declare a constant with the same name as a function or
+ variable in the same scope. For example:
+
+
+ // THIS WILL CAUSE AN ERROR function f() {}; const f = 5; // THIS
+ WILL CAUSE AN ERROR ALSO function f() { const g = 5; var g;
+ //statements }
+ However, object attributes are not protected, so the following
+ statement is executed without problems.
+ const MY_OBJECT = {"key": "value"}; MY_OBJECT.key =
+ "otherValue";
+
+
+
+ Data types
+
+
The latest ECMAScript standard defines seven data types:
+
+
+
Six data types that are primitives:
+
+
Boolean. true and false.
+
+ null. A special keyword denoting a null value. Because
+ JavaScript is case-sensitive, null is not the same as Null,
+ NULL, or any other variant.
+
+
+ undefined. A top-level property whose value is undefined.
+
+
Number. 42 or 3.14159.
+
String. "Howdy"
+
+ Symbol (new in ECMAScript 2015). A data type whose instances
+ are unique and immutable.
+
+
+
+
+
and Object
+
+ Although these data types are a relatively small amount, they enable
+ you to perform useful functions with your applications. Objects and
+ functions are the other fundamental elements in the language. You can
+ think of objects as named containers for values, and functions as
+ procedures that your application can perform.
+
+
+
+ if...else statement
+
+ Use the if statement to execute a statement if a logical condition is
+ true. Use the optional else clause to execute a statement if the
+ condition is false. An if statement looks as follows:
+
+ if (condition) { statement_1; } else { statement_2; }
+ condition can be any expression that evaluates to true or false. See
+ Boolean for an explanation of what evaluates to true and false. If
+ condition evaluates to true, statement_1 is executed; otherwise,
+ statement_2 is executed. statement_1 and statement_2 can be any
+ statement, including further nested if statements.
+
+ You may also compound the statements using else if to have multiple
+ conditions tested in sequence, as follows:
+
+ if (condition_1) { statement_1; } else if (condition_2) {
+ statement_2; } else if (condition_n) { statement_n; } else {
+ statement_last; }
+
+ In the case of multiple conditions only the first logical condition
+ which evaluates to true will be executed. To execute multiple
+ statements, group them within a block statement ({ ... }) . In
+ general, it's good practice to always use block statements, especially
+ when nesting if statements:
+
+ if (condition) { statement_1_runs_if_condition_is_true;
+ statement_2_runs_if_condition_is_true; } else {
+ statement_3_runs_if_condition_is_false;
+ statement_4_runs_if_condition_is_false; }
+ It is advisable to not use simple assignments in a conditional
+ expression, because the assignment can be confused with equality when
+ glancing over the code. For example, do not use the following code:
+ if (x = y) { /* statements here */ } If you need to use
+ an assignment in a conditional expression, a common practice is to put
+ additional parentheses around the assignment. For example:
+
+ if ((x = y)) { /* statements here */ }
+
+
+
+ while statement
+
+ A while statement executes its statements as long as a specified
+ condition evaluates to true. A while statement looks as follows:
+
+ while (condition) statement If the condition becomes
+ false, statement within the loop stops executing and control passes to
+ the statement following the loop.
+
+
+ The condition test occurs before statement in the loop is executed.
+ If the condition returns true, statement is executed and the
+ condition is tested again. If the condition returns false, execution
+ stops and control is passed to the statement following while.
+
+
+
+ To execute multiple statements, use a block statement ({ ... }) to
+ group those statements.
+
+
+ Example:
+
+
+ The following while loop iterates as long as n is less than three:
+
+
+ var n = 0; var x = 0; while (n < 3) { n++; x += n; }
+
+ With each iteration, the loop increments n and adds that value to x.
+ Therefore, x and n take on the following values:
+
+
+
+
After the first pass: n = 1 and x = 1
+
After the second pass: n = 2 and x = 3
+
After the third pass: n = 3 and x = 6
+
+
+ After completing the third pass, the condition n < 3 is no longer
+ true, so the loop terminates.
+
+
+
+
+ Function declarations
+
+ A function definition (also called a function declaration, or function
+ statement) consists of the function keyword, followed by:
+
+
+
The name of the function.
+
+ A list of arguments to the function, enclosed in parentheses and
+ separated by commas.
+
+
+ The JavaScript statements that define the function, enclosed in
+ curly brackets, { }.
+
+
+
+ For example, the following code defines a simple function named
+ square:
+
+
+ function square(number) { return number * number; }
+
+ The function square takes one argument, called number. The function
+ consists of one statement that says to return the argument of the
+ function (that is, number) multiplied by itself. The return
+ statement specifies the value returned by the function.
+
+ return number * number;
+
+ Primitive parameters (such as a number) are passed to functions by
+ value; the value is passed to the function, but if the function
+ changes the value of the parameter, this change is not reflected
+ globally or in the calling function.
+
+
+
+
+ Reference
+
+
+
+ All the documentation in this page is taken from
+ MDN
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/fullstack-cert/css-projects/technical-document/styles.css b/fullstack-cert/css-projects/technical-document/styles.css
new file mode 100644
index 000000000..a779dbbd3
--- /dev/null
+++ b/fullstack-cert/css-projects/technical-document/styles.css
@@ -0,0 +1,128 @@
+html,
+body {
+ min-width: 290px;
+ color: #4d4e53;
+ background-color: #ffffff;
+ font-family: 'Open Sans', Arial, sans-serif;
+ line-height: 1.5;
+}
+
+#navbar {
+ position: fixed;
+ min-width: 290px;
+ top: 0px;
+ left: 0px;
+ width: 300px;
+ height: 100%;
+ border-right: solid;
+ border-color: rgba(0, 22, 22, 0.4);
+}
+
+header {
+ color: black;
+ margin: 10px;
+ text-align: center;
+ font-size: 1.8em;
+ font-weight: thin;
+}
+
+#main-doc header {
+ text-align: left;
+ margin: 0px;
+}
+
+#navbar ul {
+ height: 88%;
+ padding: 0;
+ overflow-y: auto;
+ overflow-x: hidden;
+}
+
+#navbar li {
+ color: #4d4e53;
+ border-top: 1px solid;
+ list-style: none;
+ position: relative;
+ width: 100%;
+}
+
+#navbar a {
+ display: block;
+ padding: 10px 30px;
+ color: #4d4e53;
+ text-decoration: none;
+ cursor: pointer;
+}
+
+#main-doc {
+ position: absolute;
+ margin-left: 310px;
+ padding: 20px;
+ margin-bottom: 110px;
+}
+
+section article {
+ color: #4d4e53;
+ margin: 15px;
+ font-size: 0.96em;
+}
+
+section li {
+ margin: 15px 0px 0px 20px;
+}
+
+code {
+ display: block;
+ text-align: left;
+ white-space: pre-line;
+ position: relative;
+ word-break: normal;
+ word-wrap: normal;
+ line-height: 2;
+ background-color: #f7f7f7;
+ padding: 15px;
+ margin: 10px;
+ border-radius: 5px;
+}
+
+@media only screen and (max-width: 815px) {
+ /* For mobile phones: */
+ #navbar ul {
+ border: 1px solid;
+ height: 207px;
+ }
+
+ #navbar {
+ background-color: white;
+ position: absolute;
+ top: 0;
+ padding: 0;
+ margin: 0;
+ width: 100%;
+ max-height: 275px;
+ border: none;
+ z-index: 1;
+ border-bottom: 2px solid;
+ }
+
+ #main-doc {
+ position: relative;
+ margin-left: 0px;
+ margin-top: 270px;
+ }
+}
+
+@media only screen and (max-width: 400px) {
+ #main-doc {
+ margin-left: -10px;
+ }
+
+ code {
+ margin-left: -20px;
+ width: 100%;
+ padding: 15px;
+ padding-left: 10px;
+ padding-right: 45px;
+ min-width: 233px;
+ }
+}
\ No newline at end of file
diff --git a/fullstack-cert/css-projects/technical-document/user-stories.md b/fullstack-cert/css-projects/technical-document/user-stories.md
new file mode 100644
index 000000000..f77883539
--- /dev/null
+++ b/fullstack-cert/css-projects/technical-document/user-stories.md
@@ -0,0 +1,33 @@
+1. You can see a `main` element with a corresponding `id="main-doc"`, which contains the page's main content (technical documentation).
+
+2. Within the `#main-doc` element, you can see several `section` elements, each with a class of `main-section`. There should be a minimum of five.
+
+3. The first element within each `.main-section` should be a `header` element, which contains text that describes the topic of that section.
+
+4. Each `section` element with the class of `main-section` should also have an `id` that corresponds with the text of each `header` contained within it. Any spaces should be replaced with underscores (e.g. The section that contains the header "JavaScript and Java" should have a corresponding `id="JavaScript_and_Java"`).
+
+5. The `.main-section` elements should contain at least ten `p` elements total (not each)
+
+6. The `.main-section` elements should contain at least five `code` elements total (not each).
+
+7. The `.main-section` elements should contain at least five `li` items total (not each).
+
+8. You can see a `nav` element with a corresponding `id="navbar"`.
+
+9. The navbar element should contain one `header` element which contains text that describes the topic of the technical documentation.
+
+10. Additionally, the navbar should contain link (`a`) elements with the class of `nav-link`. There should be one for every element with the class `main-section`.
+
+11. The `header` element in the `#navbar` must come before any link (`a`) elements in the navbar.
+
+12. Each element with the class of `nav-link` should contain text that corresponds to the `header` text within each `section` (e.g. if you have a "Hello world" section/header, your navbar should have an element which contains the text "Hello world").
+
+13. When you click on a navbar element, the page should navigate to the corresponding section of the `#main-doc` element (e.g. If you click on a `.nav-link` element that contains the text "Hello world", the page navigates to a `section` element with that id, and contains the corresponding header).
+
+14. On regular sized devices (laptops, desktops), the element with `id="navbar"` should be shown on the left side of the screen and should always be visible to the user.
+
+15. Your technical documentation should use at least one media query.
+
+Fulfill the user stories and pass all the tests below to complete this project. Give it your own personal style. Happy Coding!
+
+**Note**: Be sure to add `` in your HTML to link your stylesheet and apply your CSS
\ No newline at end of file
diff --git a/fullstack-cert/css-projects/todo-list-stylized/index.html b/fullstack-cert/css-projects/todo-list-stylized/index.html
new file mode 100644
index 000000000..4f92ec525
--- /dev/null
+++ b/fullstack-cert/css-projects/todo-list-stylized/index.html
@@ -0,0 +1,61 @@
+
+
+
+
+
+
+ Styled To-Do List
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/fullstack-cert/css-projects/todo-list-stylized/styles.css b/fullstack-cert/css-projects/todo-list-stylized/styles.css
new file mode 100644
index 000000000..697433732
--- /dev/null
+++ b/fullstack-cert/css-projects/todo-list-stylized/styles.css
@@ -0,0 +1,64 @@
+body {
+ font-family: Arial, sans-serif;
+ background-color: #f0f0f0;
+ margin: 0;
+ padding: 20px;
+}
+
+.container {
+ max-width: 400px;
+ margin: 0 auto;
+ background-color: #fff;
+ padding: 20px;
+ border-radius: 10px;
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
+}
+
+h1 {
+ text-align: center;
+ color: #333;
+}
+
+.todo-list {
+ list-style-type: none;
+ padding: 0;
+}
+
+.todo-list li {
+ margin-bottom: 15px;
+ line-height: 1.6;
+ padding: 10px;
+ background-color: #e5f1e5;
+ border-radius: 10px;
+ position: relative;
+}
+
+.todo-list li a {
+ margin-left: 10px;
+ text-decoration: none;
+}
+
+.todo-list li a.sub-item-link:link {
+ color: blue;
+}
+
+.todo-list li a.sub-item-link:visited {
+ color: purple;
+}
+
+.todo-list li a.sub-item-link:hover {
+ color: red;
+}
+
+.todo-list li a.sub-item-link:focus {
+ outline: 2px solid blue;
+ outline-offset: 2px;
+}
+
+.todo-list li a.sub-item-link:active {
+ color: green;
+}
+
+.sub-item {
+ list-style-type: square;
+}
\ No newline at end of file
diff --git a/fullstack-cert/css-projects/todo-list-stylized/user-stories.md b/fullstack-cert/css-projects/todo-list-stylized/user-stories.md
new file mode 100644
index 000000000..8883a9425
--- /dev/null
+++ b/fullstack-cert/css-projects/todo-list-stylized/user-stories.md
@@ -0,0 +1,21 @@
+1. You should have an `h1` element with the title `My To-Do List`.
+
+2. You should have an unordered list with the class `todo-list`.
+
+3. Inside the unordered list, you should have 4 list items. Each list item should have a checkbox, a task label and two links that point to a valid URL.
+
+4. The first link in each list item should have the text `Edit` and the second link should have the text `Delete`. The links should also have the class `edit` and `delete` respectively.
+
+5. The list items should have a bottom margin of `15px` and a line height of `1.6`.
+
+6. Each list item should have squared bullets.
+
+7. The links should be `blue` initially and have a default of no underline.
+
+8. When you hover over the links, the font color should change to `red`.
+
+9. Visited links should be `purple`.
+
+10. When a link is focused, there should be a `blue` border around it.
+
+11. When a link is being clicked, its color should change to `green`.
diff --git a/fullstack-cert/css-projects/tribute-page-lab/index.html b/fullstack-cert/css-projects/tribute-page-lab/index.html
new file mode 100644
index 000000000..4a82c0cf9
--- /dev/null
+++ b/fullstack-cert/css-projects/tribute-page-lab/index.html
@@ -0,0 +1,119 @@
+
+
+
+
+
+
+
+
Dr. Norman Borlaug
+
The man who saved a billion lives
+
+
+
+ Dr. Norman Borlaug, third from the left, trains biologists in Mexico
+ on how to increase wheat yields - part of his life-long war on hunger.
+
+
+
+
Here's a time line of Dr. Borlaug's life:
+
+
1914 - Born in Cresco, Iowa
+
+ 1933 - Leaves his family's farm to attend the
+ University of Minnesota, thanks to a Depression era program known as
+ the "National Youth Administration"
+
+
+ 1935 - Has to stop school and save up more money.
+ Works in the Civilian Conservation Corps, helping starving
+ Americans. "I saw how food changed them", he said. "All of this left
+ scars on me."
+
+
+ 1937 - Finishes university and takes a job in the
+ US Forestry Service
+
+
+ 1938 - Marries wife of 69 years Margret Gibson.
+ Gets laid off due to budget cuts. Inspired by Elvin Charles Stakman,
+ he returns to school study under Stakman, who teaches him about
+ breeding pest-resistent plants.
+
+
+ 1941 - Tries to enroll in the military after the
+ Pearl Harbor attack, but is rejected. Instead, the military asked
+ his lab to work on waterproof glue, DDT to control malaria,
+ disinfectants, and other applied science.
+
+
+ 1942 - Receives a Ph.D. in Genetics and Plant
+ Pathology
+
+
+ 1944 - Rejects a 100% salary increase from Dupont,
+ leaves behind his pregnant wife, and flies to Mexico to head a new
+ plant pathology program. Over the next 16 years, his team breeds
+ 6,000 different strains of disease resistent wheat - including
+ different varieties for each major climate on Earth.
+
+
+ 1945 - Discovers a way to grown wheat twice each
+ season, doubling wheat yields
+
+
+ 1953 - crosses a short, sturdy dwarf breed of wheat
+ with a high-yeidling American breed, creating a strain that responds
+ well to fertilizer. It goes on to provide 95% of Mexico's wheat.
+
+
+ 1962 - Visits Delhi and brings his high-yielding
+ strains of wheat to the Indian subcontinent in time to help mitigate
+ mass starvation due to a rapidly expanding population
+
+
1970 - receives the Nobel Peace Prize
+
+ 1983 - helps seven African countries dramatically
+ increase their maize and sorghum yields
+
+
+ 1984 - becomes a distinguished professor at Texas
+ A&M University
+
+
+ 2005 - states "we will have to double the world
+ food supply by 2050." Argues that genetically modified crops are the
+ only way we can meet the demand, as we run out of arable land. Says
+ that GM crops are not inherently dangerous because "we've been
+ genetically modifying plants and animals for a long time. Long
+ before we called it science, people were selecting the best breeds."
+
+
2009 - dies at the age of 95.
+
+
+
+ "Borlaug's life and achievement are testimony to the far-reaching
+ contribution that one man's towering intellect, persistence and
+ scientific vision can make to human peace and progress."
+
+ -- Indian Prime Minister Manmohan Singh
+
+
+ If you have time, you should read more about this incredible human
+ being on his
+ Wikipedia entry.
+
+
+
+
+
\ No newline at end of file
diff --git a/fullstack-cert/css-projects/tribute-page-lab/styles.css b/fullstack-cert/css-projects/tribute-page-lab/styles.css
new file mode 100644
index 000000000..fbe286a77
--- /dev/null
+++ b/fullstack-cert/css-projects/tribute-page-lab/styles.css
@@ -0,0 +1,100 @@
+html {
+ /* Setting a base font size of 10px give us easier rem calculations
+ Info: 1rem === 10px, 1.5rem === 15px, 2rem === 20px and so forth
+ */
+ font-size: 10px;
+ }
+
+ body {
+ /* Native font stack https://getbootstrap.com/docs/4.2/content/reboot/#native-font-stack */
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto',
+ 'Helvetica Neue', Arial, sans-serif;
+ font-size: 1.6rem;
+ line-height: 1.5;
+ text-align: center;
+ color: #333;
+ margin: 0;
+ }
+
+ h1 {
+ font-size: 4rem;
+ margin-bottom: 0;
+ }
+
+ @media (max-width: 460px) {
+ h1 {
+ font-size: 3.5rem;
+ line-height: 1.2;
+ }
+ }
+
+ h2 {
+ font-size: 3.25rem;
+ }
+
+ a {
+ color: #477ca7;
+ }
+
+ a:visited {
+ color: #74638f;
+ }
+
+ #main {
+ margin: 30px 8px;
+ padding: 15px;
+ border-radius: 5px;
+ background: #eee;
+ }
+
+ @media (max-width: 460px) {
+ #main {
+ margin: 0;
+ }
+ }
+
+ img {
+ max-width: 100%;
+ display: block;
+ height: auto;
+ margin: 0 auto;
+ }
+
+ #img-div {
+ background: white;
+ padding: 10px;
+ margin: 0;
+ }
+
+ #img-caption {
+ margin: 15px 0 5px 0;
+ }
+
+ @media (max-width: 460px) {
+ #img-caption {
+ font-size: 1.4rem;
+ }
+ }
+
+ #headline {
+ margin: 50px 0;
+ text-align: center;
+ }
+
+ ul {
+ max-width: 550px;
+ margin: 0 auto 50px auto;
+ text-align: left;
+ line-height: 1.6;
+ }
+
+ li {
+ margin: 16px 0;
+ }
+
+ blockquote {
+ font-style: italic;
+ max-width: 545px;
+ margin: 0 auto 50px auto;
+ text-align: left;
+ }
\ No newline at end of file
diff --git a/fullstack-cert/css-projects/tribute-page-lab/user-stories.md b/fullstack-cert/css-projects/tribute-page-lab/user-stories.md
new file mode 100644
index 000000000..c0d228654
--- /dev/null
+++ b/fullstack-cert/css-projects/tribute-page-lab/user-stories.md
@@ -0,0 +1,21 @@
+1. Your tribute page should have a `main` element with a corresponding `id` of `main`, which contains all other elements
+
+2. You should see an element with an `id` of `title`, which contains a string (i.e. text), that describes the subject of the tribute page (e.g. "Dr. Norman Borlaug")
+
+3. You should see either a `figure` or a `div` element with an `id` of `img-div`
+
+4. Within the `#img-div` element, you should see an `img` element with a corresponding `id="image"`
+
+5. Within the `#img-div` element, you should see an element with a corresponding `id="img-caption"` that contains textual content describing the image shown in `#img-div`
+
+6. You should see an element with a corresponding `id="tribute-info"`, which contains textual content describing the subject of the tribute page.
+
+7. You should see an a element with a corresponding `id="tribute-link"`, which links to an outside site, that contains additional information about the subject of the tribute page. HINT: You must give your element an attribute of `target` and set it to `_blank` in order for your link to open in a new tab
+
+8. Your `#image` should use `max-width` and `height` properties to resize responsively, relative to the width of its parent element, without exceeding its original size.
+
+9. Your `img` element should be centered within its parent element.
+
+Fulfill the user stories and pass all the tests below to complete this project. Give it your own personal style. Happy Coding!
+
+Note: Be sure to add `` in your HTML to link your stylesheet and apply your CSS.
\ No newline at end of file
diff --git a/fullstack-cert/d3-projects/sample.md b/fullstack-cert/d3-projects/sample.md
new file mode 100644
index 000000000..a143b3a17
--- /dev/null
+++ b/fullstack-cert/d3-projects/sample.md
@@ -0,0 +1 @@
+This is just a dummy file so the folder can be added. Feel free to delete when actual projects get added here.
\ No newline at end of file
diff --git a/fullstack-cert/html-projects/blog-page/index.html b/fullstack-cert/html-projects/blog-page/index.html
new file mode 100644
index 000000000..b855a5174
--- /dev/null
+++ b/fullstack-cert/html-projects/blog-page/index.html
@@ -0,0 +1,96 @@
+
+
+
+
+
+
+ Personal Blog Page
+
+
+
+
Welcome to my blog page!
+
+
+ Mr. Whiskers Sleeping
+
+
+
+
+
+
About
+
+ I'm Jane Doe, and I adore writing about my cat, Mr. Whiskers.
+ He's a bundle of joy, and playful.
+
+
Warning! He can be a bit nippy at times.
+
+
+
+
Posts
+
+
Mr. Whiskers' First Day Home
+
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam
+ quod, voluptates, quae, quos quibusdam dolorum quia nemo repudiandae
+ quidem voluptatum quas. Quisquam quod, voluptates, quae, quos
+ quibusdam dolorum quia nemo repudiandae quidem voluptatum quas.
+
+
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam
+ quod, voluptates, quae, quos quibusdam dolorum quia nemo repudiandae
+ quidem voluptatum quas. Quisquam quod, voluptates, quae, quos
+ quibusdam dolorum quia nemo repudiandae quidem voluptatum quas.
+
+
+
+
Mr. Whiskers' First Bath
+
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam
+ quod, voluptates, quae, quos quibusdam dolorum quia nemo repudiandae
+ quidem voluptatum quas. Quisquam quod, voluptates, quae, quos
+ quibusdam dolorum quia nemo repudiandae quidem voluptatum quas.
+
+
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam
+ quod, voluptates, quae, quos quibusdam dolorum quia nemo repudiandae
+ quidem voluptatum quas. Quisquam quod, voluptates, quae, quos
+ quibusdam dolorum quia nemo repudiandae quidem voluptatum quas.
+
+
+
+
Mr. Whiskers' Birthday Party
+
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam
+ quod, voluptates, quae, quos quibusdam dolorum quia nemo repudiandae
+ quidem voluptatum quas. Quisquam quod, voluptates, quae, quos
+ quibusdam dolorum quia nemo repudiandae quidem voluptatum quas.
+
+
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam
+ quod, voluptates, quae, quos quibusdam dolorum quia nemo repudiandae
+ quidem voluptatum quas. Quisquam quod, voluptates, quae, quos
+ quibusdam dolorum quia nemo repudiandae quidem voluptatum quas.
+
How to Contribute to Open-Source Projects – A Handbook for Beginners
+
Hillary Nyakundi
+
Open Source
+
2023
+
+
+
Learn Linux for Beginners: From Basics to Advanced Techniques
+
Zaira Hira
+
Linux
+
2024
+
+
+
How to Learn to Code and Get a Developer Job
+
Quincy Larson
+
Learn To Code
+
2024
+
+
+
The Regular Expressions Book – RegEx for JavaScript Developers
+
Kolade Chris
+
Regular Expressions
+
2023
+
+
+
The Python Code Example Handbook
+
Farhan Hasin Chowdhury
+
Python
+
2023
+
+
+
+
+
Total Books: 5
+
+
+
+
+
\ No newline at end of file
diff --git a/fullstack-cert/html-projects/book-catalogue-table/user-stories.md b/fullstack-cert/html-projects/book-catalogue-table/user-stories.md
new file mode 100644
index 000000000..a86129604
--- /dev/null
+++ b/fullstack-cert/html-projects/book-catalogue-table/user-stories.md
@@ -0,0 +1,10 @@
+1. You should create a `table` element.
+1. Your table should have a `thead` element.
+1. Within the `thead` element, you should have a `tr` element.
+1. Inside the `tr` element, you should have four `th` elements for `Title`, `Author`, `Genre`, and `Publication Year`.
+1. Your table should have a `tbody` element.
+1. Within the `tbody` element, you should have at least five `tr` elements.
+1. Inside each `tr` element, you should have four `td` elements for `Title`, `Author`, `Genre`, and `Publication Year` filled with the appropriate data.
+1. Your table should have a `tfoot` element.
+1. Within the `tfoot` element, you should have a `tr` element.
+1. Inside the `tr` element, you should have a `td` element with the `colspan` attribute set to `4` and the text `Total Books: [number of books in your table]`.
diff --git a/fullstack-cert/html-projects/bookstore-page/index.html b/fullstack-cert/html-projects/bookstore-page/index.html
new file mode 100644
index 000000000..e91c2412f
--- /dev/null
+++ b/fullstack-cert/html-projects/bookstore-page/index.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+ Bookstore Page
+
+
+
XYZ Bookstore
+
Browse our collection of amazing books!
+
+
+
+
Sally's SciFi Adventure
+
+ This is an epic story of Sally and her dog Rex as they navigate
+ through other worlds.
+
+
+
+
+
+
+
Dave's Cooking Adventure
+
+ This is the story of Dave as he learns to cook everything from
+ pancakes to pasta, one recipe at a time.
+
+
+
+
+
+
Review your selections and continue to checkout.
+
+
+
+
+
+
+
diff --git a/fullstack-cert/html-projects/browsers-list/index.html b/fullstack-cert/html-projects/browsers-list/index.html
new file mode 100644
index 000000000..3b68a70b9
--- /dev/null
+++ b/fullstack-cert/html-projects/browsers-list/index.html
@@ -0,0 +1,27 @@
+
+
+
+
+
+ List of Browsers and Descriptions
+
+
+
List of Major Web Browsers
+
+
Google Chrome
+
This is a free web browser developed by Google and first released in 2008.
+
+
Firefox
+
This is a free web browser developed by the Mozilla Corporation and first created in 2004.
+
+
Safari
+
This browser was developed by Apple and is the default browser for iPhone, iPad and Mac devices.
+
+
Brave
+
This is a free web browser first released in 2016 that is based on the Chromium web browser.
+
+
Arc
+
This is a free Chromium based web browser first released in 2023 by The Browser Company.
+
+
+
\ No newline at end of file
diff --git a/fullstack-cert/html-projects/cat-photo-app/index.html b/fullstack-cert/html-projects/cat-photo-app/index.html
new file mode 100644
index 000000000..010d4a57c
--- /dev/null
+++ b/fullstack-cert/html-projects/cat-photo-app/index.html
@@ -0,0 +1,61 @@
+
+
+
+
+ CatPhotoApp
+
+
+
+
+
+
+
+ Cats hate other cats.
+
+
+
+
+
+
diff --git a/fullstack-cert/html-projects/chocolate-cookies-recipe/cookies-image.jpg b/fullstack-cert/html-projects/chocolate-cookies-recipe/cookies-image.jpg
new file mode 100644
index 000000000..6a0c87340
Binary files /dev/null and b/fullstack-cert/html-projects/chocolate-cookies-recipe/cookies-image.jpg differ
diff --git a/fullstack-cert/html-projects/chocolate-cookies-recipe/index.html b/fullstack-cert/html-projects/chocolate-cookies-recipe/index.html
new file mode 100644
index 000000000..42e02898f
--- /dev/null
+++ b/fullstack-cert/html-projects/chocolate-cookies-recipe/index.html
@@ -0,0 +1,35 @@
+
+
+
+
+
+ Chocolate chip cookies recipe
+
+
+
+
Chocolate Chip Cookies
+
Welcome to the ultimate guide for making mini chocolate chip cookies! These bite-sized treats are perfect for
+ satisfying your sweet tooth without overindulging. Follow this simple recipe to create delicious,
+ crispy-on-the-outside, chewy-on-the-inside mini chocolate chip cookies that everyone will love.
+
+
Ingredients
+
+
1 cup all-purpose flour
+
1/2 teaspoon baking soda
+
1/4 cup unsalted butter, softened
+
1/4 cup granulated sugar
+
1/2 teaspoon vanilla extract
+
1/2 cup mini chocolate chips
+
+
Instructions
+
+
Preheat your oven to 350°F (175°C) and line a baking sheet with parchment paper.
+
In a bowl, whisk together the flour and baking soda.
+
In another bowl, beat the butter, sugar, and vanilla extract until creamy.
+
Gradually add the dry ingredients to the wet mixture, then fold in the mini chocolate chips.
+
Drop small spoonfuls of dough onto the baking sheet.
+
Bake for 8-10 minutes, then let cool before enjoying!
+
+
+
+
\ No newline at end of file
diff --git a/fullstack-cert/html-projects/chocolate-cookies-recipe/user-stories.md b/fullstack-cert/html-projects/chocolate-cookies-recipe/user-stories.md
new file mode 100644
index 000000000..383aac530
--- /dev/null
+++ b/fullstack-cert/html-projects/chocolate-cookies-recipe/user-stories.md
@@ -0,0 +1,22 @@
+1. You should have a `!DOCTYPE html` declaration.
+
+1. You should have an `html` element with `lang` set to `en`.
+
+1. You should have a `head` element containing a `title` element with the name of your recipe, and a `meta` element with a `charset` attribute set to `UTF-8`.
+
+1. You should have a `body` element.
+
+1. You should have an `h1` element with the name of your recipe.
+
+1. You should have a `p` element that introduces the recipe below the `h1`.
+
+1. You should have one `h2` element with the text `Ingredients` for the ingredients section.
+
+1. You should have an unordered list (`ul` element) with at least four list items (`li` elements) that lists your ingredients below the first `h2` element.
+
+1. You should have a second `h2` element with the text `Instructions` for the instructions section.
+
+1. You should have an ordered list (`ol` element) with at least four list items that lists the recipe steps in order, below the second `h2`.
+
+
+1. You should have one `img` element with a `src` attribute set to a valid image, and an `alt` attribute describing the image. You can use the `cookie-url` if you would like.
diff --git a/fullstack-cert/html-projects/event-page/index.html b/fullstack-cert/html-projects/event-page/index.html
new file mode 100644
index 000000000..227eed218
--- /dev/null
+++ b/fullstack-cert/html-projects/event-page/index.html
@@ -0,0 +1,49 @@
+
+
+
+
+
+ Event Hub
+
+
+
+
Event Hub
+
+
+
+
+
Upcoming Events
+
+
AI & Machine Learning Conference 2024
+
Join us for a deep dive into the latest advancements in artificial intelligence and machine learning. Industry leaders will share insights and case studies on how AI is transforming various sectors.
+
Date: August 10, 2024
+
+
+
Web Development Bootcamp
+
A hands-on workshop designed for developers looking to enhance their skills in modern web technologies including React, Node.js, and GraphQL. Perfect for both beginners and experienced developers.
+
Date: September 5, 2024
+
+
+
+
Past Events
+
+
Cybersecurity Summit 2024
+
An event focusing on the latest trends and threats in cybersecurity. Experts discussed strategies for protecting data and ensuring privacy in an increasingly digital world.
+
Date: June 15, 2024
+
+
+
+
Blockchain Expo 2024
+
A comprehensive event covering the future of blockchain technology. Topics included decentralized finance (DeFi), smart contracts, and the impact of blockchain on various industries.
+
Date: July 20, 2024
+
+
+
+
+
+
\ No newline at end of file
diff --git a/fullstack-cert/html-projects/event-page/past-event1.jpg b/fullstack-cert/html-projects/event-page/past-event1.jpg
new file mode 100644
index 000000000..6f05304eb
Binary files /dev/null and b/fullstack-cert/html-projects/event-page/past-event1.jpg differ
diff --git a/fullstack-cert/html-projects/event-page/past-event2.jpg b/fullstack-cert/html-projects/event-page/past-event2.jpg
new file mode 100644
index 000000000..ca0b6f6db
Binary files /dev/null and b/fullstack-cert/html-projects/event-page/past-event2.jpg differ
diff --git a/fullstack-cert/html-projects/event-page/user-stories.md b/fullstack-cert/html-projects/event-page/user-stories.md
new file mode 100644
index 000000000..5b9f37b97
--- /dev/null
+++ b/fullstack-cert/html-projects/event-page/user-stories.md
@@ -0,0 +1,10 @@
+1. You should have a `header` element.
+1. Inside the `header` element, you should have a `h1` element that contains the text `Event Hub`, and a `nav` element.
+1. Inside the `nav` element, you should have an unordered list of two items containing links to different sections of the page. The first item should have the text `Upcoming Events`, and the second item should have the text `Past Events`.
+1. Each link should be represented by an `a` element with an `href` attribute that links to the corresponding section of the page, `#upcoming` and `#past` respectively.
+1. You should have a `main` element that contains the different sections of the page.
+1. Inside the `main` element, you should have at least two `section` elements.
+1. The first `section` element should have an `id` attribute with the value `upcoming`, and a `h2` element with the text `Upcoming Events`.
+1. Inside the first section, you should have at least two `article` elements, each with a `h3` element for the event title, a paragraph for the event description, and a date when the event will take place.
+1. The second `section` element should have an `id` attribute with the value `past`, and a `h2` element with the text `Past Events`.
+1. The past event section should have at least two `article` elements, each with a `h3` element for the event title, a paragraph for the event description, and a date when the event happened.
diff --git a/fullstack-cert/html-projects/faq-page/index.html b/fullstack-cert/html-projects/faq-page/index.html
new file mode 100644
index 000000000..d2971234c
--- /dev/null
+++ b/fullstack-cert/html-projects/faq-page/index.html
@@ -0,0 +1,59 @@
+
+
+
+
+
+ Frequently Asked Questions - freeCodeCamp
+
+
+
+
Frequently Asked Questions
+
+
+
+
General Questions
+
+
+
What is freeCodeCamp?
+
freeCodeCamp is a non-profit organization that offers free coding lessons, certifications, and a supportive community to help people learn web development and other technical skills.
+
+
+
+
Is freeCodeCamp really free?
+
Yes, all of the courses and certifications on freeCodeCamp are completely free. The platform is supported by donations from the community.
+
+
+
+
How long does it take to complete a certification?
+
The time it takes to complete a certification varies depending on your pace. Some people finish a certification in a few months, while others take longer. Each certification typically requires hundreds of hours of practice.
+
+
+
+
+
Account Questions
+
+
+
Do I need an account to use freeCodeCamp?
+
You can access and complete the lessons without an account, but you'll need to create an account if you want to save your progress and earn certifications.
+
+
+
+
How do I reset my password?
+
To reset your password, go to the login page and click on "Forgot your password?" You will receive an email with instructions on how to reset your password.
+
+
+
+
Can I change my username?
+
Yes, you can change your username in the settings of your freeCodeCamp account. However, keep in mind that your old username may not be available if someone else takes it after you change it.
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/fullstack-cert/html-projects/faq-page/user-stories.md b/fullstack-cert/html-projects/faq-page/user-stories.md
new file mode 100644
index 000000000..50d1d6b6c
--- /dev/null
+++ b/fullstack-cert/html-projects/faq-page/user-stories.md
@@ -0,0 +1,6 @@
+1. Your FAQ page should have a `header` element with an `h1` element containing text that describes the purpose of the page.
+1. Your FAQ page should have a `main` element to contain the primary content of the page.
+1. Within the `main` element, your FAQ page should have at least two `section` elements, each with an `h2` element containing text that describes the topic of the section. For example: "General Questions" and "Account Questions".
+1. Each `section` element should contain at least three `article` elements, each with an `h3` element containing a question and a `p` element containing an answer.
+1. Your FAQ page should have a `footer` element.
+1. Inside the `footer` element, there should be a `p` element with text and an `a` element that links to a different page.
diff --git a/fullstack-cert/html-projects/framed-videos/index.html b/fullstack-cert/html-projects/framed-videos/index.html
new file mode 100644
index 000000000..02e818144
--- /dev/null
+++ b/fullstack-cert/html-projects/framed-videos/index.html
@@ -0,0 +1,23 @@
+
+
+
+
+
+ Display Videos in an iframe
+
+
+
How to display videos in an iframe
+
+
+
+
+
diff --git a/fullstack-cert/html-projects/hotel-feedback-form/index.html b/fullstack-cert/html-projects/hotel-feedback-form/index.html
new file mode 100644
index 000000000..ac15ccc5c
--- /dev/null
+++ b/fullstack-cert/html-projects/hotel-feedback-form/index.html
@@ -0,0 +1,104 @@
+
+
+
+
+
+
+ Hotel Feedback form
+
+
+
+
Hotel Feedback Form
+
+ Thank you for staying with us. Please provide feedback on your recent
+ stay.
+
+
+
+
+
+
+
diff --git a/fullstack-cert/html-projects/lab-html-video-audio/index.html b/fullstack-cert/html-projects/lab-html-video-audio/index.html
new file mode 100644
index 000000000..36b6b6930
--- /dev/null
+++ b/fullstack-cert/html-projects/lab-html-video-audio/index.html
@@ -0,0 +1,27 @@
+
+
+
+
+
+ HTML Media Lab
+
+
+
+
HTML Audio and Video Lab
+
+
+
What is the map method and how does it work
+
+
+
+
+
Sailing Away
+
+
+
+
+
+
diff --git a/fullstack-cert/html-projects/lab-html-video-audio/user-stories.md b/fullstack-cert/html-projects/lab-html-video-audio/user-stories.md
new file mode 100644
index 000000000..5a5e81abf
--- /dev/null
+++ b/fullstack-cert/html-projects/lab-html-video-audio/user-stories.md
@@ -0,0 +1,7 @@
+1. You should have an `h1` element for the main title of the page.
+2. You should have two `section` elements.
+3. Inside the first `section` element, you should have an `h2` element for the title of the video playing.
+4. Below the `h2` element, you should have a `video` element with `controls` and `width` attributes. The `width` attribute should be set to `640`.
+5. Inside the `video` element, you should have a `source` element with a `src` attribute pointing to a video file and a `type` attribute.
+6. Inside the second `section` element, you should have an `h2` element for the title of the song playing.
+7. Below the `label` element, you should have an `audio` element with `controls`, and `loop` attributes.
diff --git a/fullstack-cert/html-projects/lab-landing-page/index.html b/fullstack-cert/html-projects/lab-landing-page/index.html
new file mode 100644
index 000000000..5b455ba14
--- /dev/null
+++ b/fullstack-cert/html-projects/lab-landing-page/index.html
@@ -0,0 +1,127 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Handcrafted, home-made masterpieces
+
+
+
+
+
+
+
+
+
Premium Materials
+
+ Our trombones use the shiniest brass which is sourced locally.
+ This will increase the longevity of your purchase.
+
+
+
+
+
+
+
Fast Shipping
+
+ We make sure you recieve your trombone as soon as we have
+ finished making it. We also provide free returns if you are not
+ satisfied.
+
+
+
+
+
+
+
+
+
Quality Assurance
+
+ For every purchase you make, we will ensure there are no damages
+ or faults and we will check and test the pitch of your
+ instrument.
+
+
+
+
+
+
+
+
+
+
Tenor Trombone
+
$600
+
+
Lorem ipsum.
+
Lorem ipsum.
+
Lorem ipsum dolor.
+
Lorem ipsum.
+
+
+
+
+
Bass Trombone
+
$900
+
+
Lorem ipsum.
+
Lorem ipsum.
+
Lorem ipsum dolor.
+
Lorem ipsum.
+
+
+
+
+
Valve Trombone
+
$1200
+
+
Plays similar to a Trumpet
+
Great for Jazz Bands
+
Lorem ipsum dolor.
+
Lorem ipsum.
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/fullstack-cert/html-projects/lab-landing-page/styles.css b/fullstack-cert/html-projects/lab-landing-page/styles.css
new file mode 100644
index 000000000..784bf82bf
--- /dev/null
+++ b/fullstack-cert/html-projects/lab-landing-page/styles.css
@@ -0,0 +1,312 @@
+/** global element styling **/
+
+@import 'https://fonts.googleapis.com/css?family=Lato:400,700';
+
+* {
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
+}
+
+body {
+ background-color: #eee;
+ font-family: 'Lato', sans-serif;
+}
+
+#page-wrapper {
+ position: relative;
+}
+
+li {
+ list-style: none;
+}
+
+a {
+ color: #000;
+ text-decoration: none;
+}
+
+/** global classes styling **/
+
+.container {
+ max-width: 1000px;
+ width: 100%;
+ margin: 0 auto;
+}
+
+.btn {
+ padding: 0 20px;
+ height: 40px;
+ font-size: 1em;
+ font-weight: 900;
+ text-transform: uppercase;
+ border: 3px black solid;
+ border-radius: 2px;
+ background: transparent;
+ cursor: pointer;
+}
+
+.grid {
+ display: flex;
+}
+
+header {
+ position: fixed;
+ top: 0;
+ min-height: 75px;
+ padding: 0px 20px;
+ display: flex;
+ justify-content: space-around;
+ align-items: center;
+ background-color: #eee;
+}
+
+@media (max-width: 600px) {
+ header {
+ flex-wrap: wrap;
+ }
+}
+
+.logo {
+ width: 60vw;
+}
+
+@media (max-width: 650px) {
+ .logo {
+ margin-top: 15px;
+ width: 100%;
+ position: relative;
+ }
+}
+
+.logo>img {
+ width: 100%;
+ height: 100%;
+ max-width: 300px;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ text-align: center;
+ margin-left: 20px;
+}
+
+@media (max-width: 650px) {
+ .logo>img {
+ margin: 0 auto;
+ }
+}
+
+nav {
+ font-weight: 400;
+}
+
+@media (max-width: 650px) {
+ nav {
+ margin-top: 10px;
+ width: 100%;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ text-align: center;
+ padding: 0 50px;
+ }
+
+ nav li {
+ padding-bottom: 5px;
+ }
+}
+
+nav>ul {
+ width: 35vw;
+ display: flex;
+ flex-direction: row;
+ justify-content: space-around;
+}
+
+@media (max-width: 650px) {
+ nav>ul {
+ flex-direction: column;
+ }
+}
+
+#hero {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ text-align: center;
+ height: 200px;
+ margin-top: 50px;
+}
+
+#hero>h2 {
+ margin-bottom: 20px;
+ word-wrap: break-word;
+}
+
+#hero input[type='email'] {
+ max-width: 275px;
+ width: 100%;
+ padding: 5px;
+}
+
+#hero input[type='submit'] {
+ max-width: 150px;
+ width: 100%;
+ height: 30px;
+ margin: 15px 0;
+ border: 0;
+ background-color: #f1c40f;
+}
+
+#hero input[type='submit']:hover {
+ background-color: orange;
+ transition: background-color 1s;
+}
+
+@media (max-width: 650px) {
+ #hero {
+ margin-top: 120px;
+ }
+}
+
+#features {
+ margin-top: 30px;
+}
+
+#features .icon {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ height: 125px;
+ width: 20vw;
+ color: darkorange;
+}
+
+@media (max-width: 550px) {
+ #features .icon {
+ display: none;
+ }
+}
+
+#features .desc {
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ height: 125px;
+ width: 80vw;
+ padding: 5px;
+}
+
+@media (max-width: 550px) {
+ #features .desc {
+ width: 100%;
+ text-align: center;
+ padding: 0;
+ height: 150px;
+ }
+}
+
+@media (max-width: 650px) {
+ #features {
+ margin-top: 0;
+ }
+}
+
+#how-it-works {
+ margin-top: 50px;
+ display: flex;
+ justify-content: center;
+}
+
+#how-it-works>iframe {
+ max-width: 560px;
+ width: 100%;
+}
+
+#pricing {
+ margin-top: 60px;
+ display: flex;
+ flex-direction: row;
+ justify-content: center;
+}
+
+.product {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ text-align: center;
+ width: calc(100% / 3);
+ margin: 10px;
+ border: 1px solid #000;
+ border-radius: 3px;
+}
+
+.product>.level {
+ background-color: #ddd;
+ color: black;
+ padding: 15px 0;
+ width: 100%;
+ text-transform: uppercase;
+ font-weight: 700;
+}
+
+.product>h2 {
+ margin-top: 15px;
+}
+
+.product>ol {
+ margin: 15px 0;
+}
+
+.product>ol>li {
+ padding: 5px 0;
+}
+
+.product>button {
+ border: 0;
+ margin: 15px 0;
+ background-color: #f1c40f;
+ font-weight: 400;
+}
+
+.product>button:hover {
+ background-color: orange;
+ transition: background-color 1s;
+}
+
+@media (max-width: 800px) {
+ #pricing {
+ flex-direction: column;
+ }
+
+ .product {
+ max-width: 300px;
+ width: 100%;
+ margin: 0 auto;
+ margin-bottom: 10px;
+ }
+}
+
+footer {
+ margin-top: 30px;
+ background-color: #ddd;
+ padding: 20px;
+}
+
+footer>ul {
+ display: flex;
+ justify-content: flex-end;
+}
+
+footer>ul>li {
+ padding: 0 10px;
+}
+
+footer>span {
+ margin-top: 5px;
+ display: flex;
+ justify-content: flex-end;
+ font-size: 0.9em;
+ color: #444;
+}
\ No newline at end of file
diff --git a/fullstack-cert/html-projects/lab-landing-page/user-stories.md b/fullstack-cert/html-projects/lab-landing-page/user-stories.md
new file mode 100644
index 000000000..203946af6
--- /dev/null
+++ b/fullstack-cert/html-projects/lab-landing-page/user-stories.md
@@ -0,0 +1,17 @@
+1. Your product landing page should have a `header` element with a corresponding `id="header"`
+2. You should have an image within the `header` element with a corresponding `id="header-img"` (A logo would make a good image here)
+3. Within the `#header` element, you should have a `nav` element with a corresponding `id="nav-bar"`
+4. You should have at least three clickable elements inside the `nav` element, each with the class `nav-link`
+5. When you click a `.nav-link` button in the `nav` element, you should be taken to the corresponding section of the landing page
+6. You should have an embedded product video with `id="video"`
+7. Your landing page should have a `form` element with a corresponding `id="form"`
+8. Within the form, there should be an `input` field with `id="email"` where you can enter an email address.
+9. The `#email` input field should have placeholder text to let users know what the field is for.
+10. The `#email` input field should use HTML5 validation to confirm that the entered text is an email address
+11. Within the form, there should be a submit `input` with a corresponding `id="submit"`.
+12. When you click the `#submit` element, the email should be submitted to a static page (use this mock URL: `https://www.freecodecamp.com/email-submit`).
+13. The navbar should always be at the top of the viewport.
+14. Your product landing page should have at least one media query.
+15. Your product landing page should utilize CSS flexbox at least once.
+16. Be sure to add `` in your HTML to link your stylesheet and apply your CSS.
+
diff --git a/fullstack-cert/html-projects/lab-movie-review-page/index.html b/fullstack-cert/html-projects/lab-movie-review-page/index.html
new file mode 100644
index 000000000..4f87ac8aa
--- /dev/null
+++ b/fullstack-cert/html-projects/lab-movie-review-page/index.html
@@ -0,0 +1,35 @@
+
+
+
+
+
+ Movie Review
+
+
+
+
Movie Review: Rise Beyond
+
+
+ Rise Beyond is an uplifting drama that tells the story of Ethan Carter,
+ a young man from a small town who dreams of becoming a world-class musician.
+ Facing financial struggles and self-doubt, Ethan embarks on a journey of resilience,
+ guided by his mentor Professor Adams and childhood friend Lena Mitchell.
+ Through setbacks, failures, and moments of triumph, Rise Beyond reminds us that
+ our greatest potential lies beyond our fears.
+
+
+ Movie Rating:
+ ⭐⭐⭐⭐⭐⭐⭐⭐⭐☆ (9.2/10)
+
+
+
Cast Members
+
+
James Holloway as Ethan Carter
+
Olivia Sterling as Lena Mitchell
+
William Lancaster as Professor Adams
+
Maria Collins as Evelyn Carter (Ethan’s Mother)
+
+
+
+
\ No newline at end of file
diff --git a/fullstack-cert/html-projects/lab-movie-review-page/user-stories.md b/fullstack-cert/html-projects/lab-movie-review-page/user-stories.md
new file mode 100644
index 000000000..5c0649e14
--- /dev/null
+++ b/fullstack-cert/html-projects/lab-movie-review-page/user-stories.md
@@ -0,0 +1,10 @@
+1. Your should have a `main` element.
+2. Inside the `main` element, you should have an `h1` element for the movie title.
+3. Below the `h1` element, you should have an `img` element displaying the movie cover with a descriptive `alt` attribute describing the image.
+4. You should have a `p` element containing a brief movie description.
+5. You should have another `p` element to display the movie rating.
+6. Inside the `p` element, you should have a `strong` element with the text `Movie Rating`.
+7. You should have a `span` element with `aria-hidden` attribute set to `true` containing a visual representation of the rating using stars and a numerical value in parentheses (e.g. `9.2/10`).
+8. You should have a `h2` element with the text `Cast Members`.
+9. You should have a `ul` element.
+10. Inside the `ul` element, you should have multiple `li` elements each containing an actor’s name wrapped in `strong` element and their corresponding character role (e.g., `James Holloway as Ethan Carter`).
diff --git a/fullstack-cert/html-projects/lab-multimedia-player/index.html b/fullstack-cert/html-projects/lab-multimedia-player/index.html
new file mode 100644
index 000000000..a18c83ef0
--- /dev/null
+++ b/fullstack-cert/html-projects/lab-multimedia-player/index.html
@@ -0,0 +1,42 @@
+
+
+
+
+
+ Multimedia Player
+
+
+
Multimedia Player
+
+
Now Playing: Sailing Away
+
+
+
+
+
What is a map method and how does it work?
+
+
+
+
+
Transcript
+
+ What is a map method and how does it work?
+ The map method is a powerful and widely used function in JavaScript that operates on arrays.
+ It's designed to create a new array by applying a given function to each element of the original array.
+ This method does not modify the original array, but instead returns the new array containing the results of the function applied to each element.
+
+
+
+
+
\ No newline at end of file
diff --git a/fullstack-cert/html-projects/lab-multimedia-player/user-stories.md b/fullstack-cert/html-projects/lab-multimedia-player/user-stories.md
new file mode 100644
index 000000000..e489d0afc
--- /dev/null
+++ b/fullstack-cert/html-projects/lab-multimedia-player/user-stories.md
@@ -0,0 +1,11 @@
+1. You should have an `h1` element for the main title of the page.
+2. You should have three `section` elements.
+3. Inside the first `section` element, you should have an `h2` element for the title of song playing.
+4. Below the `h2` element, you should have an `audio` element with `controls` attribute and an `aria-label` attribute.
+5. Inside the `audio` element, you should have a `source` element with a `src` attribute pointing to an audio file and a `type` attribute.
+6. Inside the second `section` element, you should have an `h2` element for the title of the video playing.
+7. Below the `h2` element, you should have a `video` element with `controls`, `width` attributes and an `aria-label` attribute.
+8. Inside the `video` element, you should have a `source` element with a `src` attribute pointing to a video file and a `type` attribute.
+9. Below the `source` element, you should have a `track` element with a `src` attribute pointing to a subtitles file and a `kind` attribute, a `srclang` attribute and a `label` attribute.
+10. Inside the third `section` element, you should have an `h2` element for the title of the section eg. "Transcript".
+11. Below the `h2` element, you should have a `p` element with the transcript of the video.
diff --git a/fullstack-cert/html-projects/lab-personal-portfolio/index.html b/fullstack-cert/html-projects/lab-personal-portfolio/index.html
new file mode 100644
index 000000000..a1f368ddb
--- /dev/null
+++ b/fullstack-cert/html-projects/lab-personal-portfolio/index.html
@@ -0,0 +1,147 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/fullstack-cert/html-projects/lab-personal-portfolio/styles.css b/fullstack-cert/html-projects/lab-personal-portfolio/styles.css
new file mode 100644
index 000000000..604de01de
--- /dev/null
+++ b/fullstack-cert/html-projects/lab-personal-portfolio/styles.css
@@ -0,0 +1,332 @@
+/* Custom properties/variables */
+:root {
+ --main-white: #f0f0f0;
+ --main-red: #be3144;
+ --main-blue: #45567d;
+ --main-gray: #303841;
+}
+
+/* Base reset */
+* {
+ margin: 0;
+ padding: 0;
+}
+
+/* box-sizing and font sizing */
+*,
+*::before,
+*::after {
+ box-sizing: inherit;
+}
+
+html {
+ box-sizing: border-box;
+
+ /* Set font size for easy rem calculations
+ * default document font size = 16px, 1rem = 16px, 100% = 16px
+ * (100% / 16px) * 10 = 62.5%, 1rem = 10px, 62.5% = 10px
+ */
+ font-size: 62.5%;
+ scroll-behavior: smooth;
+}
+
+/* A few media query to set some font sizes at different screen sizes.
+ * This helps automate a bit of responsiveness.
+ * The trick is to use the rem unit for size values, margin and padding.
+ * Because rem is relative to the document font size
+ * when we scale up or down the font size on the document
+ * it will affect all properties using rem units for the values.
+*/
+
+/* I am using the em unit for breakpoints
+ * The calculation is the following
+ * screen size divided by browser base font size
+ * As an example: a breakpoint at 980px
+ * 980px / 16px = 61.25em
+*/
+
+/* 1200px / 16px = 75em */
+@media (max-width: 75em) {
+ html {
+ font-size: 60%;
+ }
+}
+
+/* 980px / 16px = 61.25em */
+@media (max-width: 61.25em) {
+ html {
+ font-size: 58%;
+ }
+}
+
+/* 460px / 16px = 28.75em */
+@media (max-width: 28.75em) {
+ html {
+ font-size: 55%;
+ }
+}
+
+/* Base styles */
+
+body {
+ font-family: 'Poppins', sans-serif;
+ font-size: 1.8rem;
+ /* 18px */
+ font-weight: 400;
+ line-height: 1.4;
+ color: var(--main-white);
+}
+
+h1,
+h2 {
+ font-family: 'Raleway', sans-serif;
+ font-weight: 700;
+ text-align: center;
+}
+
+h1 {
+ font-size: 6rem;
+}
+
+h2 {
+ font-size: 4.2rem;
+}
+
+ul {
+ list-style: none;
+}
+
+a {
+ text-decoration: none;
+ color: var(--main-white);
+}
+
+img {
+ display: block;
+ width: 100%;
+}
+
+/* nav */
+
+.nav {
+ display: flex;
+ justify-content: flex-end;
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ background: var(--main-red);
+ box-shadow: 0 2px 0 rgba(0, 0, 0, 0.4);
+ z-index: 10;
+}
+
+.nav-list {
+ display: flex;
+ margin-right: 2rem;
+}
+
+@media (max-width: 28.75em) {
+ .nav {
+ justify-content: center;
+ }
+
+ .nav-list {
+ margin: 0 1rem;
+ }
+}
+
+.nav-list a {
+ display: block;
+ font-size: 2.2rem;
+ padding: 2rem;
+}
+
+.nav-list a:hover {
+ background: var(--main-blue);
+}
+
+/* Welcome section */
+
+.welcome-section {
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ width: 100%;
+ height: 100vh;
+ background-color: #000;
+ background-image: linear-gradient(62deg, #3a3d40 0%, #181719 100%);
+}
+
+.welcome-section>p {
+ font-size: 3rem;
+ font-weight: 200;
+ font-style: italic;
+ color: var(--main-red);
+}
+
+/* Projects section */
+
+.projects-section {
+ text-align: center;
+ padding: 10rem 2rem;
+ background: var(--main-blue);
+}
+
+.projects-section-header {
+ max-width: 640px;
+ margin: 0 auto 6rem auto;
+ border-bottom: 0.2rem solid var(--main-white);
+}
+
+@media (max-width: 28.75em) {
+ .projects-section-header {
+ font-size: 4rem;
+ }
+}
+
+/* "Automagic" image grid using no media queries */
+.projects-grid {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
+ grid-gap: 4rem;
+ width: 100%;
+ max-width: 1280px;
+ margin: 0 auto;
+ margin-bottom: 6rem;
+}
+
+@media (max-width: 30.625em) {
+ .projects-section {
+ padding: 6rem 1rem;
+ }
+
+ .projects-grid {
+ grid-template-columns: 1fr;
+ }
+}
+
+.project {
+ background: var(--main-gray);
+ box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
+ border-radius: 2px;
+}
+
+.code {
+ color: var(--main-gray);
+ transition: color 0.3s ease-out;
+}
+
+.project:hover .code {
+ color: #ff7f50;
+}
+
+.project-image {
+ height: calc(100% - 6.8rem);
+ width: 100%;
+ object-fit: cover;
+}
+
+.project-title {
+ font-size: 2rem;
+ padding: 2rem 0.5rem;
+}
+
+.btn {
+ display: inline-block;
+ padding: 1rem 2rem;
+ border-radius: 2px;
+}
+
+.btn-show-all {
+ font-size: 2rem;
+ background: var(--main-gray);
+ transition: background 0.3s ease-out;
+}
+
+.btn-show-all:hover {
+ background: var(--main-red);
+}
+
+.btn-show-all:hover>i {
+ transform: translateX(2px);
+}
+
+.btn-show-all>i {
+ margin-left: 10px;
+ transform: translateX(0);
+ transition: transform 0.3s ease-out;
+}
+
+/* Contact section */
+
+.contact-section {
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ text-align: center;
+ width: 100%;
+ height: 80vh;
+ padding: 0 2rem;
+ background: var(--main-gray);
+}
+
+.contact-section-header>h2 {
+ font-size: 6rem;
+}
+
+@media (max-width: 28.75em) {
+ .contact-section-header>h2 {
+ font-size: 4rem;
+ }
+}
+
+.contact-section-header>p {
+ font-style: italic;
+}
+
+.contact-links {
+ display: flex;
+ justify-content: center;
+ width: 100%;
+ max-width: 980px;
+ margin-top: 4rem;
+ flex-wrap: wrap;
+}
+
+.contact-details {
+ font-size: 2.4rem;
+ text-shadow: 2px 2px 1px #1f1f1f;
+ transition: transform 0.3s ease-out;
+}
+
+.contact-details:hover {
+ transform: translateY(8px);
+}
+
+/* Footer */
+
+footer {
+ font-weight: 300;
+ display: flex;
+ justify-content: space-evenly;
+ padding: 2rem;
+ background: var(--main-gray);
+ border-top: 4px solid var(--main-red);
+}
+
+footer>p {
+ margin: 2rem;
+}
+
+footer i {
+ vertical-align: middle;
+}
+
+@media (max-width: 28.75em) {
+ footer {
+ flex-direction: column;
+ text-align: center;
+ }
+}
\ No newline at end of file
diff --git a/fullstack-cert/html-projects/lab-personal-portfolio/user-stories.md b/fullstack-cert/html-projects/lab-personal-portfolio/user-stories.md
new file mode 100644
index 000000000..32e32bfa2
--- /dev/null
+++ b/fullstack-cert/html-projects/lab-personal-portfolio/user-stories.md
@@ -0,0 +1,12 @@
+1. Your portfolio should have a welcome section with an `id` of `welcome-section`
+2. The welcome section should have an `h1` element that contains text
+3. Your portfolio should have a projects section with an `id` of `projects`
+4. The projects section should contain at least one element with a `class` of `project-tile` to hold a project
+5. The projects section should contain at least one link to a project
+6. Your portfolio should have a navbar with an id of `navbar`
+7. The navbar should contain at least one link that you can click on to navigate to different sections of the page
+8. Your portfolio should have a link with an id of `profile-link`, which opens your GitHub or freeCodeCamp profile in a new tab
+9. Your portfolio should have at least one media query
+10. The height of the welcome section should be equal to the height of the viewport
+11. The navbar should always be at the top of the viewport
+
diff --git a/fullstack-cert/html-projects/payment-page/index.html b/fullstack-cert/html-projects/payment-page/index.html
new file mode 100644
index 000000000..a259f39fd
--- /dev/null
+++ b/fullstack-cert/html-projects/payment-page/index.html
@@ -0,0 +1,43 @@
+
+
+
+
+
+ Checkout Page
+
+
+
+
Checkout
+
+
+
Your Cart
+
+
Left-handed spoon
+
$29.99
+
+
+
+
Payment Information
+
+
+
+
+
\ No newline at end of file
diff --git a/fullstack-cert/html-projects/payment-page/spoon.jpg b/fullstack-cert/html-projects/payment-page/spoon.jpg
new file mode 100644
index 000000000..64435bb27
Binary files /dev/null and b/fullstack-cert/html-projects/payment-page/spoon.jpg differ
diff --git a/fullstack-cert/html-projects/payment-page/user-stories.md b/fullstack-cert/html-projects/payment-page/user-stories.md
new file mode 100644
index 000000000..92bddda3b
--- /dev/null
+++ b/fullstack-cert/html-projects/payment-page/user-stories.md
@@ -0,0 +1,10 @@
+You should have an `h1` with the text `Checkout`.
+You should have two `section` elements after the `h1` element.
+You should have an `h2` with the text `Your Cart` within the first section.
+You should have an image of an item in the first section with appropriate alternate text.
+You should have an `h2` with the text `Payment Information` within the second section.
+You should have a `form` within the second section.
+You should have an input with an `id` and `name` of `card-name` within your form and a `label` associated with it.
+You should have an input with an `id` and `name` of `card-number` within your form and a label associated with it.
+At least two of your input elements should be required and have an `aria-required` attribute set to `true`.
+You should use `tab-index` at least once.
diff --git a/fullstack-cert/html-projects/quincy's-job-tips/index.html b/fullstack-cert/html-projects/quincy's-job-tips/index.html
new file mode 100644
index 000000000..27ab65098
--- /dev/null
+++ b/fullstack-cert/html-projects/quincy's-job-tips/index.html
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+ Quincy's Tips for Getting a Developer Job
+
+
+
+
Quincy Larson's Tips for Getting a Developer Job
+
+
Learning to code is hard, but as Quincy Larson says,
+
+
+ You can become a developer.
+
+
+
+
+
+
Envisioning Success
+
+ Can you imagine what it would be like to be a successful developer? To have built software systems that people rely upon?
+
+
—Quincy Larson, How to Learn to Code and Get a Developer Job [Full Book].
+
+
+
+
Importance of Networking
+
+
So much of getting a job is who you know.
+
+ It's OK to be an introvert, but you do need to push your boundaries.
+
Create GitHub, Twitter, LinkedIn, and Discord accounts.
+
Go to tech meetups and conferences. Travel if you have to.
+
+
+
+
+
+
Importance of Building a Reputation
+
+
Share short video demos of your projects.
+
+
Keep applying to speak at bigger and bigger conferences.
+
Hang out at hackerspaces and help people who are even newer to coding than you.
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/fullstack-cert/html-projects/student-exams-table/index.html b/fullstack-cert/html-projects/student-exams-table/index.html
new file mode 100644
index 000000000..dbec4a2f8
--- /dev/null
+++ b/fullstack-cert/html-projects/student-exams-table/index.html
@@ -0,0 +1,61 @@
+
+
+
+
+
+
+ Calculus Final Exams Table
+
+
+
The card below was built as a sample survey form for freeCodeCamp.
+
+
Join the Togepi Fan Club!
+
+ Enter your information here to receive updates about club activities,
+ our monthly newsletter, and other email communications.
+
+
+
+
+
+
\ No newline at end of file
diff --git a/fullstack-cert/html-projects/survey-form/user-stories.md b/fullstack-cert/html-projects/survey-form/user-stories.md
new file mode 100644
index 000000000..18384337f
--- /dev/null
+++ b/fullstack-cert/html-projects/survey-form/user-stories.md
@@ -0,0 +1,16 @@
+1. You should have a page title in an `h1` element with an `id` of `title`.
+1. You should have a short explanation in a `p` element with an `id` of `description`.
+1. You should have a `form` element with an `id` of `survey-form`.
+1. Inside the form element you should have a required `input` field to enter your name that has an `id` of `name` and a `type` of `text`.
+1. Inside the form element you should have a required `input` field to enter your email that has an `id` of `email`.
+1. If you enter an email that is not formatted correctly, you should see an HTML5 validation error.
+1. Inside the form element you should have an `input` field to enter a number that has an `id` of `number`.
+1. The number input should not accept non-numbers, either by preventing you from typing them or by showing an HTML5 validation error (depending on your browser).
+1. If you enter numbers outside the range of the number input, which are defined by the `min` and `max` attributes, you should see an HTML5 validation error.
+1. For the name, email, and number input fields, you should have corresponding `label` elements in the form, that describe the purpose of each field with the following ids: `name-label`, `email-label`, and `number-label`.
+1. For the name, email, and number input fields, you should have a placeholder text that gives a description or instructions for each field.
+1. Inside the form element, you should have a `select` dropdown element with an `id` of `dropdown` and at least two options to choose from.
+1. Inside the form element, you can select an option from a group of at least two radio buttons that are grouped using the `name` attribute.
+1. Inside the form element, you can select several fields from a series of checkboxes, each of which must have a `value` attribute.
+1. Inside the form element, you should have a `textarea` for additional comments.
+1. Inside the form element, you should have a button with `id` of `submit` to submit all the inputs.
\ No newline at end of file
diff --git a/fullstack-cert/html-projects/table-accessibity-workshop/index.html b/fullstack-cert/html-projects/table-accessibity-workshop/index.html
new file mode 100644
index 000000000..e698ae642
--- /dev/null
+++ b/fullstack-cert/html-projects/table-accessibity-workshop/index.html
@@ -0,0 +1,61 @@
+
+
+
+
+ Accessible Table
+
+
+
+
Tech Conference 2025 Schedule
+
+
+
Schedule by Track and Time
+
+
+
+
Time
+
Track A
+
Track B
+
Track C
+
+
+
+
+
+
9:00 AM
+
Keynote: Tech Future
+
Intro to Web Dev
+
UX for All
+
+
+
10:00 AM
+
Accessibility Deep Dive
+
CSS for Beginners
+
Inclusive Design Principles
+
+
+
11:00 AM
+
Break
+
+
+
11:30 AM
+
AR/VR in Education
+
JavaScript Fundamentals
+
Design Systems at Scale
+
+
+
12:30 PM
+
Lunch Break
+
+
+
2:00 PM
+
Voice UI Workshop
+
Git & GitHub Essentials
+
Color & Contrast in UI
+
+
+
+
+
+
+
diff --git a/fullstack-cert/html-projects/travel-agency-page/colosseo.jpg b/fullstack-cert/html-projects/travel-agency-page/colosseo.jpg
new file mode 100644
index 000000000..7d66c31cc
Binary files /dev/null and b/fullstack-cert/html-projects/travel-agency-page/colosseo.jpg differ
diff --git a/fullstack-cert/html-projects/travel-agency-page/favignana.jpg b/fullstack-cert/html-projects/travel-agency-page/favignana.jpg
new file mode 100644
index 000000000..1220a0261
Binary files /dev/null and b/fullstack-cert/html-projects/travel-agency-page/favignana.jpg differ
diff --git a/fullstack-cert/html-projects/travel-agency-page/index.html b/fullstack-cert/html-projects/travel-agency-page/index.html
new file mode 100644
index 000000000..dad7fafe5
--- /dev/null
+++ b/fullstack-cert/html-projects/travel-agency-page/index.html
@@ -0,0 +1,36 @@
+
+
+
+
+ Travel Agency Page
+
+
+
Discover Italy
+
Art, folklore, food, nature, and more. Choose among our wide selection of guided tours and excursions, and live an unforgettable experience exploring Italy.
+
Packages
+
We offer an extensive range of holiday solutions to accomodate the needs of all our clients. From daily excursions in the most beautiful cities, to thorough tours of hidden villages and medieval towns to discover Italy's lesser-known sides.
+
+
+
+
+ Rome and Center Italy
+
+
+
+
+
+ Nature and National Parks
+
+
+
+
+
+ South Italy and Islands
+
+
+
\ No newline at end of file
diff --git a/fullstack-cert/html-projects/travel-agency-page/lavaredo.jpg b/fullstack-cert/html-projects/travel-agency-page/lavaredo.jpg
new file mode 100644
index 000000000..b4fbdd723
Binary files /dev/null and b/fullstack-cert/html-projects/travel-agency-page/lavaredo.jpg differ
diff --git a/fullstack-cert/html-projects/travel-agency-page/user-stories.md b/fullstack-cert/html-projects/travel-agency-page/user-stories.md
new file mode 100644
index 000000000..3fe7e899c
--- /dev/null
+++ b/fullstack-cert/html-projects/travel-agency-page/user-stories.md
@@ -0,0 +1,23 @@
+1. You should have a `DOCTYPE` declaration.
+
+1. You should have an `html` element with `lang` set to `en`.
+
+1. You should have a `head` element containing a `meta` void element with `charset` set to `utf-8` and a `title` with the text `Travel Agency Page`.
+
+1. You should have an `h1` element to present your travel destinations.
+
+1. You should have a paragraph below the `h1` element introducing the travel opportunities.
+
+1. You should have an `h2` element with the text `Packages`.
+
+1. You should have a `p` element introducing briefly the various packages.
+
+1. You should have an unordered list element with two list items. The two list items should have the text `Group Travels` and `Private Tours`, respectively. The text of each list item should be enclosed by an anchor element.
+
+1. You should have an `h2` element with the text `Top Itineraries`.
+
+1. You should have at least three `figure` elements, each containing an anchor element and a `figcaption` element.
+
+1. The three anchor elements should have an `img` element with an appropriate `alt` attribute and a `src` attribute set to a valid image as their content. You can use `colosseo-url`, `lavaredo-url`, and `favignana-url` if you would like.
+
+1. All your five anchor elements should have an `href` attribute with the value of `https://www.freecodecamp.org/learn` and a `target` attribute with the value of `_blank`.
\ No newline at end of file
diff --git a/fullstack-cert/html-projects/video-compilation-page/index.html b/fullstack-cert/html-projects/video-compilation-page/index.html
new file mode 100644
index 000000000..677cc1317
--- /dev/null
+++ b/fullstack-cert/html-projects/video-compilation-page/index.html
@@ -0,0 +1,51 @@
+
+
+
+
+
+ Video Compilation Page
+
+
+
+
+
Front End Web Development
+
Front End Web Development involves designing and building user interfaces of websites using HTML, CSS, and
+ JavaScript. It focuses on creating visually appealing, interactive, and user-friendly websites. Front End
+ evelopers
+ ensure accessibility, performance optimization, and
+ adherence to web standards, blending creativity with technical expertise.
+
+
HTML
+
HTML, or HyperText Markup Language, forms the backbone of web pages by defining their basic structure and
+ layout. It uses a series of elements to display text, images, lists, tables, and other static content on
+ a web page.
+
+
+
+
CSS
+
CSS, or Cascading Style Sheets, is used to control the visual presentation of HTML elements on a web
+ page. It allows for customized styling, including colors, fonts, layouts, and spacing, making websites
+ visually appealing. CSS also supports responsive design, ensuring web pages look good on
+ all devices.
+
+
+
+
JavaScript
+
JavaScript is a programming language that adds interactivity to static web pages, enabling dynamic
+ content updates, form validations, animations, and responsive behaviors based on user interactions and
+ events.
+
+
+
+
+
+
\ No newline at end of file
diff --git a/fullstack-cert/html-projects/video-compilation-page/user-stories.md b/fullstack-cert/html-projects/video-compilation-page/user-stories.md
new file mode 100644
index 000000000..d7a0e395c
--- /dev/null
+++ b/fullstack-cert/html-projects/video-compilation-page/user-stories.md
@@ -0,0 +1,11 @@
+1. You should have a `main` element.
+
+1. You should have an `h1` element with the topic of your page.
+
+1. You should have a paragraph introducing the topic of your page below your `h1` element.
+
+1. You should have three `section` elements, each containing an `h2` element, a paragraph, and an `iframe` element.
+
+1. The three `iframe` elements should have a `src` attribute set to a valid video.
+
+1. Each `iframe` element should also have a `title` attribute to describe the embedded content, and a `height` attribute and a `width` attribute to set the element to a proper size.
diff --git a/fullstack-cert/html-projects/video-element-workshop/index.html b/fullstack-cert/html-projects/video-element-workshop/index.html
new file mode 100644
index 000000000..56c83fc45
--- /dev/null
+++ b/fullstack-cert/html-projects/video-element-workshop/index.html
@@ -0,0 +1,35 @@
+
+
+
+
+
+ Working with the HTML Video Element
+
+
+
Working with the HTML Video Element
+
+
+
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/bookmark-manager/index.html b/fullstack-cert/js-projects/bookmark-manager/index.html
new file mode 100644
index 000000000..e7b4568d1
--- /dev/null
+++ b/fullstack-cert/js-projects/bookmark-manager/index.html
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+ Bookmark Manager
+
+
+
+
+
+
+
';
+ }
+}
+
+viewCategoryButton.addEventListener("click", () => {
+ fillBookmarkList();
+ displayOrHideCategory();
+})
+
+closeListButton.addEventListener("click", displayOrHideCategory)
+
+const deleteBookmark = () => {
+ const radioBookmarks = document.querySelectorAll('input[type="radio"]');
+ for (const radioBookmark of radioBookmarks) {
+ if (radioBookmark.checked) {
+ const indexToRemove = bookmarks.findIndex(i => i.name == radioBookmark.value);
+ bookmarks.splice(indexToRemove, 1);
+ localStorage.setItem("bookmarks", JSON.stringify(bookmarks));
+ return
+ }
+ }
+}
+
+deleteBookmarkButton.addEventListener("click", () => {
+ deleteBookmark();
+ fillBookmarkList();
+})
diff --git a/fullstack-cert/js-projects/bookmark-manager/styles.css b/fullstack-cert/js-projects/bookmark-manager/styles.css
new file mode 100644
index 000000000..a886afc23
--- /dev/null
+++ b/fullstack-cert/js-projects/bookmark-manager/styles.css
@@ -0,0 +1,98 @@
+:root {
+ --light-grey: #f5f6f7;
+ --dark-grey: #0a0a23;
+ --yellow: #f1be32;
+ --golden-yellow: #feac32;
+}
+
+*,
+*::before,
+*::after {
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
+}
+
+main {
+ display: flex;
+ justify-content: center;
+}
+
+body {
+ background-color: var(--dark-grey);
+}
+
+.hidden {
+ display: none;
+}
+
+section {
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+}
+
+select,
+input,
+label {
+ margin-left: 10px;
+}
+
+div {
+ padding: 30px;
+ display: flex;
+ justify-content: center;
+}
+
+.close-form-button {
+ background: none;
+ border: none;
+ cursor: pointer;
+}
+
+.close-icon {
+ width: 20px;
+ height: 20px;
+}
+
+h1, h2 {
+ margin-top: 20px;
+ text-align: center;
+}
+
+#category-list {
+ text-align: center;
+ display: flex;
+ flex-direction: column;
+ justify-content: flex-start;
+}
+
+#category-list,
+h1,
+h2,
+label {
+ color: var(--light-grey);
+}
+
+button {
+ cursor: pointer;
+ padding: 5px;
+ width: 100px;
+ margin: 10px;
+ color: var(--dark-grey);
+ background-color: var(--golden-yellow);
+ background-image: linear-gradient(#fecc4c, #ffac33);
+ border-color: var(--golden-yellow);
+ border-width: 3px;
+}
+
+button:hover {
+ background-image: linear-gradient(#ffcc4c, #f89808);
+}
+
+section {
+ margin-top: 60px;
+ border: 2px solid var(--golden-yellow);
+ width: fit-content;
+ border-radius: 10px;
+}
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/bookmark-manager/user-stories.md b/fullstack-cert/js-projects/bookmark-manager/user-stories.md
new file mode 100644
index 000000000..2490960e1
--- /dev/null
+++ b/fullstack-cert/js-projects/bookmark-manager/user-stories.md
@@ -0,0 +1,14 @@
+1. You should complete the Bookmark Manager app to handle the bookmark objects contained in a `bookmarks` array, which is stored in the local storage.
+1. Each bookmark object should have three keys: `name`, `category`, and `url`.
+1. You should have a function named `displayOrCloseForm` that toggles the `hidden` class on `#main-section` and `#form-section`.
+1. When you click `#add-bookmark-button`, you should update the inner text of `.category-name` to be the value of the selected option from `#category-dropdown` and call `displayOrCloseForm` to display the form section and hide the main section.
+1. When you click `#close-form-button`, you should run your function to hide the form section and display the main section.
+1. When you click `#add-bookmark-button-form`, you should update the `bookmarks` key stored in the local storage by adding a bookmark object to the end of the array. The object should have `name` set to the value of the `#name` input, `category` set to the value of the selected option from the category dropdown, and `url` set to the value of the `#url` input.
+1. Once the `bookmarks` key is updated, you should reset the value of `#name` and `#url` to an empty string before running your function to hide the form section and show the main section.
+1. You should have a function named `displayOrHideCategory` that toggles the `hidden` class on `#main-section` and `#bookmark-list-section`.
+1. When you click `#view-category-button`, you should update the inner text of `.category-name` to be the value of the selected option from `#category-dropdown`, modify the inner HTML of `#category-list` according to the user stories below, and call the `displayOrHideCategory` function.
+1. If none of the bookmarks in local storage have the category, you should add a `p` element with the text `No Bookmarks Found` to `#category-list`'s inner HTML.
+1. If one or more bookmarks in local storage have the selected category, you should add a radio button having the `id` and `value` attributes set to the bookmark name for each bookmark in the category.
+Each radio button should have a corresponding label containing an anchor element with the bookmark name and the `href` attribute set to the bookmark URL.
+1. When you click `#close-list-button`, you should hide `#bookmark-list-section` and display the main section.
+1. When you click `#delete-bookmark-button`, you should delete the bookmark corresponding to the selected radio button from the local storage and update the displayed bookmark list.
diff --git a/fullstack-cert/js-projects/cash-register/script.js b/fullstack-cert/js-projects/cash-register/script.js
new file mode 100644
index 000000000..24dd7234a
--- /dev/null
+++ b/fullstack-cert/js-projects/cash-register/script.js
@@ -0,0 +1,53 @@
+const denom = [
+ { name: "ONE HUNDRED", val: 100 },
+ { name: "TWENTY", val: 20 },
+ { name: "TEN", val: 10 },
+ { name: "FIVE", val: 5 },
+ { name: "ONE", val: 1 },
+ { name: "QUARTER", val: 0.25 },
+ { name: "DIME", val: 0.1 },
+ { name: "NICKEL", val: 0.05 },
+ { name: "PENNY", val: 0.01 },
+ ];
+
+ function checkCashRegister(price, cash, cid) {
+ const output = { status: null, change: [] };
+ let change = cash - price;
+ const register = cid.reduce(
+ function (acc, curr) {
+ acc.total += curr[1];
+ acc[curr[0]] = curr[1];
+ return acc;
+ },
+ { total: 0 }
+ );
+ if (register.total === change) {
+ output.status = "CLOSED";
+ output.change = cid;
+ return output;
+ }
+ if (register.total < change) {
+ output.status = "INSUFFICIENT_FUNDS";
+ return output;
+ }
+ const change_arr = denom.reduce(function (acc, curr) {
+ let value = 0;
+ while (register[curr.name] > 0 && change >= curr.val) {
+ change -= curr.val;
+ register[curr.name] -= curr.val;
+ value += curr.val;
+ change = Math.round(change * 100) / 100;
+ }
+ if (value > 0) {
+ acc.push([curr.name, value]);
+ }
+ return acc;
+ }, []);
+ if (change_arr.length < 1 || change > 0) {
+ output.status = "INSUFFICIENT_FUNDS";
+ return output;
+ }
+ output.status = "OPEN";
+ output.change = change_arr;
+ return output;
+ }
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/cash-register/user-stories.md b/fullstack-cert/js-projects/cash-register/user-stories.md
new file mode 100644
index 000000000..2288d7efb
--- /dev/null
+++ b/fullstack-cert/js-projects/cash-register/user-stories.md
@@ -0,0 +1,23 @@
+1. You should create a cash register drawer function `checkCashRegister()` that accepts purchase price as the first argument (`price`), payment as the second argument (`cash`), and cash-in-drawer (`cid`, which is is a 2D array listing available currency) as the third argument.
+1. The `checkCashRegister()` function should always return an object with a `status` key and a `change` key.
+1. If cash-in-drawer is less than the change due, or if you cannot return the exact change, the function should return `{status: "INSUFFICIENT_FUNDS", change: []}`.
+1. If the cash-in-drawer is equal to the change due, the function should return `{status: "CLOSED", change: [...]}` with cash-in-drawer as the value for the key `change`.
+1. Otherwise, the function should return `{status: "OPEN", change: [...]}`, with the change due in coins and bills, sorted in highest to lowest order, as the value of the `change` key.
+
+
Currency Unit
Amount
Penny
$0.01 (PENNY)
Nickel
$0.05 (NICKEL)
Dime
$0.1 (DIME)
Quarter
$0.25 (QUARTER)
Dollar
$1 (ONE)
Five Dollars
$5 (FIVE)
Ten Dollars
$10 (TEN)
Twenty Dollars
$20 (TWENTY)
One-hundred Dollars
$100 (ONE HUNDRED)
+
+See below for an example of a cash-in-drawer array:
+
+```js
+[
+ ["PENNY", 1.01],
+ ["NICKEL", 2.05],
+ ["DIME", 3.1],
+ ["QUARTER", 4.25],
+ ["ONE", 90],
+ ["FIVE", 55],
+ ["TEN", 20],
+ ["TWENTY", 60],
+ ["ONE HUNDRED", 100]
+]
+```
diff --git a/fullstack-cert/js-projects/dates-lab/script.js b/fullstack-cert/js-projects/dates-lab/script.js
new file mode 100644
index 000000000..cb0f3fb13
--- /dev/null
+++ b/fullstack-cert/js-projects/dates-lab/script.js
@@ -0,0 +1,22 @@
+const currentDate = new Date();
+const currentDateFormat = `Current Date and Time: ${currentDate}`;
+console.log(currentDateFormat);
+
+function formatDateMMDDYYYY(date) {
+ const month = date.getMonth() + 1;
+ const day = date.getDate();
+ const year = date.getFullYear();
+ return `${month}/${day}/${year}`;
+}
+const shortDateFormat = `Formatted Date (MM/DD/YYYY): ${formatDateMMDDYYYY(currentDate)}`;
+console.log(shortDateFormat);
+
+function formatDateLong(date) {
+ return date.toLocaleDateString(undefined, {
+ year: 'numeric',
+ month: 'long',
+ day: 'numeric'
+ });
+}
+const longDateFormat = `Formatted Date (Month Day, Year): ${formatDateLong(currentDate)}`;
+console.log(longDateFormat);
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/dates-lab/user-stories.md b/fullstack-cert/js-projects/dates-lab/user-stories.md
new file mode 100644
index 000000000..3836ff95e
--- /dev/null
+++ b/fullstack-cert/js-projects/dates-lab/user-stories.md
@@ -0,0 +1,9 @@
+1. You should create a variable named `currentDate` and assign it the current date and time using the `Date` object.
+1. You should create a variable named `currentDateFormat` and assign it the string `Current Date and Time: [current date]`. Replace `[current date]` with the result of the `currentDate` variable.
+1. You should create a function named `formatDateMMDDYYYY` that takes a parameter. You can name this parameter whatever you like.
+1. Your `formatDateMMDDYYYY` function should return a string that formats the date in a `month/day/year` format. You can review the previous lecture videos to help you with which date methods to use in constructing your string.
+1. You should create a variable named `shortDateFormat` and assign it the string `Formatted Date (MM/DD/YYYY): [formatted date]`. Replace `[formatted date]` with the result of calling your `formatDateMMDDYYYY` function with the `currentDate` variable.
+1. You should create a function named `formatDateLong` that takes a parameter. You can name this parameter whatever you like.
+1. Your `formatDateLong` function should return a string that formats the date in a `Month Day, Year` format. You can review the previous lecture videos on the different ways to format dates.
+1. You should create a variable named `longDateFormat` and assign it the string `Formatted Date (Month Day, Year): [formatted date]`. Replace `[formatted date]` with the result of calling your `formatDateLong` function with the `currentDate` variable.
+1. You should log the value of `currentDateFormat`, `shortDateFormat` and `longDateFormat` to the console.
diff --git a/fullstack-cert/js-projects/depth-first-search/script.js b/fullstack-cert/js-projects/depth-first-search/script.js
new file mode 100644
index 000000000..064968c6d
--- /dev/null
+++ b/fullstack-cert/js-projects/depth-first-search/script.js
@@ -0,0 +1,28 @@
+function dfs(graph, root) {
+ const stack = [];
+ let tempV;
+ const visited = [];
+ let tempVNeighbors = [];
+ stack.push(root);
+ while (stack.length > 0) {
+ tempV = stack.pop();
+ if (visited.indexOf(tempV) == -1) {
+ visited.push(tempV);
+ tempVNeighbors = graph[tempV];
+ for (let i = 0; i < tempVNeighbors.length; i++) {
+ if (tempVNeighbors[i] == 1) {
+ stack.push(i);
+ }
+ }
+ }
+ }
+ return visited;
+}
+
+const exDFSGraph = [
+ [0, 1, 0, 0],
+ [1, 0, 1, 0],
+ [0, 1, 0, 1],
+ [0, 0, 1, 0]
+];
+console.log(dfs(exDFSGraph, 0));
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/depth-first-search/user-stories.md b/fullstack-cert/js-projects/depth-first-search/user-stories.md
new file mode 100644
index 000000000..022201607
--- /dev/null
+++ b/fullstack-cert/js-projects/depth-first-search/user-stories.md
@@ -0,0 +1,5 @@
+1. You should write a function `dfs()` that implements the depth-first search algorithm on a graph. Starting from a root node, the search first goes down a path of edges as far as it can. Once it reaches one end of a path, the search will backtrack to the last node with an un-visited edge path and continue searching down the un-visited edge path.
+1. The function should keep track of the visited nodes.
+1. The function should use a stack, an array where the last element added is the first to be removed, to make sure to visit the neighbors of the most recently added node.
+1. The function should take an undirected, adjacency matrix `graph` and a node label `root` as parameters. The node label is the numeric value of the node between `0` and `n - 1`, where `n` is the total number of nodes in the graph.
+1. The function should output an array of all nodes reachable from `root`.
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/drum-machine/index.html b/fullstack-cert/js-projects/drum-machine/index.html
new file mode 100644
index 000000000..44733035a
--- /dev/null
+++ b/fullstack-cert/js-projects/drum-machine/index.html
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+ Drum Machine
+
+
+
+
+
+
+
+
+
+
Power: On
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Bank: Heater Kit
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/drum-machine/script.js b/fullstack-cert/js-projects/drum-machine/script.js
new file mode 100644
index 000000000..a21a8ebc8
--- /dev/null
+++ b/fullstack-cert/js-projects/drum-machine/script.js
@@ -0,0 +1,222 @@
+const projectName = "drum-machine";
+
+const bankOne = [
+ {
+ keyCode: 81,
+ keyTrigger: "Q",
+ id: "Heater-1",
+ url: "https://cdn.freecodecamp.org/curriculum/drum/Heater-1.mp3"
+ },
+ {
+ keyCode: 87,
+ keyTrigger: "W",
+ id: "Heater-2",
+ url: "https://cdn.freecodecamp.org/curriculum/drum/Heater-2.mp3"
+ },
+ {
+ keyCode: 69,
+ keyTrigger: "E",
+ id: "Heater-3",
+ url: "https://cdn.freecodecamp.org/curriculum/drum/Heater-3.mp3"
+ },
+ {
+ keyCode: 65,
+ keyTrigger: "A",
+ id: "Heater-4",
+ url: "https://cdn.freecodecamp.org/curriculum/drum/Heater-4_1.mp3"
+ },
+ {
+ keyCode: 83,
+ keyTrigger: "S",
+ id: "Clap",
+ url: "https://cdn.freecodecamp.org/curriculum/drum/Heater-6.mp3"
+ },
+ {
+ keyCode: 68,
+ keyTrigger: "D",
+ id: "Open-HH",
+ url: "https://cdn.freecodecamp.org/curriculum/drum/Dsc_Oh.mp3"
+ },
+ {
+ keyCode: 90,
+ keyTrigger: "Z",
+ id: "Kick-n'-Hat",
+ url: "https://cdn.freecodecamp.org/curriculum/drum/Kick_n_Hat.mp3"
+ },
+ {
+ keyCode: 88,
+ keyTrigger: "X",
+ id: "Kick",
+ url: "https://cdn.freecodecamp.org/curriculum/drum/RP4_KICK_1.mp3"
+ },
+ {
+ keyCode: 67,
+ keyTrigger: "C",
+ id: "Closed-HH",
+ url: "https://cdn.freecodecamp.org/curriculum/drum/Cev_H2.mp3"
+ }
+];
+
+const bankTwo = [
+ {
+ keyCode: 81,
+ keyTrigger: "Q",
+ id: "Chord-1",
+ url: "https://cdn.freecodecamp.org/curriculum/drum/Chord_1.mp3"
+ },
+ {
+ keyCode: 87,
+ keyTrigger: "W",
+ id: "Chord-2",
+ url: "https://cdn.freecodecamp.org/curriculum/drum/Chord_2.mp3"
+ },
+ {
+ keyCode: 69,
+ keyTrigger: "E",
+ id: "Chord-3",
+ url: "https://cdn.freecodecamp.org/curriculum/drum/Chord_3.mp3"
+ },
+ {
+ keyCode: 65,
+ keyTrigger: "A",
+ id: "Shaker",
+ url: "https://cdn.freecodecamp.org/curriculum/drum/Give_us_a_light.mp3"
+ },
+ {
+ keyCode: 83,
+ keyTrigger: "S",
+ id: "Open-HH",
+ url: "https://cdn.freecodecamp.org/curriculum/drum/Dry_Ohh.mp3"
+ },
+ {
+ keyCode: 68,
+ keyTrigger: "D",
+ id: "Closed-HH",
+ url: "https://cdn.freecodecamp.org/curriculum/drum/Bld_H1.mp3"
+ },
+ {
+ keyCode: 90,
+ keyTrigger: "Z",
+ id: "Punchy-Kick",
+ url: "https://cdn.freecodecamp.org/curriculum/drum/punchy_kick_1.mp3"
+ },
+ {
+ keyCode: 88,
+ keyTrigger: "X",
+ id: "Side-Stick",
+ url: "https://cdn.freecodecamp.org/curriculum/drum/side_stick_1.mp3"
+ },
+ {
+ keyCode: 67,
+ keyTrigger: "C",
+ id: "Snare",
+ url: "https://cdn.freecodecamp.org/curriculum/drum/Brk_Snr.mp3"
+ }
+];
+
+const state = {
+ power: true,
+ display: " ",
+ currentPadBank: bankOne,
+ currentPadBankId: "Heater Kit",
+ sliderVal: 0.3
+};
+
+const display = document.getElementById("display");
+
+const setDisplay = (text) => {
+ state.display = text;
+ display.innerText = text;
+};
+
+const adjustVolume = (e) => {
+ if (state.power) {
+ state.sliderVal = e.target.value;
+ setDisplay(`Volume: ${Math.round(e.target.value * 100)}`);
+ setTimeout(() => setDisplay(" "), 1000);
+ document.querySelectorAll(".clip").forEach((sound) => {
+ sound.volume = state.sliderVal;
+ });
+ }
+};
+
+const activatePad = (pad) => {
+ pad.classList.add("active");
+ setTimeout(() => pad.classList.remove("active"), 100);
+};
+
+const playSound = (id, name) => {
+ if (!state.power) return;
+
+ const sound = document.getElementById(id);
+ sound.currentTime = 0;
+ sound.play();
+ activatePad(sound.parentNode);
+ setDisplay(name);
+};
+
+const renderPadBank = () => {
+ const padBank = document.querySelector(".pad-bank");
+ padBank.innerHTML = "";
+
+ state.currentPadBank.forEach((drum) => {
+ const pad = document.createElement("div");
+ pad.classList.add("drum-pad");
+ pad.id = drum.id;
+ pad.innerText = drum.keyTrigger;
+
+ const audio = document.createElement("audio");
+ audio.classList.add("clip");
+ audio.id = drum.keyTrigger;
+ audio.src = drum.url;
+ pad.appendChild(audio);
+
+ pad.addEventListener("click", () =>
+ playSound(drum.keyTrigger, drum.id.replace(/-/g, " "))
+ );
+ document.addEventListener("keydown", (e) => {
+ if (e.key === drum.keyTrigger.toLowerCase())
+ playSound(drum.keyTrigger, drum.id.replace(/-/g, " "));
+ });
+
+ padBank.appendChild(pad);
+ });
+};
+
+const powerControl = () => {
+ state.power = !state.power;
+ document.getElementById("power-status").textContent = state.power
+ ? "On"
+ : "Off";
+
+ setDisplay("");
+
+ const powerSlider = document.querySelector(".power-control .select .inner");
+ powerSlider.style.left = state.power ? "calc(100% - 18px)" : "0";
+};
+
+const selectBank = () => {
+ if (!state.power) return;
+ setDisplay(" ");
+ state.currentPadBank =
+ state.currentPadBankId === "Heater Kit" ? bankTwo : bankOne;
+ state.currentPadBankId =
+ state.currentPadBankId === "Heater Kit" ? "Smooth Piano Kit" : "Heater Kit";
+
+ renderPadBank();
+ document.getElementById("current-bank").textContent =
+ state.currentPadBankId === "Heater Kit" ? "Heater Kit" : "Smooth Piano Kit";
+ const bankControl = document.querySelector(".bank-control .select .inner");
+ bankControl.style.left =
+ state.currentPadBankId === "Heater Kit" ? "calc(100% - 18px)" : "0";
+};
+
+document
+ .querySelector(".power-control")
+ .addEventListener("click", powerControl);
+document.querySelector(".bank-control").addEventListener("click", selectBank);
+document
+ .querySelector(".volume-slider input")
+ .addEventListener("input", adjustVolume);
+
+renderPadBank();
diff --git a/fullstack-cert/js-projects/drum-machine/styles.css b/fullstack-cert/js-projects/drum-machine/styles.css
new file mode 100644
index 000000000..9085d6045
--- /dev/null
+++ b/fullstack-cert/js-projects/drum-machine/styles.css
@@ -0,0 +1,112 @@
+/* General Reset */
+* {
+ box-sizing: border-box;
+ margin: 0;
+ padding: 0;
+}
+
+body {
+ font-family: "Arial", sans-serif;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ min-height: 100vh;
+ background-color: #282c34;
+ color: white;
+}
+
+.inner-container {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ background: #3b3b5f;
+ border-radius: 8px;
+ padding: 20px;
+ width: 300px;
+}
+
+/* Drum Pad Styles */
+.pad-bank {
+ display: grid;
+ grid-template-columns: repeat(3, 1fr);
+ gap: 10px;
+ margin-bottom: 15px;
+}
+
+.drum-pad {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ width: 70px;
+ height: 70px;
+ background: #444;
+ border-radius: 5px;
+ font-size: 1.2em;
+ cursor: pointer;
+}
+
+.drum-pad.active {
+ background: #ffaa33;
+}
+
+.controls-container {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ width: 100%;
+}
+
+.control {
+ display: flex;
+ justify-content: space-between;
+ width: 100%;
+ margin: 10px 0;
+}
+
+.select {
+ width: 50px;
+ height: 20px;
+ background: #555;
+ border-radius: 10px;
+ cursor: pointer;
+ position: relative;
+}
+
+.select .inner {
+ position: absolute;
+ width: 18px;
+ height: 18px;
+ background: #ffaa33;
+ border-radius: 50%;
+ top: 1px;
+ left: calc(100% - 18px);
+}
+
+#display {
+ margin: 15px 0;
+ text-align: center;
+ font-size: 1em;
+ padding: 20px;
+ background: #444;
+ border-radius: 5px;
+ width: 100%;
+}
+
+.volume-slider input[type="range"] {
+ width: 100%;
+ -webkit-appearance: none;
+ appearance: none;
+ height: 4px;
+ background: #ffaa33;
+ border-radius: 2px;
+ margin-bottom: 10px;
+}
+
+.volume-slider input[type="range"]::-webkit-slider-thumb {
+ -webkit-appearance: none;
+ width: 12px;
+ height: 12px;
+ background: #fff;
+ border-radius: 50%;
+ cursor: pointer;
+}
diff --git a/fullstack-cert/js-projects/drum-machine/user-stories.md b/fullstack-cert/js-projects/drum-machine/user-stories.md
new file mode 100644
index 000000000..0796b077c
--- /dev/null
+++ b/fullstack-cert/js-projects/drum-machine/user-stories.md
@@ -0,0 +1,29 @@
+1. You should have a `div` element with an id of `drum-machine` that contains all other elements.
+
+2. Inside the `#drum-machine` element you should have another `div` with an id of `pad-bank`.
+
+3. You should have a `p` element with an id of `display`.
+
+4. You should have 9 clickable drum pad elements each with a class of `drum-pad`, a unique id that describes the audio clip the drum pad will be set up to trigger, and an inner text that corresponds to one of the following keys on the keyboard: `Q`, `W`, `E`, `A`, `S`, `D`, `Z`, `X`, `C`. The drum pads MUST be in this order.
+
+5. Each `.drum-pad` should have an audio element which has a class of `clip`, a `src` attribute that points to an audio clip, and an id corresponding to the inner text of its parent `.drum-pad` element (e.g. `id="Q"`, `id="W"`, `id="E"` etc.).
+
+6. When you click on a `.drum-pad` element, the audio clip contained in its child audio element should be triggered.
+
+7. When you press the trigger key associated with each `.drum-pad`, the audio clip contained in its child audio element should be triggered (e.g. pressing the `Q` key should trigger the drum pad which contains the string `Q`, pressing the `W` key should trigger the drum pad which contains the string `W`, etc.).
+
+8. When a `.drum-pad` is triggered, you should display a string describing the associated audio clip as the inner text of the `#display` element (each string must be unique).
+
+9. When you press the power button, the text inside the `#display` element should be replaced with a string indicating the power is off.
+
+Here are some audio samples you can use for your drum machine:
+
+[Heater 1](https://cdn.freecodecamp.org/curriculum/drum/Heater-1.mp3)
+[Heater 2](https://cdn.freecodecamp.org/curriculum/drum/Heater-2.mp3)
+[Heater 3](https://cdn.freecodecamp.org/curriculum/drum/Heater-3.mp3)
+[Heater 4](https://cdn.freecodecamp.org/curriculum/drum/Heater-4_1.mp3)
+[Clap](https://cdn.freecodecamp.org/curriculum/drum/Heater-6.mp3)
+[Open-HH](https://cdn.freecodecamp.org/curriculum/drum/Dsc_Oh.mp3)
+[Kick-n'-Hat](https://cdn.freecodecamp.org/curriculum/drum/Kick_n_Hat.mp3)
+[Kick](https://cdn.freecodecamp.org/curriculum/drum/RP4_KICK_1.mp3)
+[Closed-HH](https://cdn.freecodecamp.org/curriculum/drum/Cev_H2.mp3)
diff --git a/fullstack-cert/js-projects/emoji-reactor/index.html b/fullstack-cert/js-projects/emoji-reactor/index.html
new file mode 100644
index 000000000..78c57797a
--- /dev/null
+++ b/fullstack-cert/js-projects/emoji-reactor/index.html
@@ -0,0 +1,46 @@
+
+
+
+
+
+ Emoji Reactor
+
+
+
+
+
How are you feeling today?
+
+
+ Click on the buttons below to rate your emotions.
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/fullstack-cert/js-projects/emoji-reactor/script.js b/fullstack-cert/js-projects/emoji-reactor/script.js
new file mode 100644
index 000000000..7d5963f3f
--- /dev/null
+++ b/fullstack-cert/js-projects/emoji-reactor/script.js
@@ -0,0 +1,26 @@
+// maybe have a step where querySelector is used for the buttons
+// and explain why it doesn't work to select all buttons
+const btns = document.querySelectorAll(".emoji-btn");
+
+function updateCount(btn) {
+ // maybe have a step where they initially return just the btn. Then add a console.log
+ // and try clicking on the different buttons to see the results?
+ // return btn
+
+ const countEl = btn.querySelector(".count");
+ // maybe a good time to teach unary plus operator here? was brought up in lectures but
+ // might be a good refresher
+
+ // also maybe break this line up into multiple steps?
+ let currCount = +countEl.textContent.split("/")[0];
+
+ if (currCount === 10) return;
+
+ currCount++;
+
+ countEl.textContent = `${currCount}/10`;
+}
+
+// maybe have steps to initially add event listeners to each button separately?
+// Then we can have camper refactor the code to this solution instead
+btns.forEach((btn) => btn.addEventListener("click", () => updateCount(btn)));
diff --git a/fullstack-cert/js-projects/emoji-reactor/styles.css b/fullstack-cert/js-projects/emoji-reactor/styles.css
new file mode 100644
index 000000000..1d8663217
--- /dev/null
+++ b/fullstack-cert/js-projects/emoji-reactor/styles.css
@@ -0,0 +1,77 @@
+*,
+*::before,
+*::after {
+ box-sizing: border-box;
+ margin: 0;
+ padding: 0;
+}
+
+:root {
+ --light-grey: #efefef;
+ --white: #ffffff;
+ --very-dark-blue: #0a0a23;
+ --light-purple: #a78bfa;
+ --very-light-purple: #c4b5fd;
+ --purple: #8b5cf6;
+}
+
+body {
+ background-color: var(--very-dark-blue);
+ color: var(--light-grey);
+ font-family: sans-serif;
+}
+
+main {
+ text-align: center;
+ padding: 10px;
+}
+
+.btn-container,
+button {
+ display: flex;
+ justify-content: space-evenly;
+ align-items: center;
+}
+
+.btn-container {
+ flex-direction: column;
+}
+
+.emoji-btn {
+ width: 70%;
+ cursor: pointer;
+ color: var(--white);
+ background-color: var(--light-purple);
+ background-image: linear-gradient(
+ to bottom,
+ var(--very-light-purple),
+ var(--light-purple)
+ );
+ border: 3px solid var(--purple);
+ border-radius: 8px;
+ padding: 10px;
+ font-size: 1.5rem;
+ margin: 10px 0;
+ transition: background-color 0.3s ease, transform 0.2s ease;
+}
+
+@media (min-width: 768px) {
+ .emoji-btn {
+ width: 30%;
+ }
+}
+
+.emoji-btn:hover {
+ background-color: var(--purple);
+ background-image: none;
+}
+
+.title {
+ margin-top: 15px;
+ font-size: 2rem;
+}
+
+.description {
+ font-size: 1.4rem;
+ margin: 20px 0;
+}
diff --git a/fullstack-cert/js-projects/envelope-budget-app/index.html b/fullstack-cert/js-projects/envelope-budget-app/index.html
new file mode 100644
index 000000000..7df06ca7a
--- /dev/null
+++ b/fullstack-cert/js-projects/envelope-budget-app/index.html
@@ -0,0 +1,64 @@
+
+
+
+
+
+
+
+ Envelope Budgeter
+
+
+
+
+
+ `;
+
+ output.classList.remove("hide");
+}
+
+function getTotalFromInputs(list) {
+ let total = 0;
+
+ for (const item of list) {
+ const currVal = cleanInputString(item.value);
+ const invalidInputMatch = isInvalidInput(currVal);
+
+ if (invalidInputMatch) {
+ alert(`Invalid Input: ${invalidInputMatch[0]}`);
+ isError = true;
+ return null;
+ }
+ total += Number(currVal);
+ }
+ return total;
+}
+
+function clearForm() {
+ const inputContainers = Array.from(
+ document.querySelectorAll(".input-container")
+ );
+ for (const container of inputContainers) {
+ container.innerHTML = "";
+ }
+
+ incomeInput.value = "";
+ rentInput.value = "";
+ output.innerText = "";
+ output.classList.add("hide");
+}
+
+addEntryButton.addEventListener("click", addEntry);
+budgetForm.addEventListener("submit", calculateBudget);
+clearButton.addEventListener("click", clearForm);
diff --git a/fullstack-cert/js-projects/envelope-budget-app/styles.css b/fullstack-cert/js-projects/envelope-budget-app/styles.css
new file mode 100644
index 000000000..49321e651
--- /dev/null
+++ b/fullstack-cert/js-projects/envelope-budget-app/styles.css
@@ -0,0 +1,145 @@
+:root {
+ --light-grey: #f5f6f7;
+ --dark-blue: #0a0a23;
+ --fcc-blue: #1b1b32;
+ --light-yellow: #fecc4c;
+ --dark-yellow: #feac32;
+ --light-pink: #ffadad;
+ --dark-red: #850000;
+ --light-green: #acd157;
+}
+
+body {
+ font-family: "Lato", Helvetica, Arial, sans-serif;
+ font-size: 18px;
+ background-color: var(--fcc-blue);
+ color: var(--light-grey);
+ margin: 0;
+ padding: 0;
+ line-height: 1.5;
+}
+
+h1 {
+ text-align: center;
+ margin-top: 30px;
+ font-size: 2em;
+}
+
+.container {
+ width: 90%;
+ max-width: 680px;
+ margin: 20px auto;
+ padding: 20px;
+ background-color: var(--dark-blue);
+ border-radius: 8px;
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
+}
+
+label,
+legend {
+ font-weight: bold;
+ margin-bottom: 5px;
+}
+
+fieldset {
+ border: 1px solid var(--light-grey);
+ border-radius: 4px;
+ padding: 10px 15px;
+ margin-bottom: 20px;
+}
+
+legend {
+ padding: 0 8px;
+}
+
+.input-container {
+ display: flex;
+ flex-direction: column;
+ gap: 8px;
+ margin-top: 10px;
+}
+
+input,
+select,
+button {
+ font-size: 16px;
+ padding: 6px 10px;
+ border-radius: 4px;
+ border: 1px solid #ccc;
+ min-height: 32px;
+ box-sizing: border-box;
+}
+
+input:focus,
+select:focus,
+button:focus {
+ outline: 2px solid var(--light-yellow);
+ border-color: var(--dark-yellow);
+}
+
+button {
+ cursor: pointer;
+ text-decoration: none;
+ background-color: var(--light-yellow);
+ border: 2px solid var(--dark-yellow);
+ transition: background-color 0.2s ease, border 0.2s ease;
+}
+
+button:hover {
+ background-color: var(--dark-yellow);
+ color: white;
+}
+
+.controls {
+ margin-bottom: 20px;
+}
+
+.controls span {
+ display: flex;
+ align-items: center;
+ gap: 10px;
+ flex-wrap: wrap;
+}
+
+.output {
+ border: 2px solid var(--light-grey);
+ padding: 15px;
+ text-align: center;
+ background-color: var(--dark-blue);
+ border-radius: 6px;
+ margin-top: 20px;
+}
+
+.output span {
+ font-weight: bold;
+ font-size: 1.4em;
+}
+
+.surplus {
+ color: var(--light-green);
+}
+
+.deficit {
+ color: var(--light-pink);
+}
+
+.hide {
+ display: none;
+}
+
+@media (max-width: 600px) {
+ body {
+ font-size: 16px;
+ }
+
+ .controls span {
+ flex-direction: column;
+ align-items: stretch;
+ }
+
+ button,
+ input,
+ select {
+ width: 100%;
+ }
+}
diff --git a/fullstack-cert/js-projects/first-oop-lab/script.js b/fullstack-cert/js-projects/first-oop-lab/script.js
new file mode 100644
index 000000000..ecceb99b0
--- /dev/null
+++ b/fullstack-cert/js-projects/first-oop-lab/script.js
@@ -0,0 +1,76 @@
+const projectStatus = {
+ PENDING: { description: "Pending Execution" },
+ SUCCESS: { description: "Executed Successfully" },
+ FAILURE: { description: "Execution Failed" },
+};
+
+class ProjectIdea {
+ constructor(title, description) {
+ this.title = title;
+ this.description = description;
+ this.status = projectStatus.PENDING;
+ }
+
+ updateProjectStatus(newStatus) {
+ this.status = newStatus;
+ }
+}
+
+class ProjectIdeaBoard {
+ constructor(title) {
+ this.title = title;
+ this.ideas = [];
+ }
+
+ pin(newIdea) {
+ this.ideas.push(newIdea);
+ }
+
+ unpin(idea) {
+ this.ideas.splice(this.ideas.indexOf(idea), 1);
+ }
+
+ count() {
+ return this.ideas.length;
+ }
+
+ toString() {
+ let representation = `${this.title} has ${this.count()} idea${this.count() > 1 ? "s" : ""} ->\n`;
+
+ this.ideas.forEach(
+ (idea) =>
+ (representation += `${idea.title} (${idea.status.description}) - ${idea.description}\n`),
+ );
+ return representation;
+ }
+}
+
+let windowLocks = new ProjectIdea(
+ "Smart Window Locks",
+ "An automation project allowing users to lock, unlock windows automatically based on weather conditions.",
+);
+
+let breakfastChef = new ProjectIdea(
+ "Breakfast Chef Robot",
+ "A robot that can follow a given list of instructions and prepare breakfast for the user and let them know through their phone.",
+);
+breakfastChef.updateProjectStatus(projectStatus.FAILURE);
+
+let usedVideoGamesStore = new ProjectIdea(
+ "Online Used Video Games Store",
+ "An online platform where users can buy second hand physical copies of video games from other users.",
+);
+usedVideoGamesStore.updateProjectStatus(projectStatus.SUCCESS);
+
+let hardwareProjectIdeas = new ProjectIdeaBoard("Hardware Project Board");
+hardwareProjectIdeas.pin(windowLocks);
+hardwareProjectIdeas.pin(breakfastChef);
+
+let softwareProjectIdeas = new ProjectIdeaBoard("Software Project Board");
+softwareProjectIdeas.pin(usedVideoGamesStore);
+
+console.log(softwareProjectIdeas.toString());
+
+console.log(hardwareProjectIdeas.toString());
+hardwareProjectIdeas.unpin(breakfastChef);
+console.log(hardwareProjectIdeas.toString());
diff --git a/fullstack-cert/js-projects/first-oop-lab/user-stories.md b/fullstack-cert/js-projects/first-oop-lab/user-stories.md
new file mode 100644
index 000000000..fdd71cd9b
--- /dev/null
+++ b/fullstack-cert/js-projects/first-oop-lab/user-stories.md
@@ -0,0 +1,19 @@
+You should define a object constant named `projectStatus` with the different project statuses you want to have such as `PENDING`, `SUCCESS`, or `FAILURE` with your preferred descriptions.
+
+You should define a class named `ProjectIdea` with a `constructor` that takes a `title` and a `description`, both strings. The class should also have a property named `status` also of type string.
+
+You should define a method named `updateProjectStatus` inside the `ProjectIdea` class that takes accepts a string `newStatus` as parameter and can update the project idea status.
+
+You should define a `ProjectIdeaBoard` class with a `constructor` that accepts a string `title` and initializes an empty array named `ideas` to hold instances of the `ProjectIdea` class.
+
+You should define a method named `pin` inside the `ProjectIdeaBoard` class that accepts an instance of the `ProjectIdea` class and pushes the given instance to the `ideas` array.
+
+You should define a method named `unpin` inside the `ProjectIdeaBoard` class that accepts an instance of the `ProjectIdea` class and removes the given instance from the `ideas` array.
+
+You should define a method named `count` that returns the number of project ideas in a given project idea board object.
+
+You should define a method named `toString` that returns the name of the projects ideas, their description and status as a nicely formatted string.
+
+You should create one or more instance of the `ProjectIdeaBoard` class.
+
+You should create one or more instance of the `ProjectIdea` class and `pin` each of them to any one of the `ProjectIdeaBoard` instances.
diff --git a/fullstack-cert/js-projects/form-validation-lab/index.html b/fullstack-cert/js-projects/form-validation-lab/index.html
new file mode 100644
index 000000000..09a9dbdcb
--- /dev/null
+++ b/fullstack-cert/js-projects/form-validation-lab/index.html
@@ -0,0 +1,98 @@
+
+
+
+
+ Customer Complaint Form
+
+
+
+
+
+
+
Complaint Form
+
+
+
+
+
+
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/form-validation-lab/script.js b/fullstack-cert/js-projects/form-validation-lab/script.js
new file mode 100644
index 000000000..554f4f850
--- /dev/null
+++ b/fullstack-cert/js-projects/form-validation-lab/script.js
@@ -0,0 +1,125 @@
+const form = document.getElementById("form");
+const fullName = document.getElementById("full-name");
+const emailAddress = document.getElementById("email");
+const orderNo = document.getElementById("order-no");
+const productCode = document.getElementById("product-code");
+const quantity = document.getElementById("quantity");
+const complaints = document.querySelectorAll('input[name="complaint"]');
+const complaintDescription = document.getElementById("complaint-description");
+const complaintTextAreaDiv = document.getElementById("complaint-description-container");
+const solutions = document.querySelectorAll('input[name="solutions"]');
+const solutionDescription = document.getElementById("solution-description");
+const solutionTextAreaDiv = document.getElementById("solution-description-container");
+const submitBtn = document.getElementById("submit-btn");
+const messageBox = document.getElementById("message-box");
+const clearBtn = document.getElementById("clear-btn");
+
+const hideTextareas = () => {
+ complaintTextAreaDiv.style.display = "none";
+ solutionTextAreaDiv.style.display = "none";
+}
+
+hideTextareas();
+
+const formFields = {
+ "full-name": fullName,
+ "email": emailAddress,
+ "order-no": orderNo,
+ "product-code": productCode,
+ "quantity": quantity,
+ "complaints-group": Array.from(complaints),
+ "complaint-description": complaintDescription,
+ "solutions-group": Array.from(solutions),
+ "solution-description": solutionDescription
+}
+
+const clearForm = () => {
+ Object.entries(formFields).forEach(entry => {
+ const [key, val] = entry;
+ if (Array.isArray(val)) {
+ val.forEach(i => i.checked = false);
+ } else {
+ val.value = "";
+ }
+ hideTextareas();
+ messageBox.innerText = "";
+ document.getElementById(key).style.borderColor = "rgb(118, 118, 118)";
+ })
+}
+
+const validateForm = () => {
+ const complaintsArr = Array.from(complaints).map(i => i.checked);
+ const solutionsArr = Array.from(solutions).map(i => i.checked);
+ const validationObject = {
+ "full-name": Boolean(fullName.value.trim()),
+ "email": /^\S+@\S+\.\S+$/.test(emailAddress.value.trim()),
+ "order-no": /^2024\d{6}$/.test(orderNo.value.trim()),
+ "product-code": /[A-Z]{2}\d{2}-[A-Z]\d{3}-[A-Z]{2}\d/i.test(productCode.value.trim()),
+ "quantity": Number(quantity.value.trim()) > 0,
+ "complaints-group": complaintsArr.some(i => i),
+ "complaint-description": null,
+ "solutions-group": solutionsArr.some(i => i),
+ "solution-description": null
+ }
+
+ if (complaintsArr[3]) {
+ complaintTextAreaDiv.style.display = "block";
+ const complaintsDescriptionVal = complaintDescription.value.trim();
+ if (complaintsDescriptionVal.length < 20) {
+ validationObject["complaint-description"] = false;
+ } else {
+ validationObject["complaint-description"] = true;
+ }
+ } else {
+ complaintTextAreaDiv.style.display = "none";
+ }
+ if (solutionsArr[2]) {
+ solutionTextAreaDiv.style.display = "block";
+ const solutionDescriptionVal = solutionDescription.value.trim();
+ if (solutionDescriptionVal.length < 20) {
+ validationObject["solution-description"] = false;
+ } else {
+ validationObject["solution-description"] = true;
+ }
+ } else {
+ solutionTextAreaDiv.style.display = "none";
+ }
+ if (validationObject["complaint-description"] === null) delete validationObject["complaint-description"];
+ if (validationObject["solution-description"] === null) delete validationObject["solution-description"];
+
+ return validationObject;
+}
+
+clearBtn.addEventListener("click", clearForm);
+
+Object.keys(formFields).forEach(key => {
+ document.getElementById(key).addEventListener("change", (e) => {
+ const validationObject = validateForm();
+ if (Object.values(validationObject).every(val => val)) messageBox.innerText = "";
+ if (!validationObject[key]) {
+ document.getElementById(key).style.borderColor = "red";
+ } else {
+ document.getElementById(key).style.borderColor = "green";
+ }
+ });
+});
+
+form.addEventListener("submit", (e) => {
+ e.preventDefault();
+ const validationObject = validateForm();
+ const isValid = Object.values(validationObject).every(i => i);
+ if (!isValid) {
+ messageBox.innerText = "Please, fill out the required fields correctly before submitting.";
+ Object.keys(validationObject).forEach(key => {
+ if (!validationObject[key]) {
+ document.getElementById(key).style.borderColor = "red";
+ } else {
+ document.getElementById(key).style.borderColor = "green";
+ }
+ });
+ } else {
+ messageBox.innerText = "";
+ alert("Form successfully submitted.");
+ location.reload()
+ }
+});
diff --git a/fullstack-cert/js-projects/form-validation-lab/styles.css b/fullstack-cert/js-projects/form-validation-lab/styles.css
new file mode 100644
index 000000000..935970ee7
--- /dev/null
+++ b/fullstack-cert/js-projects/form-validation-lab/styles.css
@@ -0,0 +1,46 @@
+* {
+ box-sizing: border-box;
+}
+
+h1 {
+ text-align: center;
+}
+
+#form {
+ max-width: 70%;
+ margin: auto;
+ border-radius: 10px;
+ box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
+ padding: 10px;
+}
+
+input {
+ border-color: rgb(118, 118, 118);
+}
+
+#personal-info input, #product-info input {
+ width: 100%;
+ margin-bottom: 10px;
+}
+
+
+fieldset {
+ margin-bottom: 10px;
+ border-radius: 5px;
+ border-color: rgb(118, 118, 118);
+}
+
+textarea {
+ width: 100%;
+ border-color: rgb(118, 118, 118);
+}
+
+#btn-container {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+}
+
+#submit-btn, #clear-btn {
+ margin: 10px 15px 0;
+}
diff --git a/fullstack-cert/js-projects/form-validation-lab/user-stories.md b/fullstack-cert/js-projects/form-validation-lab/user-stories.md
new file mode 100644
index 000000000..4df0f5d4a
--- /dev/null
+++ b/fullstack-cert/js-projects/form-validation-lab/user-stories.md
@@ -0,0 +1,17 @@
+For this lab, you have been provided with all the HTML and CSS. You will use JavaScript to validate the complaint form.
+
+1. When the form is submitted, you should ensure that `#full-name` is not empty.
+1. When the form is submitted, you should ensure that `#email` is a valid email address format.
+1. When the form is submitted, you should ensure that `#order-no` is a sequence of ten numbers starting with `2024`.
+1. When the form is submitted, you should ensure that `#product-code` follows the pattern `XX##-X###-XX#`, where `X` represents either a lowercase letter or an uppercase letter and `#` represents a number.
+1. When the form is submitted, you should ensure that `#quantity` is a positive integer.
+1. When the form is submitted, you should ensure that at least one checkbox from `#complaints-group` is checked.
+1. When the form is submitted, you should ensure that `#complaint-description` contains at least twenty characters if the `Other` checkbox is checked.
+1. When the form is submitted, you should ensure that a radio button from `#solutions-group` is selected.
+1. When the form is submitted, you should ensure that `#solution-description` contains at least twenty characters if the `Other` radio button is selected.
+1. Once a form field is filled with a valid value, you should set its border color to `green`. In case of checkbox and radio button groups, you should set the border color of the parent `fieldset`.
+1. Once a form field is filled with an invalid value, you should set its border color to `red`. In case of checkbox and radio button groups, you should set the border color of the parent `fieldset`.
+1. When you click the submit button, if the form has any invalid field, you should set the inner text of `#message-box` to `Please, fill out the required fields correctly before submitting.`
+1. When you click the submit button, if the form has any invalid field, each invalid field should be highlighted by setting the border color of each invalid input, textarea or fieldset (in case of checkbox and radio button groups) to `red`.
+1. When each form field is valid, you should reset the inner text of `#message-box` to an empty string.
+1. When you click the submit button, if the form is filled correctly, you should display an alert saying `Form successfully submitted.`
diff --git a/fullstack-cert/js-projects/fortune-teller-app/script.js b/fullstack-cert/js-projects/fortune-teller-app/script.js
new file mode 100644
index 000000000..65dd6b149
--- /dev/null
+++ b/fullstack-cert/js-projects/fortune-teller-app/script.js
@@ -0,0 +1,23 @@
+const fortune1 = "Your cat will look very cuddly today.";
+const fortune2 = "The weather will be nice tomorrow.";
+const fortune3 = "Be cautious of your new neighbours.";
+const fortune4 = "You will find a new hobby soon.";
+const fortune5 = "It would be wise to avoid the colour red today.";
+
+let randomNumber = Math.floor(Math.random() * 5) + 1;
+
+let selectedFortune;
+
+if (randomNumber === 1) {
+ selectedFortune = fortune1;
+} else if (randomNumber === 2) {
+ selectedFortune = fortune2;
+} else if (randomNumber === 3) {
+ selectedFortune = fortune3;
+} else if (randomNumber === 4) {
+ selectedFortune = fortune4;
+} else {
+ selectedFortune = fortune5;
+}
+
+console.log(selectedFortune);
diff --git a/fullstack-cert/js-projects/fortune-teller-app/user-stories.md b/fullstack-cert/js-projects/fortune-teller-app/user-stories.md
new file mode 100644
index 000000000..815d7bbb1
--- /dev/null
+++ b/fullstack-cert/js-projects/fortune-teller-app/user-stories.md
@@ -0,0 +1,9 @@
+1. You should declare five variables, each with a string value that describes a fortune.
+1. You should select a random number between 1 and 5, inclusive, and assign it to the variable `randomNumber`.
+You should use an `if/else if` statements to print a different fortune based on the value of `randomNumber`:
+ - If `randomNumber` is 1, print the first fortune.
+ - If `randomNumber` is 2, print the second fortune.
+ - If `randomNumber` is 3, print the third fortune.
+ - If `randomNumber` is 4, print the fourth fortune.
+ - If `randomNumber` is 5, print the fifth fortune.
+1. You should log the fortune to the console.
diff --git a/fullstack-cert/js-projects/forum-leaderboard/index.html b/fullstack-cert/js-projects/forum-leaderboard/index.html
new file mode 100644
index 000000000..da542e268
--- /dev/null
+++ b/fullstack-cert/js-projects/forum-leaderboard/index.html
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+ fCC Forum Leaderboard
+
+
+
+
+
+
`;
+ }).join("");
+};
diff --git a/fullstack-cert/js-projects/forum-leaderboard/styles.css b/fullstack-cert/js-projects/forum-leaderboard/styles.css
new file mode 100644
index 000000000..1972d22bc
--- /dev/null
+++ b/fullstack-cert/js-projects/forum-leaderboard/styles.css
@@ -0,0 +1,156 @@
+* {
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
+ }
+
+ :root {
+ --main-bg-color: #2a2a40;
+ --black: #000;
+ --dark-navy: #0a0a23;
+ --dark-grey: #d0d0d5;
+ --medium-grey: #dfdfe2;
+ --light-grey: #f5f6f7;
+ --peach: #f28373;
+ --salmon-color: #f0aea9;
+ --light-blue: #8bd9f6;
+ --light-orange: #f8b172;
+ --light-green: #93cb5b;
+ --golden-yellow: #f1ba33;
+ --gold: #f9aa23;
+ --green: #6bca6b;
+ }
+
+ body {
+ background-color: var(--main-bg-color);
+ }
+
+ nav {
+ background-color: var(--dark-navy);
+ padding: 10px 0;
+ }
+
+ .fcc-logo {
+ width: 210px;
+ display: block;
+ margin: auto;
+ }
+
+ .title {
+ margin: 25px 0;
+ text-align: center;
+ color: var(--light-grey);
+ }
+
+ .table-wrapper {
+ padding: 0 25px;
+ overflow-x: auto;
+ }
+
+ table {
+ width: 100%;
+ color: var(--dark-grey);
+ margin: auto;
+ table-layout: fixed;
+ border-collapse: collapse;
+ overflow-x: scroll;
+ }
+
+ #topics {
+ text-align: start;
+ width: 60%;
+ }
+
+ th {
+ border-bottom: 2px solid var(--dark-grey);
+ padding-bottom: 10px;
+ font-size: 1.3rem;
+ }
+
+ td:not(:first-child) {
+ text-align: center;
+ }
+
+ td {
+ border-bottom: 1px solid var(--dark-grey);
+ padding: 20px 0;
+ }
+
+ .post-title {
+ font-size: 1.2rem;
+ color: var(--medium-grey);
+ text-decoration: none;
+ }
+
+ .category {
+ padding: 3px;
+ color: var(--black);
+ text-decoration: none;
+ display: block;
+ width: fit-content;
+ margin: 10px 0 10px;
+ }
+
+ .career {
+ background-color: var(--salmon-color);
+ }
+
+ .feedback,
+ .html-css {
+ background-color: var(--light-blue);
+ }
+
+ .support {
+ background-color: var(--light-orange);
+ }
+
+ .general {
+ background-color: var(--light-green);
+ }
+
+ .javascript {
+ background-color: var(--golden-yellow);
+ }
+
+ .backend {
+ background-color: var(--gold);
+ }
+
+ .python {
+ background-color: var(--green);
+ }
+
+ .motivation {
+ background-color: var(--peach);
+ }
+
+ .avatar-container {
+ display: flex;
+ justify-content: center;
+ gap: 10px;
+ flex-wrap: wrap;
+ }
+
+ .avatar-container img {
+ width: 30px;
+ height: 30px;
+ }
+
+ @media (max-width: 750px) {
+ .table-wrapper {
+ padding: 0 15px;
+ }
+
+ table {
+ width: 700px;
+ }
+
+ th {
+ font-size: 1.2rem;
+ }
+
+ .post-title {
+ font-size: 1.1rem;
+ }
+ }
+
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/forum-leaderboard/user-stories.md b/fullstack-cert/js-projects/forum-leaderboard/user-stories.md
new file mode 100644
index 000000000..c2d41dc13
--- /dev/null
+++ b/fullstack-cert/js-projects/forum-leaderboard/user-stories.md
@@ -0,0 +1,38 @@
+1. You should have a function named `timeAgo` that takes a timestamp in the ISO 8601 format as the argument.
+1. The `timeAgo` function should compute the time difference between the time passed as argument and the current time and return:
+ - `xm ago` (`x` represents minutes) if the amount of minutes that have passed is less than `60`.
+ - `xh ago` (`x` represents hours) if the amount of hours that have passed is less than `24`.
+ - `xd ago` (`x` represents days) otherwise.
+1. You should have a function named `viewCount` that takes the number of views of a post as the argument.
+1. If the value of the views passed as the argument is greater than or equal to `1000`, the `viewCount` function should return a string with the views value divided by `1000`, rounded down to the nearest whole number and the letter `k` appended to it. Otherwise, it should return the views value.
+1. You should have a function named `forumCategory` that takes the id of a selected category as the argument.
+1. The `forumCategory` function should verify that the selected category id is a property of the `allCategories` object and should return a string containing an anchor element with:
+ - the text of the `category` key of the selected category.
+ - a class of `category` followed by the `className` property of the selected category.
+ - an `href` with the value of `//`, where `` is the `className` property of the selected category and `id` is the argument passed to `forumCategory`.
+1. If the `allCategories` object does not have the selected category id as its property, `className` and `category` should be indicated as `general`.
+1. You should have a function named `avatars` that takes two arrays representing posters and users, respectively.
+1. The `avatars` function should return a string made by joining `img` elements, one for each poster found inside the user array. *Hint:* You can find users by comparing the `user_id` property of the poster with the `id` property` of the user.
+1. The `avatars` function should set each avatar's size by accessing the `avatar_template` property and replacing `{size}` with `30`.
+1. Each image element should have an alt text with the value of the `name` property of the poster.
+1. Each image element should have a source with the value of the `avatar_template` property of the poster. In case `avatar_template` contains a relative path, you should set the source to `/`.
+1. You should have a function named `showLatestPosts` that takes a single parameter.
+1. The `showLatestPosts` should extract the `users` and `topic_list` properties from the object passed as argument. Also, it should process the following properties of the `topics` object contained in `topic_list`:
+ - `id`: the id of the post
+ - `title`: the title of the post
+ - `views`: the number of views of the post
+ - `post_count`: the number of replies to the topic
+ - `slug`: the slug of the post
+ - `posters`: the posters for that topic
+ - `category_id`: an integer indicating the category id for the post
+ - `bumped_at`: a timestamp in the ISO 8601 format
+1. The `showLatestPosts` should set the inner HTML of `#posts-container` to a string made by joining `tr` elements, one for each item in `topics`.
+1. Each `tr` element should have five `td` elements in it:
+ - a `td` containing two anchor elements, one with the class of `post-title`, an `href` of `//`, an anchor text of ``, and one obtained by calling `forumCategory` with `category_id`.
+ - a `td` containing the image returned by the `avatars` function called with `posters` and `users` as arguments and nested within a `div` element with the class of `avatar-container`.
+ - a `td` containing the number of replies to the post. *Hint:* use `post_count - 1`.
+ - a `td` containing the number of views of the post.
+ - a `td` containing the time passed since the last activity.
+1. You should have an async function named `fetchData`.
+1. The `fetchData` function should request data from `forumLatest` and call `showLatestPosts` passing it the response parsed as JSON.
+1. If there's an error when fecthing data, the `fetchData` function should log the error to the console.
diff --git a/fullstack-cert/js-projects/functional-programming-lab/index.html b/fullstack-cert/js-projects/functional-programming-lab/index.html
new file mode 100644
index 000000000..749b6a14b
--- /dev/null
+++ b/fullstack-cert/js-projects/functional-programming-lab/index.html
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+ Sorting Visualizer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/functional-programming-lab/script.js b/fullstack-cert/js-projects/functional-programming-lab/script.js
new file mode 100644
index 000000000..db4bd903d
--- /dev/null
+++ b/fullstack-cert/js-projects/functional-programming-lab/script.js
@@ -0,0 +1,83 @@
+const arrayContainer = document.getElementById("array-container");
+const generateArrayBtn = document.getElementById("generate-btn");
+const sortArrayBtn = document.getElementById("sort-btn");
+const arrayLength = 5;
+const minVal = 1;
+const maxVal = 100;
+const isStart = () => arrayContainer.children.length === 1;
+const clearArrayContainer = () => { arrayContainer.innerHTML = '' };
+const showSortBtn = () => {sortArrayBtn.style.display = "inline-block"};
+const hideSortBtn = () => {sortArrayBtn.style.display = "none"};
+const generateElement = () => Math.floor(Math.random() * maxVal + minVal);
+const generateArray = () => Array.from({ length: arrayLength }, generateElement);
+const fillArrContainer = (arr, container) => {
+ container.innerHTML = "";
+ arr.forEach(i => {
+ const el = document.createElement("span");
+ el.innerText = i;
+ el.id = `number-${i}`
+ container.appendChild(el);
+ })
+}
+const isOrdered = (el1, el2) => el1 < el2;
+
+const swapElements = (arr, n = 0) => {
+ if (n < arr.length - 1 && !isOrdered(arr[n], arr[n + 1])) {
+ const temp = arr[n];
+ arr[n] = arr[n + 1];
+ arr[n + 1] = temp;
+ }
+}
+const getLastChildren = () => arrayContainer.lastElementChild;
+const getLastArr = () => {
+ const els = Array.from(getLastChildren().children);
+ const arr = els.map(el => Number(el.id.replace("number-", "")));
+ return arr;
+}
+const generateContainer = () => {
+ const container = document.createElement("div");
+ arrayContainer.appendChild(container);
+ return container;
+}
+const highligthCurrentEls = (container, n = 0) => {
+ const children = container.children;
+ children[n].style.border = "2px dashed red";
+ children[n + 1].style.border = "2px dashed red";
+}
+
+const highlightSorted = () => {
+ getLastChildren().style.border = "4px solid green";
+}
+
+const bubbleSort = () => {
+ let swapped = true;
+ while (swapped) {
+ const startingArr = getLastArr();
+ startingArr.forEach((_, i) => {
+ if (i + 1 < arrayLength) {
+ highligthCurrentEls(getLastChildren(), i);
+ const arr = getLastArr();
+ swapElements(arr, i);
+ fillArrContainer(arr, generateContainer());
+ }
+ })
+ const lastArr = getLastArr()
+ if (startingArr.every((el, i) => el === lastArr[i])) swapped = false;
+ }
+}
+
+
+generateArrayBtn.addEventListener("click", () => {
+ if (!isStart()) {
+ clearArrayContainer();
+ }
+ fillArrContainer(generateArray(), document.getElementById("starting-array-container"));
+ showSortBtn();
+});
+
+sortArrayBtn.addEventListener("click", () => {
+ bubbleSort();
+ highlightSorted();
+ hideSortBtn();
+})
+
diff --git a/fullstack-cert/js-projects/functional-programming-lab/styles.css b/fullstack-cert/js-projects/functional-programming-lab/styles.css
new file mode 100644
index 000000000..5593a294e
--- /dev/null
+++ b/fullstack-cert/js-projects/functional-programming-lab/styles.css
@@ -0,0 +1,55 @@
+* {
+ box-sizing: border-box;
+}
+
+main {
+ height: 100vh;
+ display: flex;
+ justify-content: center;
+ flex-direction: column;
+ align-items: center;
+}
+
+#array-container {
+ max-height: 70vh;
+ display: flex;
+ flex-direction: column;
+ flex-wrap: wrap;
+ gap: 10px;
+
+}
+
+#array-container>div {
+ min-width: 15rem;
+ height: 2rem;
+ box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
+ border-radius: 10px;
+ margin-bottom: 1rem;
+ border: 2px solid darkgray;
+ display: flex;
+ justify-content: space-evenly;
+ align-items: center;
+}
+
+#starting-array-container {
+ border: 4px solid darkblue !important;
+}
+
+#btn-container {
+ display: flex;
+ justify-content: space-around;
+ gap: 10px;
+}
+
+button {
+ padding: 5px;
+}
+
+#sort-btn {
+ display: none;
+}
+
+span {
+ border-radius: 2px;
+ padding: 1px;
+}
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/functional-programming-lab/user-stories.md b/fullstack-cert/js-projects/functional-programming-lab/user-stories.md
new file mode 100644
index 000000000..6e2138a06
--- /dev/null
+++ b/fullstack-cert/js-projects/functional-programming-lab/user-stories.md
@@ -0,0 +1,20 @@
+The Bubble Sort algorithm sorts a sequence of integers by comparing couples of adjacient elements starting from the beginning of the sequence. If the first element is greater then the second one, it swaps them. Then, it prooceeds with the following couple. When the sequence ends, it starts a new cycle from the beginning of the sequence, and repeats the process until the elements are sorted.
+
+For this lab, you have been provided with all the HTML and CSS. You will use JavaScript to complete the Bubble Sort Visualizer so that it visualizes each step needed by the Bubble Sort algorithm to sort an array of five integers.
+
+1. You should a function named `generateElement` that returns a random integer between `1` and `100` inclusive.
+1. You should have a function named `generateArray` that uses the `generateElement` function and returns an array containing five random integers between `1` and `100`.
+1. You should have a function named `generateContainer` that returns an empty `div` element.
+1. You should have a function named `fillArrContainer` that takes an array as the first argument and an HTML element as the second argument.
+1. The `fillArrContainer` function should fill the element passed to the function with five `span` elements with the text of an integer from the array passed to the function function.
+1. You should have a function named `isOrdered` that takes two integers and returns a boolean indicating if the first integer is less than the second.
+1. You should have a function named `swapElements` that takes an array of integers and a numeric index.
+1. The `swapElements` function should modify the array in place by swapping the element at the passed index and the following element if the first element is greater than the second.
+1. You should have a function named `highligthCurrentEls` that takes an HTML element and a numeric index.
+1. The `highligthCurrentEls` function should set the border of the given element's descendants placed at the given index and at the next one to `2px dashed red`.
+1. When you click `#generate-btn` you should fill `#starting-array-container` with five `span` elements, each with a random number as its text.
+1. When you click `#generate-btn` you should make `#sort-btn` visible on the page.
+1. After you click `#sort-btn`, `#array-container` should contain a `div` element for each of the steps required by the Bubble Sort algorithm to sort the starting array, including the `div` representing the starting array and a `div` representing the sorted array.
+1. Each `div` should contain five `span`, each with a number as its text.
+1. After you click `#sort-btn`, `#starting-array-container` should represent the starting step with the initial array and the first two integers highlighted.
+1. For each sorting step, you should use `highligthCurrentEls` to highlight the two numbers that are being compared, and swap them in the next step by using `swapElements`.
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/functions/script.js b/fullstack-cert/js-projects/functions/script.js
new file mode 100644
index 000000000..554951ad8
--- /dev/null
+++ b/fullstack-cert/js-projects/functions/script.js
@@ -0,0 +1,17 @@
+const generatePassword = (length) => {
+ const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()';
+ let password = '';
+ for (let i = 0; i < length; i++) {
+ const randomIndex = Math.floor(Math.random() * chars.length);
+ password += chars[randomIndex];
+ }
+ return password;
+}
+
+const runPasswordGenerator = () => {
+ const length = parseInt(prompt("Enter the desired length for the password:"), 10);
+ const password = generatePassword(length);
+ console.log(`Generated password: ${password}`);
+}
+
+runPasswordGenerator();
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/functions/user-stories.md b/fullstack-cert/js-projects/functions/user-stories.md
new file mode 100644
index 000000000..97351a942
--- /dev/null
+++ b/fullstack-cert/js-projects/functions/user-stories.md
@@ -0,0 +1,21 @@
+1. You should create an arrow function named `generatePassword`. The function should have a `length` parameter. Step 2 to 5 should be created within the `generatePassword` function.
+
+2. Using the `let` keyword, create a variable named `chars`. It should have a value of all possible characters that can be included in the password: `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()`.
+
+3. You should create a variable named `password`. It should have an empty string as its value.
+
+4. You should create a `for` loop that runs `length` times. In the body of the loop:
+ - Generate a random index using `Math.floor(Math.random() * chars.length);` and store it in a variable named `randomIndex`
+ - Append the random characters to `password` using `chars[randomIndex]`.
+
+5. You should return `password`.
+
+6. You should create an arrow function named `runPasswordGenerator`. Step 7 to 9 should be created within the `runPasswordGenerator` function.
+
+7. You should create a prompt that asks the user to `Enter the desired length for the password:`. Store the input in a `const` variable named `length`, and convert it to an integer.
+
+8. You should call the `generatePassword` function with `length` as a parameter and store the returned password in a `const` variable named `password`.
+
+9. You should log the generated password to the console using the message `Generated password: ${password}`.
+
+10. You should call the `runPasswordGenerator` function.
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/gradebook-app/script.js b/fullstack-cert/js-projects/gradebook-app/script.js
new file mode 100644
index 000000000..ee97eeb0a
--- /dev/null
+++ b/fullstack-cert/js-projects/gradebook-app/script.js
@@ -0,0 +1,38 @@
+function getAverage(scores) {
+ let sum = 0;
+
+ for (const score of scores) {
+ sum += score;
+ }
+
+ return sum / scores.length;
+ }
+
+ function getGrade(score) {
+ if (score === 100) {
+ return "A+";
+ } else if (score >= 90) {
+ return "A";
+ } else if (score >= 80) {
+ return "B";
+ } else if (score >= 70) {
+ return "C";
+ } else if (score >= 60) {
+ return "D";
+ } else {
+ return "F";
+ }
+ }
+
+ function hasPassingGrade(score) {
+ return getGrade(score) !== "F";
+ }
+
+ function studentMsg(totalScores, studentScore) {
+ let average = getAverage(totalScores);
+ let grade = getGrade(studentScore);
+
+ return `Class average: ${average}. Your grade: ${grade}. You ${
+ hasPassingGrade(studentScore) ? "passed" : "failed"
+ } the course.`;
+ }
diff --git a/fullstack-cert/js-projects/gradebook-app/user-stories.md b/fullstack-cert/js-projects/gradebook-app/user-stories.md
new file mode 100644
index 000000000..2c4a894bb
--- /dev/null
+++ b/fullstack-cert/js-projects/gradebook-app/user-stories.md
@@ -0,0 +1,25 @@
+1. You should have a function named `getAverage` that takes an array of test scores as a parameter and returns the average score.
+
+1. You should have a function named `getGrade` that takes a student score as a parameter and returns a string representing a letter grade based on the score. Here are the scores and their corresponding letter grades:
+
+ | Score Range | Grade |
+ | ----------- | ------- |
+ | `100` | `"A+"` |
+ | `90 - 99` | `"A"` |
+ | `80 - 89` | `"B"` |
+ | `70 - 79` | `"C"` |
+ | `60 - 69` | `"D"` |
+ | `0 - 59` | `"F"` |
+
+1. You should have a function named `hasPassingGrade` that takes a score as a parameter and returns either `true` or `false` depending on if the score corresponds to a passing grade.
+
+1. The `hasPassingGrade` function should use the `getGrade` function to get the letter grade, and use it to determine if the grade is passing. A passing grade is anything different from `"F"`.
+
+1. You should have a function named `studentMsg` that takes an array of scores and a student score as the parameters. The function should return a string with the format:
+
+ - `"Class average: average-goes-here. Your grade: grade-goes-here. You passed the course."`, if the student passed the course.
+ - `"Class average: average-goes-here. Your grade: grade-goes-here. You failed the course."`, if the student failed the course.
+
+ Replace `average-goes-here` with the average of total scores and `grade-goes-here` with the student's grade.
+
+ Use `getAverage` to get the average score and `getGrade` to get the student's grade.
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/greeting-bot/script.js b/fullstack-cert/js-projects/greeting-bot/script.js
new file mode 100644
index 000000000..2aa5b1a1e
--- /dev/null
+++ b/fullstack-cert/js-projects/greeting-bot/script.js
@@ -0,0 +1,44 @@
+// This will be the first workshop in new JS section
+
+// create steps for console.log and basic string usage
+console.log("Hi there!");
+console.log("I am excited to talk to you");
+
+// create steps just for declaring variables
+let bot;
+// introduce camel case here
+let botLocation;
+
+// add steps to teach assignment
+bot = "teacherBot";
+botLocation = "the universe";
+
+// add review step for adding console statement
+console.log("Allow me to introduce myself");
+
+// teach multiple arguments for console statement
+// We will teach other types of string concatenation in the strings module which follows this one
+console.log("My name is", bot);
+console.log("I live in", botLocation);
+
+// teach reassignment
+bot = "professorBot";
+
+// review multiple arguments for console statement
+console.log("My nickname is", bot);
+
+// review reassignment
+bot = "awesomeTeacherBot";
+
+// review multiple arguments for console statement
+console.log("I love my nickname but I wish people would call me", bot);
+
+// teach const and initialization
+const favoriteSubject = "Computer Science";
+
+// review multiple arguments for console statement
+console.log("My favorite subject is", favoriteSubject);
+console.log("I love to teach others about", favoriteSubject);
+
+// review step for adding console statement
+console.log("Well, it was nice to talk to you. Have a nice day!");
diff --git a/fullstack-cert/js-projects/hash-table/script.js b/fullstack-cert/js-projects/hash-table/script.js
new file mode 100644
index 000000000..06d661b4c
--- /dev/null
+++ b/fullstack-cert/js-projects/hash-table/script.js
@@ -0,0 +1,40 @@
+class HashTable {
+ constructor() {
+ this.collection = {};
+ }
+
+ hash(string) {
+ let hashed = 0;
+ for (let i = 0; i < string.length; i++) {
+ hashed += string.charCodeAt(i);
+ }
+ return hashed
+ }
+
+ add(key, val) {
+ const theHash = this.hash(key);
+ if (!this.collection.hasOwnProperty(theHash)) {
+ this.collection[theHash] = {};
+ }
+ this.collection[theHash][key] = val;
+ }
+
+ remove(key) {
+ const theHash = this.hash(key);
+ const hashedObj = this.collection[theHash];
+ if (hashedObj.hasOwnProperty(key)) {
+ delete hashedObj[key];
+ }
+ if (!Object.keys(hashedObj).length) {
+ delete this.collection[theHash];
+ }
+ }
+
+ lookup(key) {
+ const theHash = this.hash(key);
+ if (this.collection.hasOwnProperty(theHash)) {
+ return this.collection[theHash][key];
+ }
+ return null
+ }
+}
diff --git a/fullstack-cert/js-projects/hash-table/user-stories.md b/fullstack-cert/js-projects/hash-table/user-stories.md
new file mode 100644
index 000000000..10e919d17
--- /dev/null
+++ b/fullstack-cert/js-projects/hash-table/user-stories.md
@@ -0,0 +1,11 @@
+1. You should define a class named `HashTable` with a `collection` property initialized as an empty object inside its `constructor` method. The `collection` object should store key-value pairs based on the hashed value of the key.
+
+1. The `HashTable` class should have four instance methods, namely `hash`, `add`, `remove`, and `lookup`.
+
+1. The `hash` method should take a string as a parameter and return the hashed value computed as the sum of the UTF-16 code unit of each character in the string. Use the `charCodeAt` method for that.
+
+1. The `add` method should take a key-value pair as the parameters, and hash the key. The hashed value should be used to store the key-value pair inside the hash table (`collection` object). When the same hash value is produced by multiple different keys, each key-value pair should be stored using the same hash value.
+
+1. The `remove` method should take a key as a parameter and remove the corresponding key-value pair from the hash table.
+
+1. The `lookup` method should take a key as a parameter and return the corresponding value stored inside the hash table, or `null` if not present.
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/higher-order-functions/script.js b/fullstack-cert/js-projects/higher-order-functions/script.js
new file mode 100644
index 000000000..2fce739c4
--- /dev/null
+++ b/fullstack-cert/js-projects/higher-order-functions/script.js
@@ -0,0 +1,48 @@
+function sortByYear(book1, book2) {
+ if (book1.release_year < book2.release_year) {
+ return -1;
+ }
+
+ if (book1.release_year > book2.release_year) {
+ return 1;
+ }
+
+ return 0;
+}
+
+const books = [
+ {
+ title: "The Great Gatsby",
+ author_name: "F. Scott Fitzgerald",
+ release_year: 1925,
+ },
+ {
+ title: "In Search of Lost Time",
+ author_name: "Marcel Proust",
+ release_year: 1913,
+ },
+ {
+ title: "Ulysses",
+ author_name: "James Joyce",
+ release_year: 1922,
+ },
+ {
+ title: "One Hundred Years of Solitude",
+ author_name: "Gabriel García Márquez",
+ release_year: 1967,
+ },
+ {
+ title: "The Catcher in the Rye",
+ author_name: "J. D. Salinger",
+ release_year: 1951,
+ },
+];
+
+let filteredBooks = books.filter((book) => book.release_year < 1950);
+
+let filteredBooksSorted = filteredBooks.sort(sortByYear);
+
+console.log("Books Written Before 1950 (sorted according to release year)");
+filteredBooksSorted.forEach((book) => {
+ console.log(`${book.title} by ${book.author_name} (${book.release_year})`);
+});
diff --git a/fullstack-cert/js-projects/higher-order-functions/user-stories.md b/fullstack-cert/js-projects/higher-order-functions/user-stories.md
new file mode 100644
index 000000000..b58278986
--- /dev/null
+++ b/fullstack-cert/js-projects/higher-order-functions/user-stories.md
@@ -0,0 +1,17 @@
+You should have a callback function named `sortByYear` that accepts two books, `book1`, and `book2` as parameter for sorting the array.
+
+The `sortByYear` function should return `-1` if the `release_year` of `book1` object is smaller than that of the `book2` object.
+
+The `sortByYear` function should return `1` if the `release_year` of `book1` object is bigger than that of the `book2` object.
+
+The `sortByYear` function should return `0` for all other scenarios.
+
+You should have an array of objects named `books` where each object in the array should have a string `title`, another string `author_name`, and a number `release_year`.
+
+Your `books` array should have a minimum of three objects.
+
+You should call the `filter` higher-order function on the `books` array with a callback to filter out books written after a certain year such as 1950 and save the filtered array in a new array named `filteredBooks`.
+
+You should call the `sort` higher order function by passing the `sortByYear` callback function on the `filteredBooks` array to sort the books according to their `release_year` in ascending order and save the sorted array in a new array named `filteredBooksSorted`.
+
+You should call the `forEach` higher order function on the `filteredBooksSorted` array and print out the details of each book following the ` by ()` format.
diff --git a/fullstack-cert/js-projects/inventory-management-app/script.js b/fullstack-cert/js-projects/inventory-management-app/script.js
new file mode 100644
index 000000000..138b9203a
--- /dev/null
+++ b/fullstack-cert/js-projects/inventory-management-app/script.js
@@ -0,0 +1,67 @@
+let inventory = [];
+
+const findProductIndex = (productName) => {
+ let productIndex = -1;
+ inventory.forEach((element, index) => {
+ if (element.name === productName) {
+ productIndex = index;
+ }
+ })
+ return productIndex;
+}
+
+const addProduct = (product) => {
+ const productIndex = findProductIndex(product.name);
+ if (productIndex < 0) {
+ inventory.push(product);
+ console.log(`${product.name} added to inventory`)
+ return;
+ }
+ inventory[productIndex].quantity += product.quantity;
+ console.log(`${product.name} quantity updated`)
+}
+
+const removeProduct = (productName, productQuantity) => {
+ const productIndex = findProductIndex(productName);
+ if (productIndex < 0) {
+ console.log(`${productName} not found`);
+ return;
+ }
+ const foundProduct = inventory[productIndex];
+ if (foundProduct.quantity >= productQuantity) {
+ foundProduct.quantity -= productQuantity;
+ console.log(`Remaining ${productName} pieces: ${foundProduct.quantity}`)
+ if (!foundProduct.quantity) {
+ inventory.splice(productIndex, 1);
+ }
+ return;
+ }
+ console.log(`Not enough ${productName} available, remaining pieces: ${foundProduct.quantity}`);
+}
+
+// Example usage
+
+const product1 = {
+ name: 'flour',
+ quantity: 15
+}
+const product2 = {
+ name: 'flour',
+ quantity: 10
+}
+const product3 = {
+ name: 'sugar',
+ quantity: 20
+}
+const product4 = {
+ name: 'salt',
+ quantity: 12
+}
+
+addProduct(product1);
+addProduct(product2);
+addProduct(product3);
+addProduct(product4);
+removeProduct('flour', 30);
+removeProduct('flour', 20);
+removeProduct('flour', 5);
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/inventory-management-app/user-stories.md b/fullstack-cert/js-projects/inventory-management-app/user-stories.md
new file mode 100644
index 000000000..35d628806
--- /dev/null
+++ b/fullstack-cert/js-projects/inventory-management-app/user-stories.md
@@ -0,0 +1,8 @@
+1. You should declare an empty array named `inventory`, that will store product objects having a key `name` with the value of a string, and a key `quantity` with the value of an integer number.
+1. You should create a function named `findProductIndex` that takes the product name as its argument and returns the index of the corresponding product object inside the `inventory` array. If the product is not found, the function should return `-1`.
+1. You should create a function named `addProduct` that takes a product object as its argument.
+1. If the product is already present in the inventory, the `addProduct` function should update its `quantity` value and log to the console the product name followed by a space and `quantity updated`.
+1. If the product is not present in the inventory, the `addProduct` function should push the product to the `inventory` array and log to the console the product name followed by a space and `added to inventory`.
+1. You should create a function named `removeProduct` that takes the product name and quantity as its arguments.
+1. The `removeProduct` function should subtract the passed quantity from the corresponding product object inside the inventory and log the string `Remaining pieces: ` to the console, where `` should be replaced by the product name, and `` should be replaced by the product quantity.
+1. If the quantity after the subtraction is zero, `removeProduct` should remove the product object from the inventory. Instead, if the quantity in the inventory is not enough to perform the subtraction, the `removeProduct` function should log the string `Not enough available, remaining pieces: ` to the console.
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/js-chat-bot/script.js b/fullstack-cert/js-projects/js-chat-bot/script.js
new file mode 100644
index 000000000..8138615f3
--- /dev/null
+++ b/fullstack-cert/js-projects/js-chat-bot/script.js
@@ -0,0 +1,22 @@
+console.log("Hello! I'm your coding fun fact guide!");
+
+const botName = "JsBot";
+const botLocation = "planet Eris";
+const favoriteLanguage = "JavaScript";
+
+console.log("My name is " + botName + " and I live on " + botLocation + ".");
+console.log("My favorite programming language is " + favoriteLanguage + ".");
+
+let codingFact = "Did you know that " + favoriteLanguage + " was created in just 10 days?";
+
+console.log(codingFact);
+
+codingFact = "Another fun fact: " + favoriteLanguage + "was originally called Mocha!";
+
+console.log(codingFact);
+
+codingFact = "Also, " + favoriteLanguage + " is the most popular programming language in the world.";
+
+console.log(codingFact);
+
+console.log("It was fun sharing these facts with you. Goodbye! - " + botName + " from " + botLocation);
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/js-chat-bot/user-stories.md b/fullstack-cert/js-projects/js-chat-bot/user-stories.md
new file mode 100644
index 000000000..77679b96e
--- /dev/null
+++ b/fullstack-cert/js-projects/js-chat-bot/user-stories.md
@@ -0,0 +1,11 @@
+1. You should log `"Hello! I'm your coding fun fact guide!"` to the console as a greeting message to the user.
+1. You should create three const variables: `botName`, `botLocation`, and `favoriteLanguage`, that store the bot's name, where it's from, and it's favorite coding language, respectively.
+1. You should use string concatenation to log `"My name is (botName) and I live on (botLocation)."` to the console.
+1. You should use string concatenation to log `"My favorite programming language is (favoriteLanguage)."` to the console.
+1. You should use `let` to create a `codingFact` variable and assign it a string that is a fun fact about your bot's favorite coding language and uses string concatenation to include the use of the `favoriteLanguage` variable.
+1. You should log the `codingFact` to the console.
+1. You should reassign the `codingFact` variable to a new fact about the bot's favorite language using the `favoriteLanguage` variable again.
+1. You should log the `codingFact` to the console again.
+1. You should reassign the `codingFact` variable again to another new fact about the bot's favorite language using the `favoriteLanguage` variable.
+1. You should log the `codingFact` to the console a third time.
+1. You should log `"It was fun sharing these facts with you. Goodbye! - (botName) from (botLocation)."` to the console as a farewell statement from the bot.
diff --git a/fullstack-cert/js-projects/js-lunch-picker/script.js b/fullstack-cert/js-projects/js-lunch-picker/script.js
new file mode 100644
index 000000000..cd62b21f5
--- /dev/null
+++ b/fullstack-cert/js-projects/js-lunch-picker/script.js
@@ -0,0 +1,34 @@
+
+// task 1: create a kids menu with one item
+let kidsMeal = ["Chicken Nuggets"];
+
+// task 2: create an adults menu with one item
+let adultsMeal = ["Salad"];
+
+// task 3: add three more items to kids menu
+kidsMeal.push("Pizza", "Burgers", "Tacos");
+
+// task 4: add three more items to adults menu
+adultsMeal.push("Wraps", "Hummus", "Rice");
+
+// task: print both menus
+console.log("Kids Menu:", kidsMeal);
+console.log("Adults Menu:", adultsMeal);
+
+// task 5: remove last item from kidsMeal using pop()
+kidsMeal.pop();
+
+// task 6: remove first item from adultsMeal using shift()
+adultsMeal.shift();
+
+// print both menus after removing items
+console.log("Kids menu after removing the last item: ", kidsMeal);
+console.log("Adults Menu After Removing the first item:", adultsMeal);
+
+// task 7: create a random index for kidsMeal and adultsMeal
+let randomIndexKids = Math.floor(Math.random() * kidsMeal.length);
+let randomIndexAdults = Math.floor(Math.random() * adultsMeal.length);
+
+// task 8: print a random item from each menu
+console.log("Today kids should eat:", kidsMeal[randomIndexKids]);
+console.log("Today adults should eat:", adultsMeal[randomIndexAdults]);
diff --git a/fullstack-cert/js-projects/js-lunch-picker/user-stories.md b/fullstack-cert/js-projects/js-lunch-picker/user-stories.md
new file mode 100644
index 000000000..9308c8dfa
--- /dev/null
+++ b/fullstack-cert/js-projects/js-lunch-picker/user-stories.md
@@ -0,0 +1,18 @@
+1. You should create a `kidsMeal` array with one item, `"Chicken Nuggets"`, in it.
+1. You should create an `adultsMeal` array with one item, `"Salad"`, in it.
+1. You should use `push` to add three more food items being `"Pizza"`, `"Burgers"`, and `"Tacos"` to the `kidsMeal` array.
+1. You should use `push` to add three more food items being `"Wraps"`, `"Hummus"`, and `"Rice"` to the `adultsMeal` array.
+1. You should log the `kidsMeal` array to the console using the following format:
+ - `"Kids Menu: ", kidsMeal`.
+1. You should log the `adultsMeal` array to the console using the following format:
+ - `"Adults Menu: ", adultsMeal`.
+1. You should remove the last item from the `kidsMeal` array using `pop()`.
+1. You should remove the first item from the `adultsMeal` array using `shift()`.
+1. You should log the updated `kidsMeal` and `adultsMeal` array to the console using this format:
+ - `"Kids menu after removing the last item: ", kidsMeal`.
+ - `"Adults menu after removing the first item: ", adultsMeal`.
+2. Generate a random number that will be used to select a random meal from the `kidsMeal` array and store it in a variable called `randomIndexKids`.
+3. Generate a random number that will be used to select a random meal from the `adultsMeal` array and store it in a variable called `randomIndexAdults`.
+4. Log the following messages to the console:
+ - `"Today kids should eat:"` followed by the selected meal to the console.
+ - `"Today adults should eat:"` followed by the selected meal to the console.
diff --git a/fullstack-cert/js-projects/js-only-calculator/script.js b/fullstack-cert/js-projects/js-only-calculator/script.js
new file mode 100644
index 000000000..5575e57a3
--- /dev/null
+++ b/fullstack-cert/js-projects/js-only-calculator/script.js
@@ -0,0 +1,99 @@
+/*
+ We want to stress that functions are reusable.
+
+ So we will start by creating two functions with obvious repetition.
+ Then they will remove the code and create a reusable function with parameters.
+
+ NOTE: There will be lecture videos talking about
+ what happens when you don't use the return keyword and what it returns by default.
+ So in this workshop, all functions will return something
+
+*/
+
+// have one step just for the function declaration
+// function addTwoAndSeven() {
+// // have one step to return the sum
+// return 2 + 7;
+// }
+
+// // then have a step to call the function and see result
+// console.log(addTwoAndSeven());
+
+// // Then have a step where campers create a new function called addThreeAndFour, return the result, and call the function
+// function addThreeAndFour() {
+// return 3 + 4;
+// }
+
+// console.log(addThreeAndFour());
+
+function calculateSum(num1, num2) {
+ return num1 + num2;
+}
+
+/**
+ * We will have multiple console statements here because they need
+ to see for themselves that you can call the same function
+ with different arguments.
+ Campers are currently struggling with this in the current curriculum as well as legacy
+ */
+console.log(calculateSum(2, 5));
+console.log(calculateSum(12, 14));
+console.log(calculateSum(7, 9));
+
+// Then have a step where they create a calculateDifference function on their own
+// Also have them call the function a few times
+
+function calculateDifference(num1, num2) {
+ return num1 - num2;
+}
+
+console.log(calculateDifference(22, 5));
+console.log(calculateDifference(12, 1));
+console.log(calculateDifference(17, 9));
+
+// Then have campers create the multiple and divide functions with console statements in one step
+
+function calculateProduct(num1, num2) {
+ return num1 * num2;
+}
+
+console.log(calculateProduct(13, 15));
+console.log(calculateProduct(7, 11));
+console.log(calculateProduct(3, 3));
+
+function calculateQuotient(num1, num2) {
+ return num1 / num2;
+}
+
+console.log(calculateQuotient(13, 15));
+console.log(calculateQuotient(7, 11));
+
+// have them add this console statement in the next step and see Infinity
+console.log(calculateQuotient(3, 0));
+
+// then have them refactor the calculateQuotient function to account for division by zero
+
+// function calculateQuotient(num1, num2) {
+// return num2 === 0 ? "Cannot divide by zero" : num1 / num2;
+// }
+
+// have step where campers create a function for x²
+// Note: they can choose between Math.pow or x**2
+
+function calculateSquare(num) {
+ return num ** 2;
+}
+
+console.log(calculateSquare(2));
+console.log(calculateSquare(9));
+
+// have last step where campers will get the square root for a number
+// Campers will have learned about the Math object in an earlier module
+// but this will be the first time working with the Math.sqrt() method
+
+function calculateSquareRoot(num) {
+ return Math.sqrt(num);
+}
+
+console.log(calculateSquareRoot(25));
+console.log(calculateSquareRoot(10));
diff --git a/fullstack-cert/js-projects/js-teaching-bot/script.js b/fullstack-cert/js-projects/js-teaching-bot/script.js
new file mode 100644
index 000000000..77b06ce4d
--- /dev/null
+++ b/fullstack-cert/js-projects/js-teaching-bot/script.js
@@ -0,0 +1,86 @@
+// second workshop in JS section
+
+// review log statements and basic string usage
+console.log("Hi there!");
+
+// review variables and assignment
+const botName = "teacherBot";
+
+// teach string concatenation using the + operator
+// const greeting = "My name is " + botName
+// console.log(greeting);
+
+// then have them refactor the code to teach template literals
+
+const greeting = `My name is ${botName}.`;
+console.log(greeting);
+
+// review variables and assignment
+const subject = "JavaScript";
+const topic = "strings";
+
+// review template literals
+
+console.log(`Today, you will learn about ${topic} in ${subject}.`);
+
+// review template literals
+console.log(
+ `Here is an example of using the length property on the word ${subject}.`
+);
+
+// teach length property
+
+console.log(subject.length);
+
+// review template literals
+console.log(
+ `Here is an example of using the length property on the word ${topic}.`
+);
+
+// review length property
+console.log(topic.length);
+
+// review template literals
+console.log(
+ `Here is an example of accessing the first letter in the word ${subject}.`
+);
+
+// teach bracket notation and retrieving characters from strings
+console.log(subject[0]);
+
+// review template literals
+console.log(
+ `Here is an example of accessing the second letter in the word ${subject}.`
+);
+
+// review bracket notation and retrieving characters from strings
+console.log(subject[1]);
+
+// review template literals
+console.log(
+ `Here is an example of accessing the last letter in the word ${subject}.`
+);
+
+// teach retrieving the last letter
+console.log(subject[subject.length - 1]);
+
+// review const and initialization
+const sentence = "Learning is fun.";
+
+// review basic string usage
+console.log(
+ "Here are examples of finding the positions of substrings in the sentence."
+);
+
+// teach indexOf method
+console.log(sentence.indexOf("Learning"));
+
+// review indexOf method
+console.log(sentence.indexOf("is"));
+console.log(sentence.indexOf("fun"));
+
+// talk about when substring is not found and how indexOf is case sensitive
+console.log(sentence.indexOf("learning"));
+
+// review basic string usage
+console.log("I hope you enjoyed learning today.");
diff --git a/fullstack-cert/js-projects/lab-email-masker/script.js b/fullstack-cert/js-projects/lab-email-masker/script.js
new file mode 100644
index 000000000..49ed04b01
--- /dev/null
+++ b/fullstack-cert/js-projects/lab-email-masker/script.js
@@ -0,0 +1,13 @@
+const email = "apple.pie@example.com";
+
+const atIndex = email.indexOf("@");
+
+const userName = email.slice(0, atIndex);
+const domain = email.slice(atIndex);
+
+const maskedName =
+ userName[0] + "*".repeat(userName.length - 2) + userName[userName.length - 1];
+
+let finalMaskedEmail = maskedName + domain;
+
+console.log(finalMaskedEmail); // Output: "a*******e@example.com"
diff --git a/fullstack-cert/js-projects/lab-email-masker/user-stories.md b/fullstack-cert/js-projects/lab-email-masker/user-stories.md
new file mode 100644
index 000000000..dce9a1237
--- /dev/null
+++ b/fullstack-cert/js-projects/lab-email-masker/user-stories.md
@@ -0,0 +1,11 @@
+1. Declare a variable named `email` to store the email address you want to mask.
+
+2. Split the given email address by `@` using `slice()` to get the username and domain name.
+
+3. Store the username and domain name in `userName` and `domain` variables respectively.
+
+4. The first letter and last letter of the username shouldn't change. Replace the remaining characters with asterisks (*) to mask it. Store the masked username in a variable named `maskedName`.
+
+5. Combine the `maskedName` and `domain` to get the masked email address and store it in a variable named `finalMaskedEmail`.
+
+6. Print the `finalMaskedEmail` to the console.
diff --git a/fullstack-cert/js-projects/lab-factorial/script.js b/fullstack-cert/js-projects/lab-factorial/script.js
new file mode 100644
index 000000000..cd6b865f5
--- /dev/null
+++ b/fullstack-cert/js-projects/lab-factorial/script.js
@@ -0,0 +1,7 @@
+let inputNumber = prompt("Enter a number: ");
+let result = 1;
+for (let i = 1; i <= inputNumber; i++) {
+ result *= i;
+}
+
+console.log(`Factorial of ${inputNumber} is: ${result}`);
diff --git a/fullstack-cert/js-projects/lab-factorial/user-stories.md b/fullstack-cert/js-projects/lab-factorial/user-stories.md
new file mode 100644
index 000000000..cde8080ff
--- /dev/null
+++ b/fullstack-cert/js-projects/lab-factorial/user-stories.md
@@ -0,0 +1,8 @@
+1. You should ask the user for a number using a prompt window and store the number in a variable called `inputNumber`.
+
+2. Declare a variable `result` and assign it the value of `1`.
+
+3. Using a for loop, you should loop through all numbers from `1` to `inputNumber` (inclusive) and for each number, multiply the `result` variable by the current number and assign the result to the `result` variable.
+
+4. You should log the result of the factorial of `inputNumber` to the console. The output should be in the format `The factorial of [inputNumber] is [result]`.
+
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/lab-favourite-toggler/index.html b/fullstack-cert/js-projects/lab-favourite-toggler/index.html
new file mode 100644
index 000000000..f34b9f6ce
--- /dev/null
+++ b/fullstack-cert/js-projects/lab-favourite-toggler/index.html
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+ Favorite Icon Toggle
+
+
+
+
+
Art Supplies
+
+
+ 120 gm paper
+ ♡
+
+
+ Watercolor set
+ ♡
+
+
+ Lead pencil 6B
+ ♡
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/lab-favourite-toggler/script.js b/fullstack-cert/js-projects/lab-favourite-toggler/script.js
new file mode 100644
index 000000000..87d8fc95d
--- /dev/null
+++ b/fullstack-cert/js-projects/lab-favourite-toggler/script.js
@@ -0,0 +1,15 @@
+document.addEventListener("DOMContentLoaded", () => {
+ const favoriteIcons = document.querySelectorAll(".favorite-icon");
+
+ favoriteIcons.forEach((icon) => {
+ icon.addEventListener("click", () => {
+ if (icon.classList.contains("filled")) {
+ icon.classList.remove("filled");
+ icon.innerHTML = "♡"; // Empty heart
+ } else {
+ icon.classList.add("filled");
+ icon.innerHTML = "❤"; // Filled black heart
+ }
+ });
+ });
+});
diff --git a/fullstack-cert/js-projects/lab-favourite-toggler/styles.css b/fullstack-cert/js-projects/lab-favourite-toggler/styles.css
new file mode 100644
index 000000000..a350ba64e
--- /dev/null
+++ b/fullstack-cert/js-projects/lab-favourite-toggler/styles.css
@@ -0,0 +1,32 @@
+body {
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ height: 100vh;
+ margin: 0;
+ font-family: Arial, sans-serif;
+}
+
+h1 {
+ margin-bottom: 20px;
+}
+
+.item-list {
+ list-style-type: none;
+ padding: 0;
+}
+
+.item-list li {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 10px;
+ border-bottom: 1px solid #ddd;
+ width: 200px;
+}
+
+.favorite-icon {
+ font-size: 20px;
+ cursor: pointer;
+}
diff --git a/fullstack-cert/js-projects/lab-favourite-toggler/user-stories.md b/fullstack-cert/js-projects/lab-favourite-toggler/user-stories.md
new file mode 100644
index 000000000..3e163e6cc
--- /dev/null
+++ b/fullstack-cert/js-projects/lab-favourite-toggler/user-stories.md
@@ -0,0 +1,10 @@
+1. You should have an `h1` element that contains the heading.
+
+1. You should have an unordered list with three items.
+1. The unordered list should have the class `item-list`.
+
+1. The three list items should contain the item name followed by a `span` element with the class `favorite-icon` and an id of `favorite-icon-1`, `favorite-icon-2`, and `favorite-icon-3`, respectively.
+
+1. The `span` element should contain the code `♡` initially to represent an empty heart.
+
+1. When the `span` element is clicked, the class `filled` should be added to the `span` with class `favorite-icon` if it doesn't exist, and removed if it does. `♡` should change to `❤` to represent a filled heart.
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/lab-leap-year/script.js b/fullstack-cert/js-projects/lab-leap-year/script.js
new file mode 100644
index 000000000..c29ac15b1
--- /dev/null
+++ b/fullstack-cert/js-projects/lab-leap-year/script.js
@@ -0,0 +1,7 @@
+let year = 2024;
+
+if ((year % 4 === 0 && year % 100 !== 0) || year % 400 === 0) {
+ console.log(year + " is a leap year.");
+} else {
+ console.log(year + " is not a leap year.");
+}
diff --git a/fullstack-cert/js-projects/lab-leap-year/user-stories.md b/fullstack-cert/js-projects/lab-leap-year/user-stories.md
new file mode 100644
index 000000000..5fbcba151
--- /dev/null
+++ b/fullstack-cert/js-projects/lab-leap-year/user-stories.md
@@ -0,0 +1,10 @@
+1. Declare a variable `year` that stores the value of the year to check.
+
+1. Use an `if/ else` statement to check if the year is a leap year.
+
+1. To check if the year is a leap year, fulfill the following conditions in the `if` part of the statement:
+- If the year is divisible by 4, then it is a leap year.
+- If the year is divisible by 100, then it is not a leap year.
+- If the year is divisible by 400, then it is a leap year.
+
+1. If the year is a leap year, output `[year] is a leap year.` to the console. Otherwise, output `[year] is not a leap year.`. You will replace [year] with the year variable.
diff --git a/fullstack-cert/js-projects/lab-lightbox/images/stonehenge-thumbnail.jpg b/fullstack-cert/js-projects/lab-lightbox/images/stonehenge-thumbnail.jpg
new file mode 100644
index 000000000..2e551d7c3
Binary files /dev/null and b/fullstack-cert/js-projects/lab-lightbox/images/stonehenge-thumbnail.jpg differ
diff --git a/fullstack-cert/js-projects/lab-lightbox/images/stonehenge.jpg b/fullstack-cert/js-projects/lab-lightbox/images/stonehenge.jpg
new file mode 100644
index 000000000..21e262e77
Binary files /dev/null and b/fullstack-cert/js-projects/lab-lightbox/images/stonehenge.jpg differ
diff --git a/fullstack-cert/js-projects/lab-lightbox/images/storm-thumbnail.jpg b/fullstack-cert/js-projects/lab-lightbox/images/storm-thumbnail.jpg
new file mode 100644
index 000000000..8e5eab8bc
Binary files /dev/null and b/fullstack-cert/js-projects/lab-lightbox/images/storm-thumbnail.jpg differ
diff --git a/fullstack-cert/js-projects/lab-lightbox/images/storm.jpg b/fullstack-cert/js-projects/lab-lightbox/images/storm.jpg
new file mode 100644
index 000000000..4e33b2490
Binary files /dev/null and b/fullstack-cert/js-projects/lab-lightbox/images/storm.jpg differ
diff --git a/fullstack-cert/js-projects/lab-lightbox/images/trees-thumbnail.jpg b/fullstack-cert/js-projects/lab-lightbox/images/trees-thumbnail.jpg
new file mode 100644
index 000000000..e62def6e3
Binary files /dev/null and b/fullstack-cert/js-projects/lab-lightbox/images/trees-thumbnail.jpg differ
diff --git a/fullstack-cert/js-projects/lab-lightbox/images/trees.jpg b/fullstack-cert/js-projects/lab-lightbox/images/trees.jpg
new file mode 100644
index 000000000..164b4153d
Binary files /dev/null and b/fullstack-cert/js-projects/lab-lightbox/images/trees.jpg differ
diff --git a/fullstack-cert/js-projects/lab-lightbox/index.html b/fullstack-cert/js-projects/lab-lightbox/index.html
new file mode 100644
index 000000000..d7b3b317f
--- /dev/null
+++ b/fullstack-cert/js-projects/lab-lightbox/index.html
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+ Image Gallery with Lightbox
+
+
+
+
+
Museum Gallery
+
+
+
+
+
+
+
+
+ ×
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/lab-lightbox/script.js b/fullstack-cert/js-projects/lab-lightbox/script.js
new file mode 100644
index 000000000..ec390b8d0
--- /dev/null
+++ b/fullstack-cert/js-projects/lab-lightbox/script.js
@@ -0,0 +1,33 @@
+// Get references to the elements
+const galleryItems = document.querySelectorAll(".gallery-item");
+const lightbox = document.getElementById("lightbox");
+const lightboxImage = document.getElementById("lightbox-image");
+const closeButton = document.getElementById("close");
+
+// Function to open the lightbox
+function openLightbox(src) {
+ lightboxImage.src = src;
+ lightbox.style.display = "flex"; // Show the lightbox
+}
+
+// Function to close the lightbox
+function closeLightbox() {
+ lightbox.style.display = "none"; // Hide the lightbox
+}
+
+// Add event listener to the close button
+closeButton.addEventListener("click", closeLightbox);
+
+// Add event listener to the lightbox background
+ lightbox.addEventListener("click", (e) => {
+ if (e.target === lightbox) {
+ closeLightbox(); // Close lightbox if clicking outside the image
+ }
+});
+
+// Add event listeners to gallery items
+galleryItems.forEach((item) => {
+ item.addEventListener("click", () => {
+ openLightbox(item.src.replace("-thumbnail", "")); // Open lightbox with the full image
+ });
+});
diff --git a/fullstack-cert/js-projects/lab-lightbox/styles.css b/fullstack-cert/js-projects/lab-lightbox/styles.css
new file mode 100644
index 000000000..bf3ba4ef6
--- /dev/null
+++ b/fullstack-cert/js-projects/lab-lightbox/styles.css
@@ -0,0 +1,63 @@
+body {
+ margin: 0;
+ padding: 0;
+ background-color: #f0f0f0;
+ color: #333;
+}
+
+.title {
+ margin-top: 100px;
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: center;
+ background-color: rgb(211, 221, 224);
+
+}
+
+.gallery {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 10px;
+ justify-content: center;
+ padding: 20px;
+
+}
+
+.gallery-item {
+ width: 250px;
+ height: 300px;
+ object-fit: cover;
+ cursor: pointer;
+ transition: transform 0.2s;
+}
+
+.gallery-item:hover {
+ transform: scale(1.05);
+}
+
+.lightbox {
+ display: none;
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background-color: rgba(0, 0, 0, 0.8);
+ justify-content: center;
+ align-items: center;
+ z-index: 1000;
+}
+
+.lightbox img {
+ max-width: 90%;
+ max-height: 90%;
+}
+
+.close {
+ position: absolute;
+ top: 20px;
+ right: 20px;
+ font-size: 2em;
+ color: white;
+ cursor: pointer;
+}
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/lab-lightbox/user-stories.md b/fullstack-cert/js-projects/lab-lightbox/user-stories.md
new file mode 100644
index 000000000..c33ccb90f
--- /dev/null
+++ b/fullstack-cert/js-projects/lab-lightbox/user-stories.md
@@ -0,0 +1,25 @@
+A lightbox displays a larger version of an image when clicked and shadows the rest of the page. This project will create a lightbox gallery that displays full-size images when a thumbnail is clicked. For each image, two versions are provided: a thumbnail and a full-size image. The full-size image is the same as the thumbnail, but without the `-thumbnail` suffix.
+
+1. You should have a `div` with a class of `gallery` within your `body`.
+2. Within the `.gallery` element, you should have three image thumbnails, each with a class of `gallery-item`. You should use the following links for thumbnail images:
+
+
+ - `./images/stonehenge-thumbnail.jpg`
+ - `./images/storm-thumbnail.jpg`
+ - `./images/trees-thumbnail.jpg`
+
+3. You should have a `div` with a class of `lightbox` within your `body`.
+4. You should have a `span` with an `id` of `close` within your `.lightbox` element. You can use `×` as its text if you want.
+5. You should have a `img` with an `id` of `lightbox-image` within your `.lightbox` element.
+6. Your `.lightbox` element should cover the entire viewport, have a semi-transparent background, and center its content. Initially, its `display` property should be set to `none` to hide it.
+7. When you click one of your `.gallery-item` elements, the `.lightbox` element’s `display` property should be set to `flex` to make it, and the two elements within it, visible.
+8. When you click one of your `.gallery-item` elements, the `#lightbox-image` element’s `src` should be set to a full-size version of the image clicked by removing `-thumbnail` from the image’s `src` attribute. The full-size images are located at the following links:
+
+ - `./images/stonehenge.jpg`
+ - `./images/storm.jpg`
+ - `./images/trees.jpg`
+
+9. When your `.lightbox` element is visible and you click the `.close` button or the `.lightbox` element, the `.lightbox` elements `display` should be set back to `none`.
+10. You should use separate functions `closeLightbox` and `openLightbox` to handle the opening and closing of the lightbox.
+
+**Note:** Be sure to link your stylesheet and the JavaScript file in your HTML.
diff --git a/fullstack-cert/js-projects/lab-pokemon/index.html b/fullstack-cert/js-projects/lab-pokemon/index.html
new file mode 100644
index 000000000..dea770fde
--- /dev/null
+++ b/fullstack-cert/js-projects/lab-pokemon/index.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+
+
+ Pokémon Search App
+
+
+
+
+
+
+
Pokémon Search App
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Base
+
Stats
+
+
+
HP:
+
+
+
+
Attack:
+
+
+
+
Defense:
+
+
+
+
Sp. Attack:
+
+
+
+
Sp. Defense:
+
+
+
+
Speed:
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/lab-pokemon/script.js b/fullstack-cert/js-projects/lab-pokemon/script.js
new file mode 100644
index 000000000..091fad947
--- /dev/null
+++ b/fullstack-cert/js-projects/lab-pokemon/script.js
@@ -0,0 +1,75 @@
+const pokemonID = document.getElementById("pokemon-id");
+const pokemonName = document.getElementById("pokemon-name");
+const spriteContainer = document.getElementById("sprite-container");
+const types = document.getElementById("types");
+const height = document.getElementById("height");
+const weight = document.getElementById("weight");
+const hp = document.getElementById("hp");
+const attack = document.getElementById("attack");
+const defense = document.getElementById("defense");
+const specialAttack = document.getElementById("special-attack");
+const specialDefense = document.getElementById("special-defense");
+const speed = document.getElementById("speed");
+const searchForm = document.getElementById("search-form");
+const searchInput = document.getElementById("search-input");
+
+const getPokemon = async () => {
+ try {
+ const pokemonNameOrId = searchInput.value.toLowerCase();
+ const response = await fetch(
+ `https://pokeapi-proxy.freecodecamp.rocks/api/pokemon/${pokemonNameOrId}`
+ );
+ const data = await response.json();
+
+ // Set Pokémon info
+ pokemonName.textContent = `${data.name.toUpperCase()}`;
+ pokemonID.textContent = `#${data.id}`;
+ weight.textContent = `Weight: ${data.weight}`;
+ height.textContent = `Height: ${data.height}`;
+ spriteContainer.innerHTML = `
+
+ `;
+
+ // Set stats
+ hp.textContent = data.stats[0].base_stat;
+ attack.textContent = data.stats[1].base_stat;
+ defense.textContent = data.stats[2].base_stat;
+ specialAttack.textContent = data.stats[3].base_stat;
+ specialDefense.textContent = data.stats[4].base_stat;
+ speed.textContent = data.stats[5].base_stat;
+
+ // Set types
+ types.innerHTML = data.types
+ .map(
+ (obj) => `${obj.type.name}`
+ )
+ .join("");
+ } catch (err) {
+ resetDisplay();
+ alert("Pokémon not found");
+ console.log(`Pokémon not found: ${err}`);
+ }
+};
+
+const resetDisplay = () => {
+ const sprite = document.getElementById("sprite");
+ if (sprite) sprite.remove();
+
+ // reset stats
+ pokemonName.textContent = "";
+ pokemonID.textContent = "";
+ types.innerHTML = "";
+ height.textContent = "";
+ weight.textContent = "";
+ hp.textContent = "";
+ attack.textContent = "";
+ defense.textContent = "";
+ specialAttack.textContent = "";
+ specialDefense.textContent = "";
+ speed.textContent = "";
+};
+
+searchForm.addEventListener("submit", (e) => {
+ e.preventDefault();
+ getPokemon();
+});
diff --git a/fullstack-cert/js-projects/lab-pokemon/styles.css b/fullstack-cert/js-projects/lab-pokemon/styles.css
new file mode 100644
index 000000000..8eb3807ae
--- /dev/null
+++ b/fullstack-cert/js-projects/lab-pokemon/styles.css
@@ -0,0 +1,275 @@
+/* CSS reset */
+
+*,
+*::before,
+*::after {
+ box-sizing: border-box;
+}
+
+* {
+ margin: 0;
+}
+
+body {
+ line-height: 1.5;
+}
+
+img {
+ display: block;
+}
+
+/* Project styling */
+
+body {
+ height: 100vh;
+ font-family: sans-serif;
+ background-color: #1b1b32;
+ color: #0a0a23;
+ font-family: Verdana, Geneva, Tahoma, sans-serif;
+}
+
+main {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+}
+
+.freecodecamp-logo {
+ height: 30px;
+ margin: 25px 0;
+}
+
+h1 {
+ color: #f5f6f7;
+ font-size: 1.7em;
+ text-align: center;
+}
+
+.container {
+ width: 325px;
+ margin: 25px 0;
+ background-color: #f5f6f7;
+ border: 1px solid #f5f6f7;
+ border-radius: 15px;
+ box-shadow: 10px 10px 0px 0px rgba(223, 220, 220, 0.75);
+}
+
+.output,
+#search-form {
+ display: flex;
+ justify-content: center;
+}
+
+#search-form {
+ flex-wrap: wrap;
+ margin: 10px 0;
+ padding: 5px;
+ border-radius: 8px 8px 0 0;
+ gap: 10px;
+}
+
+label {
+ align-self: center;
+}
+
+#search-input:focus-visible,
+#search-button:focus-visible {
+ outline: 3px solid #198eee;
+}
+
+#search-input {
+ height: 40px;
+ padding-left: 10px;
+ width: 200px;
+}
+
+#search-button {
+ padding: 14px 0;
+ width: 80px;
+ border-radius: 20px;
+ text-align: center;
+ background-color: #7f21ab;
+ color: #f5f6f7;
+ border: none;
+}
+
+.output {
+ margin: 10px 0;
+ padding: 5px;
+ flex-direction: column;
+ align-items: center;
+}
+
+.top-container,
+.bottom-container {
+ display: flex;
+ flex-direction: column;
+ width: 100%;
+ min-height: 325px;
+}
+
+.top-container {
+ margin-bottom: 10px;
+ padding: 10px;
+ background-color: #f0f1f7;
+}
+
+.name-and-id {
+ height: 28px;
+ font-size: 1.1em;
+ text-transform: capitalize;
+ margin-bottom: 5px;
+}
+
+.size {
+ height: 22px;
+ font-size: 0.85rem;
+}
+
+.sprite-container {
+ flex-grow: 2;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
+#sprite {
+ width: 180px;
+}
+
+#types {
+ min-height: 30px;
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: flex-start;
+ gap: 5px;
+}
+
+.type {
+ width: 66px;
+ padding: 5px;
+ font-size: 0.7rem;
+ text-align: center;
+ border-radius: 5px;
+ background-color: red;
+ text-transform: uppercase;
+}
+
+table {
+ border-collapse: collapse;
+ border-spacing: 0;
+ width: 100%;
+ font-size: 1 rem;
+ color: #f5f6f7;
+ background-color: #7f21ab;
+}
+
+th:nth-child(even),
+td:nth-child(even) {
+ border-left: 5px solid #f5f6f7;
+}
+
+tr {
+ border-bottom: 5px solid #f5f6f7;
+}
+
+td,
+th {
+ text-align: center;
+ padding: 8px;
+}
+
+/* Special styling for Pokémon types */
+
+.normal {
+ background-color: #b7b7aa;
+}
+
+.fire {
+ background-color: #ff6f52;
+}
+
+.water {
+ background-color: #42a1ff;
+}
+
+.electric {
+ background-color: #fecc33;
+}
+
+.grass {
+ background-color: #78cc55;
+}
+
+.ice {
+ background-color: #66ccfe;
+}
+
+.fighting {
+ background-color: #d3887e;
+}
+
+.poison {
+ background-color: #c68bb7;
+}
+
+.ground {
+ background-color: #dfba52;
+}
+
+.flying {
+ background-color: #8899ff;
+}
+
+.psychic {
+ background-color: #ff66a3;
+}
+
+.bug {
+ background-color: #aabb23;
+}
+
+.rock {
+ background-color: #baaa66;
+}
+
+.ghost {
+ background-color: #9995d0;
+}
+
+.dragon {
+ background-color: #9e93f1;
+}
+
+.dark {
+ background-color: #b59682;
+}
+
+.steel {
+ background-color: #abaabb;
+}
+
+.fairy {
+ background-color: #ed99ed;
+}
+
+@media screen and (min-width: 550px) {
+ h1 {
+ font-size: 2em;
+ }
+
+ .container {
+ width: 450px;
+ }
+
+ #search-form,
+ .top-container,
+ .bottom-container {
+ width: 95%;
+ }
+
+ .type {
+ width: 75px;
+ }
+}
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/lab-pokemon/user-stories.md b/fullstack-cert/js-projects/lab-pokemon/user-stories.md
new file mode 100644
index 000000000..59036d168
--- /dev/null
+++ b/fullstack-cert/js-projects/lab-pokemon/user-stories.md
@@ -0,0 +1,22 @@
+Fulfill the user stories and pass all the tests below to complete this project. Give it your own personal style. Happy Coding!
+
+1. You should have an `input` element with an `id` of `"search-input"`
+2. You should have a `button` element with an `id` of `"search-button"`
+3. You should have an element with an `id` of `"pokemon-name"`
+4. You should have an element with an `id` of `"pokemon-id"`
+5. You should have an element with an `id` of `"weight"`
+6. You should have an element with an `id` of `"height"`
+7. You should have an element with an `id` of `"types"`
+8. You should have an element with an `id` of `"hp"`
+9. You should have an element with an `id` of `"attack"`
+10. You should have an element with an `id` of `"defense"`
+11. You should have an element with an `id` of `"special-attack"`
+12. You should have an element with an `id` of `"special-defense"`
+13. You should have an element with an `id` of `"speed"`
+14. When the `#search-input` element contains the value `Red` and the `#search-button` element is clicked, an alert should appear with the text `"Pokémon not found"`
+15. When the `#search-input` element contains the value `Pikachu` and the `#search-button` element is clicked, the values in the `#pokemon-name`, `#pokemon-id`, `#weight`, `#height`, `#hp`, `#attack`, `#defense`, `#special-attack`, `#special-defense`, and `#speed` elements should be `PIKACHU`, `#25` or `25`, `Weight: 60` or `60`, `Height: 4` or `4`, `35`, `55`, `40`, `50`, `50`, and `90`, respectively
+16. When the `#search-input` element contains the value `Pikachu` and the `#search-button` element is clicked, you should add an `img` element with the `id` of `"sprite"` and the `src` set to the Pokémon's `front_default` sprite to the page
+17. When the `#search-input` element contains the value `Pikachu` and the `#search-button` element is clicked, the `#types` element should contain a single inner element with the value `ELECTRIC`. The `#types` element content should be cleared between searches
+18. When the `#search-input` element contains the value `94` and the `#search-button` element is clicked, the values in the `#pokemon-name`, `#pokemon-id`, `#weight`, `#height`, `#hp`, `#attack`, `#defense`, `#special-attack`, `#special-defense`, and `#speed`elements should be `GENGAR`, `#94` or `94`, `Weight: 405` or `405`, `Height: 15` or `15`, `60`, `65`, `60`, `130`, `75`, and `110`, respectively
+19. When the `#search-input` element contains the value `94` and the `#search-button` element is clicked, you should add an `img` element with the `id` of `sprite` and the `src` set to the Pokémon's `front_default` sprite to the page
+1. When the `#search-input` element contains the value `94` and the `#search-button` element is clicked, the `#types` element should contain two inner elements with the text values `GHOST` and `POISON`, respectively. The `#types` element content should be cleared between searches.
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/lab-pyramid-generator/script.js b/fullstack-cert/js-projects/lab-pyramid-generator/script.js
new file mode 100644
index 000000000..c4bd7e2d8
--- /dev/null
+++ b/fullstack-cert/js-projects/lab-pyramid-generator/script.js
@@ -0,0 +1,13 @@
+function pyramid(char, count, isInverted) {
+ const rows = []
+ for (let i = 1; i <= count; i++) {
+ if (isInverted) {
+ rows.unshift(" ".repeat(count - i) + char.repeat(2 * i - 1))
+ } else {
+ rows.push(" ".repeat(count - i) + char.repeat(2 * i - 1))
+ }
+ }
+ return "\n" + rows.join("\n");
+}
+
+console.log(pyramid("#", 10, false))
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/lab-pyramid-generator/user-stories.md b/fullstack-cert/js-projects/lab-pyramid-generator/user-stories.md
new file mode 100644
index 000000000..1861fc58c
--- /dev/null
+++ b/fullstack-cert/js-projects/lab-pyramid-generator/user-stories.md
@@ -0,0 +1,8 @@
+1. You should have a function named `pyramid` that takes three arguments.
+1. The first argument should be a string representing the pattern character to repeat in your pyramid.
+1. The second argument should be an integer representing the number of rows in the pyramid.
+1. The third argument should be a Boolean value.
+1. The `pyramid` function should return a string in which the pattern character is repeated and arranged to form a pyramid having the vertex facing upwards when the third argument is `false`.
+1. When the third argument is `true` the pyramid should have the vertex facing downwards.
+1. The vertex row should have a single pattern character, and each other row should have two pattern characters more than the previous one.
+
diff --git a/fullstack-cert/js-projects/lab-realtime-character-counter/index.html b/fullstack-cert/js-projects/lab-realtime-character-counter/index.html
new file mode 100644
index 000000000..13735e6c2
--- /dev/null
+++ b/fullstack-cert/js-projects/lab-realtime-character-counter/index.html
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+ Real-time Character Counter
+
+
+
+
+
Real-Time Character Counter
+
+
Character Count: 0/50
+
+
+
+
+
+
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/lab-realtime-character-counter/script.js b/fullstack-cert/js-projects/lab-realtime-character-counter/script.js
new file mode 100644
index 000000000..34eb90bba
--- /dev/null
+++ b/fullstack-cert/js-projects/lab-realtime-character-counter/script.js
@@ -0,0 +1,17 @@
+document.getElementById("textInput").addEventListener("input", function () {
+ let textInput = document.getElementById("textInput");
+ let charCount = textInput.value.length;
+
+ if (charCount > 50) {
+ textInput.value = textInput.value.substring(0, 50);
+ charCount = 50;
+ }
+
+ let charCountDisplay = document.getElementById("charCount");
+ charCountDisplay.innerHTML = `Character Count: ${charCount}/50`;
+
+ if (charCount === 50) {
+ charCountDisplay.style.color = "red";
+ }
+
+});
diff --git a/fullstack-cert/js-projects/lab-realtime-character-counter/styles.css b/fullstack-cert/js-projects/lab-realtime-character-counter/styles.css
new file mode 100644
index 000000000..79d023d23
--- /dev/null
+++ b/fullstack-cert/js-projects/lab-realtime-character-counter/styles.css
@@ -0,0 +1,44 @@
+body {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ height: 100vh;
+ font-family: Arial, sans-serif;
+ background-color: #c0c1ec;
+ margin: 0;
+}
+
+h1{
+ background-color: #f2f48b;
+ padding-left: 10px;
+ padding-right: 10px;
+}
+.container {
+ text-align: center;
+}
+
+textarea {
+ width: 300px;
+ height: 100px;
+ font-size: 18px;
+ padding: 10px;
+ border: 1px solid #ccc;
+ border-radius: 5px;
+ resize: none;
+ display: block;
+ margin: 0 auto;
+ border: 1px solid slategray;
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
+}
+
+textarea:focus {
+ outline: none;
+ border-color: #f2f48b;
+}
+
+#charCount {
+ margin-top: 10px;
+ font-size: 18px;
+ color: darkslategray;
+ font-weight: bold;
+}
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/lab-realtime-character-counter/user-stories.md b/fullstack-cert/js-projects/lab-realtime-character-counter/user-stories.md
new file mode 100644
index 000000000..259ff9bdc
--- /dev/null
+++ b/fullstack-cert/js-projects/lab-realtime-character-counter/user-stories.md
@@ -0,0 +1,15 @@
+You should have an `h1` element with the text `Real-Time Character Counter`.
+
+You should have a `textarea` element with the `id` of `textInput`. It should have a `placeholder` attribute with the text `Type something...`.
+
+There should be a `p` element with the `id` of `charCount`. It should initially contain the text `Character Count: 0/50`. This placeholder text should be replaced with the current count of characters in the `textarea` element.
+
+You should attach an event listener to the `textInput` element that listens for the `input` event.
+
+Inside the event trigger function, you should get the value of the `textarea` element and store it in the variable `textInput`. You should also declare a variable `charCount` and set it equal to the length of the `textInput` variable.
+
+Create a condition that checks if the current character count is greater than `50`. If it is, the user shouldn't be able to enter more characters.
+
+Get the character count display element by its ID and update the text to show the current character count using `innerHTML`.
+
+If the character count is equal to `50`, the text should be displayed in `red`.
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/lab-recursion/script.js b/fullstack-cert/js-projects/lab-recursion/script.js
new file mode 100644
index 000000000..deee9d767
--- /dev/null
+++ b/fullstack-cert/js-projects/lab-recursion/script.js
@@ -0,0 +1,11 @@
+const permuteString = (str, prefix = '', result = []) => {
+ if (str.length === 0) {
+ result.push(prefix);
+ return result;
+ }
+ for (let i = 0; i < str.length; i++) {
+ const rem = str.slice(0, i) + str.slice(i + 1);
+ permuteString(rem, prefix + str[i], result);
+ }
+ return result;
+};
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/lab-recursion/user-stories.md b/fullstack-cert/js-projects/lab-recursion/user-stories.md
new file mode 100644
index 000000000..e41f5880d
--- /dev/null
+++ b/fullstack-cert/js-projects/lab-recursion/user-stories.md
@@ -0,0 +1,6 @@
+1. You should create a function named `permuteString`.
+1. The `permuteString` function should take three parameters, `str`, `prefix` and an empty array named `result`.
+1. Check if the length of the string is 0. If it is, push the current prefix to the results and return the results.
+1. Implement a loop to iterate over each character in the `str`.
+1. In each iteration, remove the current character from the string and call the `permuteString` function recursively with updated arguments to build the remaining permutations.
+1. You should return the `result` array.
diff --git a/fullstack-cert/js-projects/lab-sentence-maker/script.js b/fullstack-cert/js-projects/lab-sentence-maker/script.js
new file mode 100644
index 000000000..268ed0cd3
--- /dev/null
+++ b/fullstack-cert/js-projects/lab-sentence-maker/script.js
@@ -0,0 +1,33 @@
+// Build a sentence maker
+
+//Objective: create 2 different stories using the same template
+// Reassign the variables to create a new story
+
+// Words to fill in the placeholders
+let adjective = "funny";
+let noun = "dragon";
+let verb = "jumping";
+let place = "garden";
+let adjective2 = "sparkling";
+let noun2 = "cakes";
+
+const firstStory = `Once upon a time, there was a(n) ${adjective} ${noun} who loved to eat ${noun2}.
+The ${noun} lived in a ${place} and had ${adjective2} nostrils that blew fire when it was ${verb}.`;
+
+// output the story
+console.log("First story:\n" + firstStory);
+
+// reassign the variables
+
+adjective = "cute";
+noun = "puppy";
+verb = "barking";
+place = "park";
+adjective2 = "colorful";
+noun2 = "flower";
+
+// create the second story
+const secondStory = `Once upon a time, there was a(n) ${adjective} ${noun} who loved to eat ${noun2}.
+The ${noun} lived in a ${place} and had ${adjective2} nostrils that blew fire when it was ${verb}.`;
+
+console.log("Second story:\n" + secondStory);
diff --git a/fullstack-cert/js-projects/lab-sentence-maker/user-stories.md b/fullstack-cert/js-projects/lab-sentence-maker/user-stories.md
new file mode 100644
index 000000000..3644f26c8
--- /dev/null
+++ b/fullstack-cert/js-projects/lab-sentence-maker/user-stories.md
@@ -0,0 +1,23 @@
+1. You should declare the following variables using `let`:
+- `adjective`
+- `noun`
+- `verb`
+- `place`
+- `adjective2`
+- `noun2`
+
+1. You should assign the above variables some string values of your choice.
+
+1. You should declare a `firstStory` variable using `const` to store the first story.
+
+1. You should use the following story template to create the first story and assign it to the `firstStory` variable:
+
+`"Once upon a time, there was a(n) [adjective] [noun] who loved to eat [noun2]. The [noun] lived in a [place] and had [adjective2] nostrils that blew fire when it was [verb]."`;
+
+1. You should output your first story to the console using the message `"First story:\n" + firstStory`.
+
+1. You should assign new values to your `adjective`, `noun`, `verb`, `place`, `adjective2`, and `noun2` variables.
+
+1. Create another story using the same template and assign it to the `secondStory` variable.
+
+1. You should output your second story to the console using the message `"Second story:\n" + secondStory`.
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/library-manager/script.js b/fullstack-cert/js-projects/library-manager/script.js
new file mode 100644
index 000000000..e2d1279e3
--- /dev/null
+++ b/fullstack-cert/js-projects/library-manager/script.js
@@ -0,0 +1,105 @@
+// Initialize the library with some books – we can make campers fill in the first two, then supply the rest ourselves.
+const library = [
+ {
+ title: 'Your Next Five Moves: Master the Art of Business Strategy',
+ author: 'Patrick Bet-David and Greg Dinkin',
+ about: 'A book on how to plan ahead',
+ pages: 320,
+ },
+ {
+ title: 'Atomic Habits',
+ author: 'James Clear',
+ about:
+ 'A practical book about discarding bad habits and building good ones',
+ pages: 320,
+ },
+ {
+ title:
+ 'Choose Your Enemies Wisely: Business Planning for the Audacious Few',
+ author: 'Patrick Bet-David',
+ about:
+ "A book that emphasizes the importance of identifying and understanding one's adversaries to succeed in the business world",
+ pages: 304,
+ },
+ {
+ title: 'The Embedded Entrepreneur',
+ author: 'Arvid Kahl',
+ about: 'A book focusing on how to build an audience-driven business',
+ pages: 308,
+ },
+ {
+ title:
+ 'How to Be a Coffee Bean: 111 Life-Changing Ways to Create Positive Change',
+ author: 'Jon Gordon',
+ about: 'A book about effective ways to lead a coffee bean lifestyle',
+ pages: 256,
+ },
+ {
+ title:
+ 'The Creative Mindset: Mastering the Six Skills That Empower Innovation',
+ author: 'Jeff DeGraff and Staney DeGraff',
+ about: 'A book on how to develop creativity and innovation skills',
+ pages: 168,
+ },
+ {
+ title: 'Rich Dad Poor Dad',
+ author: 'Robert Kiyosaki and Sharon Lechter',
+ about:
+ 'A book about financial literacy, financial independence, and building wealth. ',
+ pages: 336,
+ },
+ {
+ title: 'Zero to Sold',
+ author: 'Arvid Kahl',
+ about: 'A book on how to bootstrap a business',
+ pages: 500,
+ },
+];
+
+// Get books' summaries with map()
+function getBookSummaries(catalog) {
+ return catalog.map(
+ (book) =>
+ `${book.title}, ${
+ book.about.charAt(0).toLowerCase() + book.about.slice(1)
+ }`
+ );
+}
+
+// Display books with forEach()
+function displayBooks(catalog) {
+ let output = 'Books in the Library:\n';
+
+ catalog.forEach((book) => {
+ output += `- ${book.title} by ${book.author} (${book.pages} pages)\n`;
+ });
+
+ return output;
+}
+
+// Filter book by a particular author with filter()
+function getBooksByAuthor(catalog, author) {
+ return catalog.filter((book) => book.author === author);
+}
+
+// Use reduce() to calculate total number of pages of books in the library
+function getTotalPages(catalog) {
+ return catalog.reduce((acc, book) => acc + book.pages, 0);
+}
+
+const bookSummaries = getBookSummaries(library);
+console.log('Book summaries:', bookSummaries);
+console.log('\n');
+
+const libraryBooks = displayBooks(library);
+console.log(libraryBooks);
+console.log('\n');
+
+const booksByArvidKahl = getBooksByAuthor(library, 'Arvid Kahl');
+console.log(`Books by Arvid Kahl:`, booksByArvidKahl);
+console.log('\n');
+
+const totalPagesOfBooksInLibrary = getTotalPages(library);
+console.log(
+ `Total number of pages of books in the library: ${totalPagesOfBooksInLibrary}`
+);
diff --git a/fullstack-cert/js-projects/linked-lists/script.js b/fullstack-cert/js-projects/linked-lists/script.js
new file mode 100644
index 000000000..2bdfbfaa4
--- /dev/null
+++ b/fullstack-cert/js-projects/linked-lists/script.js
@@ -0,0 +1,51 @@
+class LinkedList {
+ constructor() {
+ this.length = 0;
+ this.head = null;
+ }
+
+ Node = class {
+ constructor(element) {
+ this.element = element;
+ this.next = null;
+ }
+ }
+
+ isEmpty() {
+ return this.length === 0;
+ }
+
+ add(element) {
+ const node = new this.Node(element)
+ if (this.isEmpty()) {
+ this.head = node;
+ } else {
+ let currentNode = this.head;
+ while (currentNode.next !== null) {
+ currentNode = currentNode.next;
+ }
+ currentNode.next = node;
+ }
+ this.length++;
+ }
+
+ remove(element) {
+ if (this.isEmpty()) {
+ return
+ }
+ let previousNode;
+ let currentNode = this.head;
+ while (currentNode.next !== null && currentNode.element !== element) {
+ previousNode = currentNode;
+ currentNode = currentNode.next;
+ }
+ if (currentNode.next === null && currentNode.element !== element) {
+ return;
+ } else if (previousNode) {
+ previousNode.next = currentNode.next
+ } else {
+ this.head = currentNode.next;
+ }
+ this.length--
+ }
+}
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/linked-lists/user-stories.md b/fullstack-cert/js-projects/linked-lists/user-stories.md
new file mode 100644
index 000000000..950ab0d73
--- /dev/null
+++ b/fullstack-cert/js-projects/linked-lists/user-stories.md
@@ -0,0 +1,17 @@
+1. You should create a class named `LinkedList` to represent a linked list data structure.
+
+1. Each time a new `LinkedList` object is instantiated its `length` and `head` properties should be set to `0` and `null`, respectively.
+
+1. The `LinkedList` class should have a property `Node`, which is a class instantiated with an `element` property set to the value passed at the instantiation, and a `next` property set to `null`.
+
+1. The `LinkedList` class should have a method `isEmpty` that returns `true` if the linked list is empty, and `false` otherwise.
+
+1. The `LinkedList` class should have a method `add` that creates a `Node` object from its argument and adds it to the linked list.
+
+1. The `add` method should either set the head to the new node when the node to be added is the first, or set the `next` property of the last node in the linked list to the node to be added.
+
+1. Each time a new node is added to the list the length of the list should be incremented.
+
+1. The `LinkedList` class should have a method `remove` that takes a single argument and removes the corresponding node from the list.
+
+1. Whenever a node is removed from the linked list, the `next` property of the previous node should be set to the following node, and the length of the list should be decremented.
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/loan-qualification-checker/script.js b/fullstack-cert/js-projects/loan-qualification-checker/script.js
new file mode 100644
index 000000000..282b13912
--- /dev/null
+++ b/fullstack-cert/js-projects/loan-qualification-checker/script.js
@@ -0,0 +1,63 @@
+const annualIncome = parseFloat(prompt('Enter your annual income:'));
+const creditScore = parseFloat(prompt('Enter your credit score:'));
+
+const minIncomeForDuplex = 60000;
+const minCreditScoreForDuplex = 700;
+
+const minIncomeForCar = 30000;
+const minCreditScoreForCar = 650;
+
+const minIncomeForCondo = 45000;
+const minCreditScoreForCondo = 680;
+
+// get what they're qualified for
+
+/*
+// let's get campers to log the loanMessage to the console first before constructing the qualification message
+
+// We can also get them to log the income or credit score they enter to the console within the if block before showing them they can combine conditions.
+
+if (income >= minIncomeDuplex && creditScore >= minCreditScoreDuplex) {
+ loanMessage = 'You qualify for: \n- Duplex loan\n- Car loan\n- Condo loan\n';
+} else if (income >= minIncomeCondo && creditScore >= minCreditScoreCondo) {
+ loanMessage = 'You qualify for: \n- Car loan\n- Condo loan\n';
+} else if (income >= minIncomeCar && creditScore >= minCreditScoreCar) {
+ loanMessage = 'You qualify for: \n- Car loan\n';
+} else {
+ loanMessage = 'You do not qualify for any loans.';
+}
+
+console.log(loanMessage);
+*/
+
+let loanMessage = ''; // this will be a part of the qualification message, which in turn will be a part of the final message
+
+if (
+ annualIncome >= minIncomeForDuplex &&
+ creditScore >= minCreditScoreForDuplex
+) {
+ loanMessage = '- Duplex loan\n- Car loan\n- Condo loan\n';
+} else if (
+ annualIncome >= minIncomeForCondo &&
+ creditScore >= minCreditScoreForCondo
+) {
+ loanMessage = '- Car loan\n- Condo loan\n';
+} else if (
+ annualIncome >= minIncomeForCar &&
+ creditScore >= minCreditScoreForCar
+) {
+ loanMessage = '- Car loan\n';
+} else {
+ loanMessage = '';
+}
+
+let qualificationMessage =
+ 'You qualify for the following loan(s):\n \n' + loanMessage;
+
+if (qualificationMessage === 'You qualify for the following loan(s):\n \n') {
+ qualificationMessage = 'You do not qualify for any loans.';
+}
+
+const finalMessage = `Your credit score is ${creditScore}. So, ${qualificationMessage}`;
+
+console.log(finalMessage);
diff --git a/fullstack-cert/js-projects/markdown-parser/index.html b/fullstack-cert/js-projects/markdown-parser/index.html
new file mode 100644
index 000000000..6882cea71
--- /dev/null
+++ b/fullstack-cert/js-projects/markdown-parser/index.html
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+ Markdown to HTML Converter
+
+
+
+
+
Markdown to HTML Converter
+
+
HTML:
+
+
+
+
+
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/markdown-parser/script.js b/fullstack-cert/js-projects/markdown-parser/script.js
new file mode 100644
index 000000000..68c4e4f7d
--- /dev/null
+++ b/fullstack-cert/js-projects/markdown-parser/script.js
@@ -0,0 +1,62 @@
+const patternReplacementArray = [
+ { h6: [/^######[ \t](.+$)/gm, "
` |
+
+1. When you input text inside `#markdown-input`, the raw HTML code returned by `convertMarkdown` should be displayed inside `#html-ouput`.
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/math-bot/script.js b/fullstack-cert/js-projects/math-bot/script.js
new file mode 100644
index 000000000..d766a67fc
--- /dev/null
+++ b/fullstack-cert/js-projects/math-bot/script.js
@@ -0,0 +1,51 @@
+// review strings and string concatenation
+const botName = "MathBot";
+const greeting = `Hi there! My name is ${botName} and I want to teach you about the different Math methods in JavaScript.`;
+
+console.log(greeting);
+
+console.log(
+ "The Math.random() method returns a pseudo random number between 0 and less than 1."
+);
+
+// when writing tests make sure they don't hard code a number value here
+const randomNum = Math.random();
+console.log(randomNum);
+
+console.log("Now, generate a random number between two values.");
+const max = 100;
+const min = 1;
+
+// teach them how to generate a random number between two values
+const randomNum2 = Math.random() * (max - min) + min;
+console.log(randomNum2);
+
+console.log(
+ "The Math.floor() method rounds the value down to the nearest whole integer."
+);
+const numRoundedDown = Math.floor(6.7);
+console.log(numRoundedDown);
+
+console.log(
+ "The Math.ceil() method rounds the value up to the nearest whole integer."
+);
+const numRoundedUp = Math.ceil(3.2);
+console.log(numRoundedUp);
+
+console.log(
+ "The Math.round() method rounds the value to the nearest whole integer."
+);
+const numRounded = Math.round(2.7);
+console.log(numRounded);
+const numRounded2 = Math.round(11.2);
+console.log(numRounded2);
+
+console.log(
+ "The Math.max() and Math.min() methods are used to get the maximum and minimum number from a range."
+);
+const maxNum = Math.max(3, 125, 55, 24);
+console.log(maxNum);
+const minNum = Math.min(6, 90, 14, 90, 2);
+console.log(minNum);
+
+console.log("It was fun learning about the different Math methods with you!");
diff --git a/fullstack-cert/js-projects/music-instrument-filter/index.html b/fullstack-cert/js-projects/music-instrument-filter/index.html
new file mode 100644
index 000000000..3b1279440
--- /dev/null
+++ b/fullstack-cert/js-projects/music-instrument-filter/index.html
@@ -0,0 +1,69 @@
+
+
+
+
+
+ Music Instruments product page
+
+
+
+
Student Instruments
+
+
+
+
+
+
+
+
+
Flute
+
$500
+
+
+
Clarinet
+
$200
+
+
+
Oboe
+
$4000
+
+
+
+
Trumpet
+
$200
+
+
+
Trombone
+
$300
+
+
+
French Horn
+
$4300
+
+
+
+
Drum Set
+
$500
+
+
+
Xylophone
+
$3000
+
+
+
Cymbals
+
$200
+
+
+
Marimba
+
$3000
+
+
+
+
+
+
diff --git a/fullstack-cert/js-projects/music-instrument-filter/script.js b/fullstack-cert/js-projects/music-instrument-filter/script.js
new file mode 100644
index 000000000..80f4e594f
--- /dev/null
+++ b/fullstack-cert/js-projects/music-instrument-filter/script.js
@@ -0,0 +1,52 @@
+// have campers add the first 3 objects, then add the rest
+const instrumentsArr = [
+ { category: "woodwinds", instrument: "Flute", price: 500 },
+ { category: "woodwinds", instrument: "Clarinet", price: 200 },
+ { category: "woodwinds", instrument: "Oboe", price: 4000 },
+ { category: "brass", instrument: "Trumpet", price: 200 },
+ { category: "brass", instrument: "Trombone", price: 300 },
+ { category: "brass", instrument: "French Horn", price: 4300 },
+ { category: "percussion", instrument: "Drum Set", price: 500 },
+ { category: "percussion", instrument: "Xylophone", price: 3000 },
+ { category: "percussion", instrument: "Cymbals", price: 200 },
+ { category: "percussion", instrument: "Marimba", price: 3000 },
+];
+
+const selectContainer = document.querySelector("select");
+const productsContainer = document.querySelector(".products-container");
+
+// build out function in pieces
+// first start with return filtered arr. have them test it with console statements
+// then chain map and have them test
+// then chain join and have them test
+
+function instrumentCards(instrumentCategory) {
+ // have a step just to return instruments
+ const instruments =
+ instrumentCategory === "all"
+ ? instrumentsArr
+ : instrumentsArr.filter(
+ ({ category }) => category === instrumentCategory
+ );
+
+ return instruments
+ .map(({ instrument, price }) => {
+ return `
+
+
${instrument}
+
$${price}
+
+ `;
+ })
+ .join("");
+}
+
+selectContainer.addEventListener("change", () => {
+ // have campers add this test just to make sure the change event is working
+ // console.log("this is a test");
+
+ // have them test just getting the value
+ // console.log(selectContainer.value);
+
+ productsContainer.innerHTML = instrumentCards(selectContainer.value);
+});
diff --git a/fullstack-cert/js-projects/music-instrument-filter/styles.css b/fullstack-cert/js-projects/music-instrument-filter/styles.css
new file mode 100644
index 000000000..dc634b15c
--- /dev/null
+++ b/fullstack-cert/js-projects/music-instrument-filter/styles.css
@@ -0,0 +1,56 @@
+*,
+*::before,
+*::after {
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
+}
+
+:root {
+ --dark-grey: #0a0a23;
+ --white: #ffffff;
+ --yellow: #f1be32;
+}
+
+body {
+ background-color: var(--dark-grey);
+ color: var(--white);
+}
+
+h1 {
+ text-align: center;
+ margin-top: 20px;
+}
+
+.select-container {
+ display: block;
+ margin: 25px auto;
+ padding: 8px;
+ border: 4px solid var(--white);
+ border-radius: 4px;
+ width: 200px;
+}
+
+.products-container {
+ display: flex;
+ flex-direction: column;
+ flex-wrap: wrap;
+ align-items: center;
+ justify-content: center;
+ gap: 20px;
+}
+
+@media (min-width: 760px) {
+ .products-container {
+ flex-direction: row;
+ }
+}
+
+.card {
+ background-color: var(--white);
+ color: var(--dark-grey);
+ border: 4px solid var(--yellow);
+ border-radius: 5px;
+ padding: 10px;
+ width: 200px;
+}
diff --git a/fullstack-cert/js-projects/music-player-lab/index.html b/fullstack-cert/js-projects/music-player-lab/index.html
new file mode 100644
index 000000000..5f9f9dc29
--- /dev/null
+++ b/fullstack-cert/js-projects/music-player-lab/index.html
@@ -0,0 +1,165 @@
+
+
+
+
+
+
+
+
+
+
+ Build a Music Player App
+
+
+
+
+
+
+
+
+
+
+
+
freeCodeCamp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Playlist
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/music-player-lab/script.js b/fullstack-cert/js-projects/music-player-lab/script.js
new file mode 100644
index 000000000..24ef93c1d
--- /dev/null
+++ b/fullstack-cert/js-projects/music-player-lab/script.js
@@ -0,0 +1,198 @@
+const playlistSongs = document.getElementById("playlist-songs");
+const playButton = document.getElementById("play");
+const pauseButton = document.getElementById("pause");
+const nextButton = document.getElementById("next");
+const previousButton = document.getElementById("previous");
+
+const allSongs = [
+ {
+ id: 0,
+ title: "Scratching The Surface",
+ artist: "Quincy Larson",
+ duration: "4:25",
+ src: "https://cdn.freecodecamp.org/curriculum/js-music-player/scratching-the-surface.mp3",
+ },
+ {
+ id: 1,
+ title: "Can't Stay Down",
+ artist: "Quincy Larson",
+ duration: "4:15",
+ src: "https://cdn.freecodecamp.org/curriculum/js-music-player/can't-stay-down.mp3",
+ },
+ {
+ id: 2,
+ title: "Still Learning",
+ artist: "Quincy Larson",
+ duration: "3:51",
+ src: "https://cdn.freecodecamp.org/curriculum/js-music-player/still-learning.mp3",
+ },
+ {
+ id: 3,
+ title: "Cruising for a Musing",
+ artist: "Quincy Larson",
+ duration: "3:34",
+ src: "https://cdn.freecodecamp.org/curriculum/js-music-player/cruising-for-a-musing.mp3",
+ },
+ {
+ id: 4,
+ title: "Never Not Favored",
+ artist: "Quincy Larson",
+ duration: "3:35",
+ src: "https://cdn.freecodecamp.org/curriculum/js-music-player/never-not-favored.mp3",
+ },
+ {
+ id: 5,
+ title: "From the Ground Up",
+ artist: "Quincy Larson",
+ duration: "3:12",
+ src: "https://cdn.freecodecamp.org/curriculum/js-music-player/from-the-ground-up.mp3",
+ },
+ {
+ id: 6,
+ title: "Walking on Air",
+ artist: "Quincy Larson",
+ duration: "3:25",
+ src: "https://cdn.freecodecamp.org/curriculum/js-music-player/walking-on-air.mp3",
+ },
+ {
+ id: 7,
+ title: "Can't Stop Me. Can't Even Slow Me Down.",
+ artist: "Quincy Larson",
+ duration: "3:52",
+ src: "https://cdn.freecodecamp.org/curriculum/js-music-player/cant-stop-me-cant-even-slow-me-down.mp3",
+ },
+ {
+ id: 8,
+ title: "The Surest Way Out is Through",
+ artist: "Quincy Larson",
+ duration: "3:10",
+ src: "https://cdn.freecodecamp.org/curriculum/js-music-player/the-surest-way-out-is-through.mp3",
+ },
+ {
+ id: 9,
+ title: "Chasing That Feeling",
+ artist: "Quincy Larson",
+ duration: "2:43",
+ src: "https://cdn.freecodecamp.org/curriculum/js-music-player/chasing-that-feeling.mp3",
+ }
+];
+
+const audio = new Audio();
+let userData = {
+ songs: allSongs,
+ currentSong: null,
+ songCurrentTime: 0,
+};
+
+const playSong = (id, start = true) => {
+ const song = userData.songs.find((song) => song.id === id);
+ audio.src = song.src;
+ audio.title = song.title;
+
+ if (
+ userData.currentSong === null ||
+ playButton.classList.contains("playing") ||
+ start
+ ) {
+ audio.currentTime = 0;
+ } else {
+ audio.currentTime = userData.songCurrentTime;
+ }
+ userData.currentSong = song;
+ playButton.classList.add("playing");
+
+ highlightCurrentSong();
+ setPlayerDisplay();
+ setPlayButtonAccessibleText();
+ audio.play();
+};
+
+const pauseSong = () => {
+ userData.songCurrentTime = audio.currentTime;
+ playButton.classList.remove("playing");
+ audio.pause();
+};
+
+const getCurrentSongIndex = () => userData.songs.indexOf(userData.currentSong);
+
+const getNextSong = () => userData.songs[getCurrentSongIndex() + 1];
+
+const getPreviousSong = () => userData.songs[getCurrentSongIndex() - 1];
+
+const playNextSong = () => {
+ if (userData.currentSong === null) {
+ playSong(userData.songs[0].id);
+ return
+ }
+ const nextSong = getNextSong();
+ if (nextSong) {
+ playSong(nextSong.id);
+ } else {
+ userData.currentSong = null;
+ userData.songCurrentTime = 0;
+ pauseSong();
+ setPlayerDisplay();
+ highlightCurrentSong();
+ setPlayButtonAccessibleText();
+ }
+};
+
+const playPreviousSong = () => {
+ if (userData.currentSong === null) return;
+ const previousSong = getPreviousSong();
+ if (previousSong) {
+ playSong(previousSong.id);
+ } else {
+ playSong(userData.songs[0].id);
+ }
+};
+
+const setPlayerDisplay = () => {
+ const playingSong = document.getElementById("player-song-title");
+ const songArtist = document.getElementById("player-song-artist");
+ const currentTitle = userData.currentSong?.title;
+ const currentArtist = userData.currentSong?.artist;
+
+ playingSong.textContent = currentTitle ? currentTitle : "";
+ songArtist.textContent = currentArtist ? currentArtist : "";
+};
+
+const highlightCurrentSong = () => {
+ const playlistSongElements = document.querySelectorAll(".playlist-song");
+ const songToHighlight = document.getElementById(
+ `song-${userData.currentSong?.id}`
+ );
+
+ playlistSongElements.forEach((songEl) => {
+ songEl.removeAttribute("aria-current");
+ });
+
+ if (songToHighlight) songToHighlight.setAttribute("aria-current", "true");
+};
+
+const setPlayButtonAccessibleText = () => {
+ const song = userData.currentSong || userData.songs[0];
+
+ playButton.setAttribute(
+ "aria-label",
+ song.title ? `Play ${song.title}` : "Play"
+ );
+};
+
+playButton.addEventListener("click", () => {
+ if (userData.currentSong === null) {
+ playSong(userData.songs[0].id);
+ } else {
+ playSong(userData.currentSong.id, false);
+ }
+});
+
+pauseButton.addEventListener("click", pauseSong);
+
+nextButton.addEventListener("click", playNextSong);
+
+previousButton.addEventListener("click", playPreviousSong);
+
+audio.addEventListener("ended", playNextSong);
+
+setPlayButtonAccessibleText();
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/music-player-lab/styles.css b/fullstack-cert/js-projects/music-player-lab/styles.css
new file mode 100644
index 000000000..1078389a4
--- /dev/null
+++ b/fullstack-cert/js-projects/music-player-lab/styles.css
@@ -0,0 +1,369 @@
+:root {
+ /* colors */
+ --primary-color: #dfdfe2;
+ --secondary-color: #ffffff;
+ --app-background-color: #4d4d62;
+ --background-color: #1b1b32;
+ --foreground-color: #3b3b4f;
+ --highlight-color: #f1be32;
+
+ /* font sizes */
+ --root-font-size: 16px;
+ font-size: var(--root-font-size);
+
+ /* font-families */
+ --font-headline: "Roboto Mono", monospace;
+ --font-family: "Lato", sans-serif;
+ }
+
+ *,
+ *::after,
+ *::before {
+ box-sizing: border-box;
+ }
+
+ body {
+ background-color: var(--app-background-color);
+ color: var(--primary-color);
+ font-family: var(--font-family);
+ }
+
+ h1 {
+ font-size: 1.125rem;
+ line-height: 1.6;
+ }
+
+ h2 {
+ font-size: var(--root-font-size);
+ }
+
+ ul {
+ margin: 0;
+ }
+
+ .container {
+ margin-top: 10px;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ row-gap: 5px;
+ }
+
+ .player,
+ .playlist {
+ width: 450px;
+ background-color: var(--background-color);
+ border: 3px solid var(--foreground-color);
+ }
+
+ .player {
+ height: 260px;
+ padding: 10px;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ row-gap: 10px;
+ }
+
+ .player-bar,
+ .playlist-bar {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 0 5px;
+ width: 100%;
+ height: 30px;
+ background-color: var(--foreground-color);
+ }
+
+ .parallel-lines {
+ display: flex;
+ flex-wrap: wrap;
+ row-gap: 6px;
+ padding: 0 5px;
+ }
+
+ .parallel-lines > div {
+ height: 2px;
+ width: 100%;
+ min-width: 75px;
+ background-color: var(--highlight-color);
+ }
+
+ .fcc-title,
+ .playlist-title {
+ color: var(--secondary-color);
+ margin: 0 10px;
+ font-family: var(--font-headline);
+ }
+
+ .player-content {
+ display: flex;
+ background-color: var(--foreground-color);
+ width: 430px;
+ height: 200px;
+ column-gap: 13px;
+ align-items: center;
+ justify-content: center;
+ }
+
+ #player-album-art {
+ background-color: var(--secondary-color);
+ border: 6px solid var(--background-color);
+ }
+
+ #player-album-art img {
+ width: 150px;
+ display: block;
+ }
+
+ .player-display {
+ display: flex;
+ flex-direction: column;
+ row-gap: 20px;
+ padding: 14px;
+ background-color: var(--background-color);
+ height: 153px;
+ width: 226px;
+ }
+
+ .player-display-song-artist {
+ height: 80px;
+ }
+
+ .player-buttons svg {
+ fill: var(--primary-color);
+ }
+
+ .playing > svg {
+ fill: var(--highlight-color);
+ }
+
+ .player-buttons {
+ display: flex;
+ justify-content: space-around;
+ }
+
+ button {
+ background: transparent;
+ border: none;
+ color: var(--primary-color);
+ cursor: pointer;
+ font-size: var(--root-font-size);
+ outline-color: var(--highlight-color);
+ text-align: center;
+ }
+
+ .playlist-song {
+ outline-color: var(--highlight-color);
+ }
+
+ .playlist li:not(:last-child) {
+ border-bottom: 1px solid var(--background-color);
+ }
+
+ button:focus,
+ .playlist-song:focus {
+ outline-style: dashed;
+ outline-width: 2px;
+ }
+
+ /* Playlist */
+ .playlist {
+ height: auto;
+ padding: 10px;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ row-gap: 10px;
+ }
+
+ #playlist-songs {
+ width: 430px;
+ height: 100%;
+ background-color: var(--foreground-color);
+ display: flex;
+ flex-direction: column;
+ row-gap: 8px;
+ padding: 8px 9px;
+ visibility: visible;
+ justify-content: start;
+ list-style: none;
+ }
+
+ .playlist-song {
+ display: flex;
+ height: 55px;
+ justify-content: space-between;
+ align-items: center;
+ padding: 5px;
+ }
+
+ [aria-current="true"] {
+ background-color: var(--background-color);
+ }
+
+ [aria-current="true"] p {
+ color: var(--highlight-color);
+ }
+
+ .playlist-song-info {
+ height: 100%;
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ justify-content: space-around;
+ column-gap: 7px;
+ padding: 5px 0;
+ font-family: var(--font-family);
+ }
+
+ #player-song-title,
+ #player-song-artist {
+ margin: 0;
+ }
+
+ #player-song-artist {
+ color: var(--highlight-color);
+ font-size: 0.75rem;
+ }
+
+ #player-song-title {
+ font-size: 1.125rem;
+ }
+
+ .playlist-song-title {
+ font-size: 0.85rem;
+ width: 241px;
+ text-align: left;
+ }
+
+ .playlist-song-artist {
+ font-size: 0.725rem;
+ width: 80px;
+ }
+
+ .playlist-song-duration {
+ font-size: 0.725rem;
+ margin: auto;
+ font-family: var(--font-headline);
+ width: 30px;
+ }
+
+ .playlist-song-delete {
+ padding: 0;
+ width: 20px;
+ height: 20px;
+ }
+
+ .playlist-song-delete,
+ .playlist-song-delete {
+ fill: var(--foreground-color);
+ }
+
+ .playlist-song-delete:hover circle,
+ .playlist-song-delete:focus circle {
+ fill: #ff0000;
+ }
+
+ @media (max-width: 700px) {
+ .player,
+ .playlist {
+ width: 300px;
+ }
+
+ .player {
+ height: 340px;
+ }
+
+ #playlist-songs {
+ height: 280px;
+ padding: 5px 6px;
+ overflow-y: scroll;
+ overflow-x: hidden;
+ scrollbar-color: var(--background-color) var(--secondary-color);
+ scrollbar-width: thin;
+ }
+
+ #playlist-songs::-webkit-scrollbar {
+ width: 5px;
+ }
+
+ #playlist-songs::-webkit-scrollbar-track {
+ background: var(--background-color);
+ }
+
+ #playlist-songs::-webkit-scrollbar-thumb {
+ background: var(--secondary-color);
+ }
+
+ h1 {
+ font-size: 0.813rem;
+ }
+
+ h2 {
+ font-size: 0.75rem;
+ }
+
+ .player-bar,
+ .playlist-bar,
+ .player-content,
+ #playlist-songs {
+ width: 280px;
+ }
+
+ .playlist-song {
+ justify-content: space-between;
+ }
+
+ .playlist-song-title {
+ width: 140px;
+ }
+
+ .playlist-song-artist {
+ width: 40px;
+ }
+
+ .playlist-song-duration > button {
+ padding: 0;
+ }
+
+ .player-content {
+ display: inline;
+ position: relative;
+ justify-items: center;
+ height: 100%;
+ }
+
+ #player-album-art {
+ z-index: -100;
+ height: 280px;
+ box-shadow: none;
+ background: #000;
+ }
+
+ #player-album-art img {
+ width: 100%;
+ opacity: 0.6;
+ }
+
+ .player-display-song-artist {
+ padding: 0 10px;
+ }
+
+ .player-display-song-artist > p {
+ white-space: pre-wrap;
+ }
+
+ .player-display {
+ position: absolute;
+ width: 100%;
+ z-index: 1000;
+ background-color: transparent;
+ top: 0;
+ height: 280px;
+ justify-content: space-between;
+ text-align: center;
+ }
+ }
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/nth-fibonacci-number/script.js b/fullstack-cert/js-projects/nth-fibonacci-number/script.js
new file mode 100644
index 000000000..b0d4c76bc
--- /dev/null
+++ b/fullstack-cert/js-projects/nth-fibonacci-number/script.js
@@ -0,0 +1,11 @@
+const sequence = [0, 1];
+
+const fibonacci = (n) => {
+ if (n <= 2) {
+ return sequence[n - 1];
+ }
+ for (let i = 2; i <= n; i++) {
+ sequence.push(sequence[i - 1] + sequence[i - 2]);
+ }
+ return sequence[n - 1]
+}
diff --git a/fullstack-cert/js-projects/nth-fibonacci-number/user-stories.md b/fullstack-cert/js-projects/nth-fibonacci-number/user-stories.md
new file mode 100644
index 000000000..820361f03
--- /dev/null
+++ b/fullstack-cert/js-projects/nth-fibonacci-number/user-stories.md
@@ -0,0 +1,5 @@
+1. You should define an array named `sequence` in the global scope. It should contain the number `0` and `1`.
+1. You should create a function named `fibonacci`.
+1. The `fibonacci` function should take a single parameter, which is a positive integer.
+1. A call to `fibonacci(n)` should use a dynamic programming approach to compute and return the `n`-th number from the Fibonacci sequence, in which each number is the sum of the two preceding numbers.
+1. Each computed number at the position `n` in the Fibonacci sequence should be stored at the index `n - 1` of the `sequence` array.
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/pantry-lab/script.js b/fullstack-cert/js-projects/pantry-lab/script.js
new file mode 100644
index 000000000..382ec5079
--- /dev/null
+++ b/fullstack-cert/js-projects/pantry-lab/script.js
@@ -0,0 +1,116 @@
+function parseShipment(rawData) {
+ if (!Array.isArray(rawData)) return [];
+
+ const result = [];
+ const seenSKUs = [];
+
+ for (let i = 0; i < rawData.length; i++) {
+ const parts = rawData[i].split("|");
+
+ const sku = parts[0];
+ const name = parts[1];
+ const qty = Number(parts[2]);
+ const expires = parts[3];
+
+ let duplicate = false;
+ for (let j = 0; j < seenSKUs.length; j++) {
+ if (seenSKUs[j] === sku) {
+ duplicate = true;
+ break;
+ }
+ }
+ if (duplicate) continue;
+
+ seenSKUs.push(sku);
+
+ result.push({
+ sku: sku,
+ name: name,
+ qty: qty,
+ expires: expires
+ });
+ }
+
+ return result;
+}
+
+function planRestock(pantry, shipment) {
+ const actions = [];
+
+ for (let i = 0; i < shipment.length; i++) {
+ const item = shipment[i];
+
+ if (item.qty <= 0) {
+ actions.push({ type: "discard", item: item });
+ continue;
+ }
+
+ let found = false;
+ for (let j = 0; j < pantry.length; j++) {
+ if (pantry[j].sku === item.sku) {
+ found = true;
+ break;
+ }
+ }
+
+ if (found) {
+ actions.push({ type: "restock", item: item });
+ } else {
+ actions.push({ type: "donate", item: item });
+ }
+ }
+
+ return actions;
+}
+
+function groupByZone(actions) {
+ const zones = {};
+
+ for (let i = 0; i < actions.length; i++) {
+ const action = actions[i];
+ const zone = action.item.zone || "general";
+
+ if (!zones[zone]) {
+ zones[zone] = [];
+ }
+
+ zones[zone].push(action);
+ }
+
+ return zones;
+}
+
+function clonePantry(pantry) {
+ const copy = [];
+
+ for (let i = 0; i < pantry.length; i++) {
+ const item = pantry[i];
+ copy.push({
+ sku: item.sku,
+ name: item.name,
+ qty: item.qty,
+ expires: item.expires,
+ zone: item.zone
+ });
+ }
+
+ return copy;
+}
+
+const pantry = [
+ { sku: "A12", name: "Tomatoes", qty: 4, expires: "2025-01-10", zone: "fridge" },
+ { sku: "B44", name: "Pasta", qty: 2, expires: "2026-03-02", zone: "pantry" }
+];
+
+const rawShipment = [
+ "A12|Tomatoes|5|2025-01-10",
+ "C77|Rice|3|2026-01-01",
+ "C77|Rice|3|2026-01-01"
+];
+
+const shipment = parseShipment(rawShipment);
+const pantryCopy = clonePantry(pantry);
+const actions = planRestock(pantryCopy, shipment);
+const grouped = groupByZone(actions);
+
+console.log(grouped);
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/pantry-lab/user-stories.md b/fullstack-cert/js-projects/pantry-lab/user-stories.md
new file mode 100644
index 000000000..a1674615e
--- /dev/null
+++ b/fullstack-cert/js-projects/pantry-lab/user-stories.md
@@ -0,0 +1,14 @@
+In this lab, you will build a small pantry management program using basic JavaScript concepts like arrays, objects, loops, and conditionals.
+
+You will simulate receiving a shipment of pantry items, deciding what to do with each item, and organizing the results for storage.
+
+1. You should implement a parseShipment(rawData) function that takes an array of strings and returns an array of { sku, name, qty, expires } objects.
+
+2. You should implement a planRestock(pantry, shipment) function that compares the current pantry with the incoming shipment and returns an array of actions in the form { type: "restock" | "discard" | "donate", item }.
+
+3. You should implement a groupByZone(actions) function that groups the actions into storage zones based on each item’s zone property.
+
+4. You should implement a clonePantry(pantry) function that returns a deep copy of the pantry so planning changes do not affect the original list.
+A deep copy means creating a new array with new objects, so modifying the copy does not change the original pantry.
+
+5. You should use all of the functions together to process a shipment and log the final grouped result to the console.
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/plant-nursery-catalog/script.js b/fullstack-cert/js-projects/plant-nursery-catalog/script.js
new file mode 100644
index 000000000..9be10d7d8
--- /dev/null
+++ b/fullstack-cert/js-projects/plant-nursery-catalog/script.js
@@ -0,0 +1,86 @@
+// ask to create the first two objects and then provide the others
+const ballerina = {
+ commonName: "Spanish lavender",
+ scientificName: "Lavandula stoechas",
+ cultivar: "Ballerina",
+}
+
+const prettyPolly = {
+ commonName: "Spanish lavender",
+ scientificName: "Lavandula stoechas",
+ cultivar: "Pretty Polly",
+}
+
+const willowVale = {
+ commonName: "Spanish lavender",
+ scientificName: "Lavandula stoechas",
+ cultivar: "Willow Vale",
+}
+
+const hidcote = {
+ commonName: "English lavender",
+ scientificName: "Lavandula angustifolia",
+ cultivar: "Hidcote",
+}
+
+const imperialGem = {
+ commonName: "English lavender",
+ scientificName: "Lavandula angustifolia",
+ cultivar: "Imperial Gem",
+}
+
+const royalCrown = {
+ commonName: "French lavender",
+ scientificName: "Lavandula dentata",
+ cultivar: "Royal Crown"
+}
+
+const catalog = new Map();
+// show map size
+// set method, use first a string as key, then show that objects can be used
+catalog.set(ballerina, { small: 20, medium: 15, large: 12 });
+catalog.set(prettyPolly, { small: 31, medium: 14, large: 24 });
+catalog.set(willowVale, { small: 3, medium: 5, large: 0 });
+catalog.set(hidcote, { small: 33, medium: 13, large: 18 });
+catalog.set(imperialGem, { small: 19, medium: 35, large: 28 });
+catalog.set(royalCrown, { small: 40, medium: 22, large: 9 });
+// get method
+const sellPlant = (plant, size, pots) => {
+ const name = `${plant.scientificName} '${plant.cultivar}'`
+ const currentPots = catalog.get(plant);
+ if (currentPots[size] - pots < 0) {
+ return `Not enough ${size} size pots for ${name}. Only ${currentPots[size]} left.`
+ }
+ const updatedPots = currentPots;
+ updatedPots[size] -= pots;
+ catalog.set(plant, updatedPots)
+ return `catalog successfully updated.`
+}
+// delete method
+const removePlant = (plant) => {
+ catalog.delete(plant);
+}
+
+const displaycatalog = () => {
+ // Show how to iterate over a map object: .keys(), .values(), .entries()
+ let catalogString = "";
+ catalog.forEach((val, key) => {
+ catalogString += `
+${key.scientificName} '${key.cultivar}'
+Pots left: ${val.small} S, ${val.medium} M, ${val.large} L
+`
+ })
+ return catalogString
+}
+
+const displayPlantsSet = () => {
+ // Create a set, .add(), .size, .delete(), .has(), .clear() (mention that clear is valid for maps too)
+ // Delete the set
+ // Create an array from the catalog keys => catalog.keys()).map(key => key.commonName
+ // Then create a set from that array and show how the set doesn't have repeated values
+ const commonNames = Array.from(catalog.keys()).map(key => key.commonName);
+ return new Set(commonNames)
+}
+
+console.log(displaycatalog())
+console.log(displayPlantsSet())
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/pyramid-generator/script.js b/fullstack-cert/js-projects/pyramid-generator/script.js
new file mode 100644
index 000000000..9faf94494
--- /dev/null
+++ b/fullstack-cert/js-projects/pyramid-generator/script.js
@@ -0,0 +1,123 @@
+// teach these different variable types.
+const symbol = "#"
+const count = 8;
+const rows = [];
+// Remove this after #1 is done.
+let done = 0;
+// Add this only during #3
+// note that this should be a const, but our tests need it to be a let :3
+let inverted = true;
+
+// This function will be built during the first loop.
+// Explain scoping of `count` variable here.
+// Then explain "variable shadowing"? Might be too complex. Will consider.
+// teaching parameters here
+function padRow(rowNumber, count) {
+ // teach concatenation
+ // then review replacing "#" with the symbol variable
+ // return " ".repeat(count - rowNumber) + "#".repeat(rowNumber * 2 - 1) + " ".repeat(count - rowNumber);
+ // template literals AFTER #2 is done
+ return `${" ".repeat(count - rowNumber)}${symbol.repeat(rowNumber * 2 - 1)}${" ".repeat(count - rowNumber)}`
+};
+
+// real quick, let's learn a couple of array methods
+// const array = ["Naomi", "Quincy", "CamperChan"];
+// const pop = array.pop();
+// console.log(pop);
+// console.log(array);
+// const push = array.push(pop);
+// console.log(push);
+// console.log(array);
+
+// This loop teaches basic loop syntax, +=, ++, +
+// for (let i = 0; i < count; /*i = i + 1, i+=1,*/ i++) {
+// great opportunity to teach off by one errors
+// also, we teach arguments here.
+// rows.push(padRow(i + 1, count))
+// then refactor to initialise i to 1.
+// }
+// console.log(rows);
+
+// quick b
+
+// Let's do a while loop, first demonstrating true and false
+// declare this variable at top
+// let continueLoop = true;
+// while (continueLoop) {
+// done++;
+// rows.push(padRow(done, count));
+// if (done === count) {
+// continueLoop = false;
+// }
+// }
+
+// break away from the loop stuff to do a quick demo on true vs "true";
+// const testVariable = true;
+// const testVariable = "true";
+// const testVariable = false;
+// const testVariable = "false";
+// if (testVariable) {
+// console.log("I'm true!")
+// }
+
+// Refactor to show that condition can go directly in loop, no need for variables
+// while (done < count) {
+// improve condition to remove done variable too -- #1
+// while (rows.length < count) {
+// rows.push(padRow(rows.length, count))
+// }
+
+// What if we do an UPSIDE-DOWN pyramid wowie zowie!
+// for (let i = count; i > 0; /* woah it's a decrement time*/ /*i = i - 1, i -= 1*/ i--) {
+// rows.push(padRow(i, count));
+// }
+
+// New array methods!
+// const array = ["Naomi", "Quincy", "CamperChan"];
+// const shift = array.shift();
+// console.log(shift);
+// console.log(array);
+// const unshift = array.unshift(shift);
+// console.log(unshift);
+// console.log(array);
+
+// Kay but that loop kinda stimky - let's use our new unshift!
+// for (let i = 1; i <= count; i++) {
+// rows.unshift(padRow(i, count))
+// }
+
+// WOAH what if we make a variable to toggle it???? -- #3
+for (let i = 1; i <= count; i++) {
+ if (inverted) {
+ rows.unshift(padRow(i, count));
+ } else {
+ rows.push(padRow(i, count));
+ }
+}
+
+// AFTER doing the first loop, this will be the very first next campers write
+// We'll have them put something in the row array declaration just to see this work
+// Gotta teach them functions
+function getResult() {
+ let result = "";
+ // teach a for-of loop because they're neat
+ for (const row of rows) {
+ // refactor into template literal -- #2
+ result += row + "\n";
+ }
+ // teach return keyword
+ // This is really just going to be here so we can consume the console output in the tests
+ return result;
+}
+
+// Teach them how functions are called without arguments
+// getResult();
+
+// Oh no, nothing happens! What if we *use* that return value?
+// const string = getResult();
+// console.log(string);
+
+// Cool, did you know we can pass the call directly?
+// console.log(getResult);
+// Oh no! That broke. Because we didn't *call* it oopsie.
+console.log(getResult());
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/quicksort/script.js b/fullstack-cert/js-projects/quicksort/script.js
new file mode 100644
index 000000000..9bcf92503
--- /dev/null
+++ b/fullstack-cert/js-projects/quicksort/script.js
@@ -0,0 +1,19 @@
+const quickSort = (array) => {
+ if (array.length === 0) {
+ return [];
+ }
+ const pivot = array[0];
+ let lesser = [];
+ let equal = [];
+ let greater = [];
+ for (let i of array) {
+ if (i < pivot) {
+ lesser.push(i);
+ } else if (i > pivot) {
+ greater.push(i);
+ } else {
+ equal.push(i);
+ }
+ }
+ return [...quickSort(lesser), ...equal, ...quickSort(greater)];
+}
diff --git a/fullstack-cert/js-projects/quicksort/user-stories.md b/fullstack-cert/js-projects/quicksort/user-stories.md
new file mode 100644
index 000000000..276d2242f
--- /dev/null
+++ b/fullstack-cert/js-projects/quicksort/user-stories.md
@@ -0,0 +1,8 @@
+1. You should define a function named `quickSort` to implement the quicksort algorithm.
+
+1. The `quickSort` function should take an array of integers as input and return an array of these integers in sorted order from least to greatest.
+
+1. To implement the algorithm, you should:
+ - Choose a pivot value among the elements of the input array (use the first or the last element of the array).
+ - Partition the input array into three subarrays made by elements greater than, lesser than, and equal to the pivot value.
+ - Recursively call `quickSort` to sort the subarrays.
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/quiz-game/script.js b/fullstack-cert/js-projects/quiz-game/script.js
new file mode 100644
index 000000000..d597b98ec
--- /dev/null
+++ b/fullstack-cert/js-projects/quiz-game/script.js
@@ -0,0 +1,60 @@
+const questions = [
+ {
+ category: "science",
+ question: "What is the chemical symbol for potassium?",
+ choices: ["P", "K", "Pt"],
+ answer: "K"
+ },
+ {
+ category: "science",
+ question: "What is the unit of electrical resistance?",
+ choices: ["Ohm", "Coulomb", "Sievert"],
+ answer: "Ohm"
+ },
+ {
+ category: "geography",
+ question: "What is the capital city of Australia?",
+ choices: ["Sidney", "Canberra", "Wellington"],
+ answer: "Canberra"
+ },
+ {
+ category: "literature",
+ question: 'Who wrote "1984"?',
+ choices: ["Ray Bradbury", "Aldous Huxley", "George Orwell"],
+ answer: "George Orwell"
+ },
+ {
+ category: "sport",
+ question: "How many players are on a standard volleyball team?",
+ choices: ["6", "7", "12"],
+ answer: "6"
+ }
+]
+
+function getRandomQuestion() {
+ const randomIndex = Math.floor(Math.random() * questions.length);
+ return questions[randomIndex];
+}
+
+function getRandomComputerChoice(choices) {
+ const randomIndex = Math.floor(Math.random() * choices.length);
+ return choices[randomIndex];
+}
+
+function getResults(obj) {
+ return computerChoice === obj.answer
+ ? "The computer's choice is correct!"
+ : `The computer's choice is wrong. The correct answer is: ${obj.answer}`;
+}
+
+const questionObj = getRandomQuestion();
+const { question, choices } = questionObj;
+
+console.log(question);
+console.log(`Choices: ${choices}`);
+
+const computerChoice = getRandomComputerChoice(choices);
+console.log(`Computer chooses: ${computerChoice}`);
+
+const results = getResults(questionObj);
+console.log(results);
diff --git a/fullstack-cert/js-projects/quiz-game/user-stories.md b/fullstack-cert/js-projects/quiz-game/user-stories.md
new file mode 100644
index 000000000..c30462986
--- /dev/null
+++ b/fullstack-cert/js-projects/quiz-game/user-stories.md
@@ -0,0 +1,9 @@
+1. You should create an array named `questions`.
+1. The `questions` array should contain at least five objects, each having the keys `category`, `question`, `choices`, and `answer`.
+1. The `category` key should have the value of a string representing a question category.
+1. The `question` key should have the value of a string representing a question.
+1. The `choices` key should have the value of an array containing three strings, which are alternative answers to the question.
+1. The `answer` key should have the value of a string, representing the correct answer to the question. Also, the value of `answer` should be included in the `choices` array.
+1. You should have a function named `getRandomQuestion` that returns a random question object from the `questions` array.
+1. You should have a function named `getRandomComputerChoice` that takes the array of the available choices as a parameter, and returns a random answer to the selected question.
+1. You should have a function named `getResults` that takes the selected question object as its parameter and returns `The computer's choice is correct!` if the answer is correct. Otherwise, it returns `The computer's choice is wrong. The correct answer is: `, where `` is the value of the correct answer to the chosen question.
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/random-bg-changer-app/index.html b/fullstack-cert/js-projects/random-bg-changer-app/index.html
new file mode 100644
index 000000000..4510e68f8
--- /dev/null
+++ b/fullstack-cert/js-projects/random-bg-changer-app/index.html
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+ Build a random background color changer
+
+
+
+
+
Random Background Color changer
+
+
+
+
Hex Code: #110815
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/random-bg-changer-app/script.js b/fullstack-cert/js-projects/random-bg-changer-app/script.js
new file mode 100644
index 000000000..b60b762a2
--- /dev/null
+++ b/fullstack-cert/js-projects/random-bg-changer-app/script.js
@@ -0,0 +1,67 @@
+const darkColorsArr = [
+ "#2C3E50",
+ "#34495E",
+ "#2C2C2C",
+ "#616A6B",
+ "#4A235A",
+ "#2F4F4F",
+ "#0E4B5A",
+ "#36454F",
+ "#2C3E50",
+ "#800020",
+];
+
+function getRandomIndex() {
+ const randomIndex = Math.floor(darkColorsArr.length * Math.random());
+ return randomIndex;
+}
+
+const body = document.querySelector("body");
+const bgHexCodeSpanElement = document.querySelector("#bg-hex-code");
+
+function changeBackgroundColor() {
+ const color = darkColorsArr[getRandomIndex()];
+
+ bgHexCodeSpanElement.innerText = color;
+ body.style.backgroundColor = color;
+}
+const btn = document.querySelector("#btn");
+
+btn.addEventListener("click", changeBackgroundColor);
+
+/* seed code
+const darkColorsArr = [
+ "#2C3E50",
+ "#34495E",
+ "#2C2C2C"
+ "#616A6B"
+ "#4A235A"
+ "#2F4F4F",
+ "#0E4B5A",
+ "#36454F",
+ "#2C3E50",
+ "#800020",
+ ];
+
+ function getRandomIndex() {
+ const randomIndex = darkColorsArr.length * math.random();
+ return randomIndex;
+ }
+
+ console.log(getRandomIndex())
+
+ const body = document.queryselector("body");
+ const bgHexCodeSpanElement = document.querySelector("bg-hex-code");
+ console.log(bgHexCodeSpanElement)
+
+ function changeBackgroundColor() {
+ const color = darkColorsArr[getRandomIndex];
+
+ bgHexCodeSpanElement.innerText = color;
+ body.style.backgroundColor = color;
+ }
+ const btn = document.querySelector("#click-btn");
+ console.log(btn)
+
+ btn.addEventListener("click", changeBackgroundColor());
+*/
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/random-bg-changer-app/styles.css b/fullstack-cert/js-projects/random-bg-changer-app/styles.css
new file mode 100644
index 000000000..f9d4dc635
--- /dev/null
+++ b/fullstack-cert/js-projects/random-bg-changer-app/styles.css
@@ -0,0 +1,40 @@
+*,
+*::before,
+*::after {
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
+}
+
+:root {
+ --yellow: #f1be32;
+ --golden-yellow: #feac32;
+ --dark-purple: #110815;
+ --light-grey: #efefef;
+}
+
+body {
+ background-color: var(--dark-purple);
+ color: var(--light-grey);
+ text-align: center;
+}
+
+.bg-information-container {
+ margin: 15px 0 25px;
+ font-size: 1.2rem;
+}
+
+.btn {
+ cursor: pointer;
+ padding: 10px;
+ margin: 10px;
+ color: var(--dark-purple);
+ background-color: var(--golden-yellow);
+ background-image: linear-gradient(#fecc4c, #ffac33);
+ border-color: var(--golden-yellow);
+ border-width: 3px;
+}
+
+.btn:hover {
+ background-image: linear-gradient(#ffcc4c, #f89808);
+}
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/random-bg-changer-app/user-stories.md b/fullstack-cert/js-projects/random-bg-changer-app/user-stories.md
new file mode 100644
index 000000000..098961779
--- /dev/null
+++ b/fullstack-cert/js-projects/random-bg-changer-app/user-stories.md
@@ -0,0 +1,17 @@
+1. You should fix the syntax errors in the `darkColorsArr` array.
+
+1. You should fix the `ReferenceError` thrown when the `math` object is referenced inside the `getRandomIndex` function.
+
+1. You should round down `randomIndex` to the nearest whole number.
+
+1. You should update the value of the `body` variable to use the correct method name and fix the related `TypeError`.
+
+1. You should fix `bgHexCodeSpanElement` so that it correctly selects the element with the `id` of `bg-hex-code`.
+
+1. You should modify the `color` variable inside `changeBackgroundColor` so that it is set to a random color from the `darkColorsArr` array.
+
+1. You should update the `btn` variable so that it targets the button element. Open up the `index.html` to see the correct `id` name for that button element.
+
+1. You should fix the line that adds an event listener for the `click` event to `btn` by passing a reference to the `changeBackgroundColor` function to the method.
+
+1. Your background should randomly change to one of the colors in `darkColorsArr` each time the `#btn` is clicked.
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/recipe-converter/index.html b/fullstack-cert/js-projects/recipe-converter/index.html
new file mode 100644
index 000000000..63fc752d0
--- /dev/null
+++ b/fullstack-cert/js-projects/recipe-converter/index.html
@@ -0,0 +1,46 @@
+
+
+
+
+
+ Recipe Ingredient Converter
+
+
+
+
+
Recipe Ingredient Converter
+
+
+
+
Converted Ingredients
+
+
+
+
+
+
diff --git a/fullstack-cert/js-projects/recipe-converter/script.js b/fullstack-cert/js-projects/recipe-converter/script.js
new file mode 100644
index 000000000..4cddbcc68
--- /dev/null
+++ b/fullstack-cert/js-projects/recipe-converter/script.js
@@ -0,0 +1,79 @@
+/**
+ *
+ * This workshop will heavily rely on having campers create multiple curried
+ * functions so they get comfortable with the concept.
+ *
+ */
+
+// first few steps should be to have them create this table object
+const conversionTable = {
+ cup: { gram: 240, ounce: 8.0, teaspoon: 48 },
+ gram: { cup: 1 / 240, ounce: 0.0353, teaspoon: 0.2 },
+ ounce: { cup: 0.125, gram: 28.35, teaspoon: 6 },
+ teaspoon: { cup: 1 / 48, gram: 5, ounce: 0.167 },
+};
+
+// then have a step to create their first curried function
+const convertQuantity = (fromUnit) => (toUnit) => (quantity) => {
+ const conversionRate = conversionTable[fromUnit][toUnit];
+ return quantity * conversionRate;
+};
+
+// have campers test their function by calling it
+const gramsResult = convertQuantity("cup")("gram")(2);
+console.log(gramsResult);
+
+// then have step just for creating this curried function
+const adjustForServings = (baseQuantity) => (newServings) =>
+ (baseQuantity / 1) * newServings;
+
+// have a step just for testing the last function they created
+const servingsResult = adjustForServings(4)(6);
+console.log(servingsResult);
+
+// have campers practice using the previous curried functions in this processIngredient function
+const processIngredient = (baseQuantity, baseUnit, newUnit, newServings) => {
+ const adjustedQuantity = adjustForServings(baseQuantity)(newServings);
+ const convertedQuantity =
+ convertQuantity(baseUnit)(newUnit)(adjustedQuantity);
+ return convertedQuantity.toFixed(2);
+};
+
+// have step to query the DOM for the following values
+const ingredient = document.getElementById("ingredient");
+const quantity = document.getElementById("quantity");
+const unit = document.getElementById("unit");
+const servings = document.getElementById("servings");
+const recipeForm = document.getElementById("recipe-form");
+const resultList = document.getElementById("result-list");
+
+// have another step for creating the units
+const units = ["cup", "gram", "ounce", "teaspoon"];
+
+// have step to create the updateResultsList function
+const updateResultsList = () => {
+ resultList.innerHTML = "";
+
+ units.forEach((newUnit) => {
+ if (newUnit !== unit.value) {
+ const convertedQuantity = processIngredient(
+ parseFloat(quantity.value),
+ unit.value,
+ newUnit,
+ parseFloat(servings.value)
+ );
+
+ resultList.innerHTML += `
`;
+ }
+ });
+};
+
+// have step to add the event listener and call updateResultsList
+
+recipeForm.addEventListener("submit", (e) => {
+ e.preventDefault();
+
+ updateResultsList();
+});
+
+// maybe final step could be to have them test it out in the UI by converting ingredients
diff --git a/fullstack-cert/js-projects/recipe-converter/styles.css b/fullstack-cert/js-projects/recipe-converter/styles.css
new file mode 100644
index 000000000..6e8268e87
--- /dev/null
+++ b/fullstack-cert/js-projects/recipe-converter/styles.css
@@ -0,0 +1,78 @@
+*,
+*::before,
+*::after {
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
+}
+
+:root {
+ --dark-grey: #0a0a23;
+ --white: #fff;
+ --light-grey: #ddd;
+ --golden-yellow: #fecc4c;
+ --yellow: #ffcc4c;
+ --gold: #feac32;
+ --orange: #ffac33;
+ --dark-orange: #f89808;
+}
+
+body {
+ font-family: Arial, sans-serif;
+ background-color: var(--dark-grey);
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ height: 100vh;
+}
+
+h1 {
+ margin: 10px 0 15px;
+}
+
+.container {
+ text-align: center;
+ background: var(--white);
+ padding: 20px;
+ border-radius: 8px;
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
+ width: 100%;
+ max-width: 600px;
+}
+
+input,
+select {
+ padding: 10px;
+ font-size: 16px;
+ margin: 5px 0;
+ border: 1px solid var(--light-grey);
+ border-radius: 4px;
+}
+
+button {
+ font-size: 1.2rem;
+ cursor: pointer;
+ width: 200px;
+ margin: 20px 0 30px;
+ color: var(--dark-grey);
+ background-color: var(--gold);
+ background-image: linear-gradient(var(--golden-yellow), var(--orange));
+ border-color: var(--gold);
+ border-width: 3px;
+}
+
+button:hover {
+ background-image: linear-gradient(var(--yellow), var(--dark-orange));
+}
+
+ul {
+ list-style-type: none;
+ padding: 0;
+}
+
+li {
+ padding: 10px;
+ border-bottom: 1px solid var(--light-grey);
+ display: flex;
+ justify-content: space-between;
+}
diff --git a/fullstack-cert/js-projects/recipe-tracker/script.js b/fullstack-cert/js-projects/recipe-tracker/script.js
new file mode 100644
index 000000000..64d23e162
--- /dev/null
+++ b/fullstack-cert/js-projects/recipe-tracker/script.js
@@ -0,0 +1,112 @@
+// Start with an empty recipes array
+const recipes = [];
+
+/* Have campers create 3 objects.
+Walk them through the creation of the recipe1 object, then make them create the remaining two.
+*/
+
+const recipe1 = {
+ name: 'Spaghetti Carbonara',
+ ingredients: ['spaghetti', 'Parmesan cheese', 'pancetta', 'black pepper'],
+ cookingTime: 22,
+ totalIngredients: null,
+ difficultyLevel: '', // have dificulty level start as an empty array instead of null so we can make campers push either easy, medium, or hard
+ ratings: [4, 5, 4, 5],
+ averageRating: null,
+};
+
+const recipe2 = {
+ name: 'Chicken Curry',
+ ingredients: [
+ 'chicken breast',
+ 'coconut milk',
+ 'curry powder',
+ 'onion',
+ 'garlic',
+ ],
+ cookingTime: 42,
+ totalIngredients: null,
+ difficultyLevel: '',
+ ratings: [4, 5, 5, 5],
+ averageRating: null,
+};
+
+const recipe3 = {
+ name: 'Vegetable Stir Fry',
+ ingredients: ['broccoli', 'carrot', 'bell pepper'],
+ cookingTime: 15,
+ totalIngredients: null,
+ difficultyLevel: '',
+ ratings: [4, 3, 4, 5],
+ averageRating: null,
+};
+
+// Push recipes1, 2, and 3 into the recipes array
+recipes.push(recipe1, recipe2, recipe3);
+
+// Calculate average rating
+function getAverageRating(ratings) {
+ const total = ratings[0] + ratings[1] + ratings[2] + ratings[3];
+ return (total / ratings.length).toFixed(2);
+}
+
+// Calculate total number of ingredients
+function getTotalIngredients(ingredients) {
+ return ingredients.length;
+}
+
+// Calculate difficulty level based on cooking time
+function getDificultyLevel(cookingTime) {
+ if (cookingTime < 30) {
+ return 'easy';
+ } else if (cookingTime <= 60) {
+ return 'medium';
+ } else {
+ return 'hard';
+ }
+}
+
+// Process recipe1
+const recipe1AverageRating = getAverageRating(recipe1.ratings);
+console.log(`Recipe 1 Average Rating ${recipe1AverageRating}`);
+
+const recipe1TotalIngredients = getTotalIngredients(recipe1.ingredients);
+console.log(`REcipe 1 Total Ingredients: ${recipe1TotalIngredients}`);
+
+const recipe1DifficultyLevel = getDificultyLevel(recipe1.cookingTime);
+console.log(`Recipe 1 Difficulty: ${recipe1DifficultyLevel}`);
+console.log('\n');
+
+/*
+// Optional - Process recipe2
+const recipe2AverageRating = getAverageRating(recipe2.ratings);
+console.log(`Recipe 2 Average Rating: ${recipe2AverageRating}`);
+
+const recipe2TotalIngredients = getTotalIngredients(recipe2.ingredients);
+console.log(`Recipe 2 Total Ingredients: ${recipe2TotalIngredients}`);
+
+const recipe2DifficultyLevel = getDificultyLevel(recipe2.cookingTime);
+console.log(`REcipe 2 Difficulty Level: ${recipe2DifficultyLevel}`);
+console.log('\n');
+
+// Optional – Process recipe3
+const recipe3AverageRating = getAverageRating(recipe3.ratings);
+console.log(`Recipe 3 Average Rating: ${recipe3AverageRating}`);
+
+const recipe3TotalIngredients = getTotalIngredients(recipe3.ingredients);
+console.log(`REcipe 3 Total Ingredients: ${recipe3TotalIngredients}`);
+
+const recipe3DifficultyLevel = getDificultyLevel(recipe3.cookingTime);
+console.log(`Recipe 3 Difficulty Level: ${recipe3DifficultyLevel}`);
+*/
+
+// Fill up each item of the recipes array with averageRating, totalIngredients, and difficultyLevel
+
+for (const recipe of recipes) {
+ recipe.averageRating = getAverageRating(recipe.ratings);
+ recipe.totalIngredients = getTotalIngredients(recipe.ingredients);
+ recipe.difficultyLevel = getDificultyLevel(recipe.cookingTime);
+}
+
+// recipes array should now have everything filled up
+console.log(recipes);
diff --git a/fullstack-cert/js-projects/regex-sandbox/index.html b/fullstack-cert/js-projects/regex-sandbox/index.html
new file mode 100644
index 000000000..9492d8b5f
--- /dev/null
+++ b/fullstack-cert/js-projects/regex-sandbox/index.html
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+ Regex Sandbox
+
+
+
+
+
Regex Sandbox
+
+
+
+
+
Flags:
+
+
+
+
+
+
Test String:
+
+
+
+
+
Result:
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/regex-sandbox/script.js b/fullstack-cert/js-projects/regex-sandbox/script.js
new file mode 100644
index 000000000..c07ba391a
--- /dev/null
+++ b/fullstack-cert/js-projects/regex-sandbox/script.js
@@ -0,0 +1,32 @@
+const pattern = document.getElementById("pattern");
+const caseInsensitiveFlag = document.getElementById("i");
+const globalFlag = document.getElementById("g");
+const result = document.getElementById("result");
+const getFlags = () => {
+ let flags = '';
+ const flagArray = [caseInsensitiveFlag, globalFlag]
+ flagArray.forEach((flag) => {
+ if (flag.checked) flags += flag.id;
+ })
+ return flags
+}
+const testString = document.getElementById("test-string");
+const testButton = document.getElementById("test-btn")
+testButton.addEventListener(
+ "click",
+ () => {
+ let matched;
+ let flags = getFlags();
+ const regex = new RegExp(pattern.value, flags)
+ console.log(regex)
+ if (flags.includes(globalFlag)) {
+ testString.innerHTML = testString.innerText.replaceAll(regex, '$&')
+ matched = testString.innerText.matchAll(regex)
+ } else {
+ testString.innerHTML = testString.innerText.replace(regex, '$&')
+ matched = testString.innerText.match(regex);
+ }
+ if (!matched) matched = 'no match';
+ result.innerText = matched;
+ }
+)
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/regex-sandbox/styles.css b/fullstack-cert/js-projects/regex-sandbox/styles.css
new file mode 100644
index 000000000..0dbbb8d97
--- /dev/null
+++ b/fullstack-cert/js-projects/regex-sandbox/styles.css
@@ -0,0 +1,152 @@
+*,
+*::before,
+*::after {
+ box-sizing: border-box;
+ margin: 0;
+ padding: 0;
+}
+
+:root {
+ --dark-grey: #1b1b32;
+ --light-grey: #f5f6f7;
+ --golden-yellow: #fecc4c;
+ --yellow: #ffcc4c;
+ --gold: #feac32;
+ --orange: #ffac33;
+ --dark-orange: #f89808;
+ --border: 0.2rem solid darkgrey;
+ --padding: 0.3rem;
+}
+
+body {
+ background-color: var(--dark-grey);
+ color: var(--light-grey);
+ font-size: 20px;
+ font-family: "Lato", Helvetica, Arial, sans-serif;
+}
+
+h1 {
+ margin: 5rem auto 2rem;
+ text-align: center;
+}
+
+p {
+ padding: var(--padding);
+}
+
+#regex-container {
+ max-width: 680px;
+ margin: 20px auto;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ border: var(--border);
+}
+
+#regex-container>label {
+ padding: var(--padding);
+ flex: 1 1 auto;
+}
+
+#pattern-container {
+ display: inline-block;
+ color: var(--dark-grey);
+ background-color: var(--light-grey);
+ margin: 5px;
+ border: var(--border);
+}
+
+#pattern {
+ margin: 0.2rem;
+ border: 0;
+ font-size: 1rem;
+ width: calc(100% - 1.2rem);
+}
+
+#pattern:focus {
+ outline: none;
+}
+
+#flags-container {
+ display: flex;
+ align-items: center;
+ flex: 1 1 auto;
+}
+
+#flags-container>label {
+ padding: var(--padding);
+ margin-right: 0.3rem;
+}
+
+#test-container {
+ max-width: 680px;
+ margin: 20px auto;
+ display: flex;
+ flex-direction: column;
+ flex: 0 0 auto;
+ border: var(--border);
+}
+
+#test-string {
+ background-color: var(--light-grey);
+ min-height: 5rem;
+ color: var(--dark-grey);
+ border-top: var(--border);
+ font-size: 1.2rem;
+}
+
+[contenteditable=true]:empty:before {
+ content: attr(placeholder);
+ pointer-events: none;
+ color: var(--dark-grey);
+}
+
+::placeholder {
+ color: var(--dark-grey);
+}
+
+
+button {
+ display: block;
+ cursor: pointer;
+ width: 8rem;
+ margin: 0.2rem auto;
+ color: var(--dark-grey);
+ background-color: var(--gold);
+ background-image: linear-gradient(var(--golden-yellow), var(--orange));
+ border-color: var(--gold);
+ border-width: 0.2rem;
+ font-size: 1.1rem;
+}
+
+.btn:hover {
+ background-image: linear-gradient(var(--yellow), var(--dark-orange));
+}
+
+#result-container {
+ max-width: 680px;
+ margin: 20px auto;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+}
+
+h2 {
+ align-self: flex-start;
+ margin: 0.4rem 0.2rem 0.2rem;
+ flex: 0 1 auto;
+}
+
+#result {
+ color: var(--dark-grey);
+ background-color: var(--light-grey);
+ font-size: 1.5rem;
+ flex: 1 1 auto;
+ margin: 0.2rem;
+ border: var(--border);
+ min-height: 3rem;
+}
+
+.highlight {
+ background-color: lightgreen;
+}
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/regex-sandbox/user-stories.md b/fullstack-cert/js-projects/regex-sandbox/user-stories.md
new file mode 100644
index 000000000..9b35b8dac
--- /dev/null
+++ b/fullstack-cert/js-projects/regex-sandbox/user-stories.md
@@ -0,0 +1,5 @@
+1. You should access the `#pattern`, `#test-string`, `#test-btn`, and `#result` elements and save in them in the variables `pattern`, `testString`, `testButton`, and `result`, respectively.
+1. You should access the `#i` and `#g` flag checkboxes and save them in the variables `caseInsensitiveFlag` and `globalFlag`, respectively.
+1. You should have a function named `getFlags` that returns a string containing the flags from checked flag checkboxes, or an empty string if none of them have been checked.
+1. When you click the `testButton` button, if the regex pattern matches the test string, the matched text should be highlighted. To highlight the matches, replace each match with the same text surrounded by a `span` element with the class of `highlight`. Note that the CSS for that has been already added for you.
+1. When there's a match, the matched text should be displayed inside `#result`. Otherwise, the text `no match` should be displayed.
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/rpg-workshop/index.html b/fullstack-cert/js-projects/rpg-workshop/index.html
new file mode 100644
index 000000000..6deea5cf4
--- /dev/null
+++ b/fullstack-cert/js-projects/rpg-workshop/index.html
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+ RPG - Dragon Repeller
+
+
+
+
+ XP: 0
+ Health: 100
+ Gold: 50
+
+
+
+
+
+
+
+ Monster Name:
+ Health:
+
+
+ Welcome to Dragon Repeller. You must defeat the dragon that is
+ preventing people from leaving the town. You are in the town square.
+ Where do you want to go? Use the buttons above.
+
+
+
+
+
diff --git a/fullstack-cert/js-projects/rpg-workshop/script.js b/fullstack-cert/js-projects/rpg-workshop/script.js
new file mode 100644
index 000000000..d7567e0d1
--- /dev/null
+++ b/fullstack-cert/js-projects/rpg-workshop/script.js
@@ -0,0 +1,304 @@
+// have campers slowly build this out when they need that particular location
+const locations = [
+ {
+ name: "town square",
+ "button text": ["Go to store", "Go to cave", "Fight dragon"],
+ "button functions": [goStore, goCave, fightDragon],
+ text: 'You are in the town square. You see a sign that says "Store".',
+ },
+ {
+ name: "store",
+ "button text": [
+ "Buy 10 health (10 gold)",
+ "Buy weapon (30 gold)",
+ "Go to town square",
+ ],
+ "button functions": [buyHealth, buyWeapon, goTown],
+ text: "You enter the store.",
+ },
+ {
+ name: "cave",
+ "button text": ["Fight slime", "Fight fanged beast", "Go to town square"],
+ "button functions": [fightSlime, fightBeast, goTown],
+ text: "You enter the cave. You see some monsters.",
+ },
+ {
+ name: "fight",
+ "button text": ["Attack", "Dodge", "Run"],
+ "button functions": [attack, dodge, goTown],
+ text: "You are fighting a monster.",
+ },
+ {
+ name: "kill monster",
+ "button text": [
+ "Go to town square",
+ "Go to town square",
+ "Go to town square",
+ ],
+ "button functions": [goTown, goTown, goTown],
+ text: 'The monster screams "Arg!" as it dies. You gain experience points and find gold.',
+ },
+ {
+ name: "lose",
+ "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
+ "button functions": [restart, restart, restart],
+ text: "You die. ☠",
+ },
+ {
+ name: "win",
+ "button text": ["REPLAY?", "REPLAY?", "REPLAY?"],
+ "button functions": [restart, restart, restart],
+ text: "You defeat the dragon! YOU WIN THE GAME! 🎉",
+ },
+];
+
+const button1 = document.getElementById("button-1");
+const button2 = document.getElementById("button-2");
+const button3 = document.getElementById("button-3");
+
+button1.addEventListener("click", goStore);
+button2.addEventListener("click", goCave);
+button3.addEventListener("click", fightDragon);
+
+const text = document.getElementById("text");
+const monsterStats = document.getElementById("monster-stats");
+
+// this ensures that the event listeners are removed before adding new ones
+function removeOldEventListeners() {
+ button1.removeEventListener("click", goStore);
+ button1.removeEventListener("click", buyHealth);
+ button1.removeEventListener("click", fightSlime);
+ button1.removeEventListener("click", attack);
+ button1.removeEventListener("click", goTown);
+ button1.removeEventListener("click", restart);
+
+ button2.removeEventListener("click", goCave);
+ button2.removeEventListener("click", buyWeapon);
+ button2.removeEventListener("click", fightBeast);
+ button2.removeEventListener("click", dodge);
+ button2.removeEventListener("click", goTown);
+ button2.removeEventListener("click", restart);
+
+ button3.removeEventListener("click", fightDragon);
+ button3.removeEventListener("click", goTown);
+ button3.removeEventListener("click", restart);
+}
+
+function update(location) {
+ monsterStats.style.display = "none";
+
+ removeOldEventListeners();
+
+ button1.textContent = location["button text"][0];
+ button2.textContent = location["button text"][1];
+ button3.textContent = location["button text"][2];
+
+ button1.addEventListener("click", location["button functions"][0]);
+ button2.addEventListener("click", location["button functions"][1]);
+ button3.addEventListener("click", location["button functions"][2]);
+ // we need to use innerHTML here so the HTML entities show up on screen properly
+ text.innerHTML = location.text;
+}
+
+function goTown() {
+ update(locations[0]);
+}
+
+function goStore() {
+ update(locations[1]);
+}
+
+function goCave() {
+ update(locations[2]);
+}
+
+let health = 100;
+let gold = 50;
+
+const healthText = document.getElementById("health-text");
+const goldText = document.getElementById("gold-text");
+
+function buyHealth() {
+ if (gold >= 10) {
+ gold -= 10;
+ health += 10;
+ goldText.textContent = gold;
+ healthText.textContent = health;
+ } else {
+ text.textContent = "You do not have enough gold to buy health.";
+ }
+}
+
+let currentWeaponIndex = 0;
+let inventory = ["stick"];
+
+const weapons = [
+ { name: "stick", power: 5 },
+ { name: "dagger", power: 30 },
+ { name: "claw hammer", power: 50 },
+ { name: "sword", power: 100 },
+];
+
+function buyWeapon() {
+ if (currentWeaponIndex < weapons.length - 1) {
+ if (gold >= 30) {
+ gold -= 30;
+ currentWeaponIndex++;
+ goldText.textContent = gold;
+ let newWeapon = weapons[currentWeaponIndex].name;
+ text.textContent = `You bought a ${newWeapon}.`;
+ inventory.push(newWeapon);
+ text.textContent += ` In your inventory you have: ${inventory}`;
+ } else {
+ text.textContent = "You do not have enough gold to buy a weapon.";
+ }
+ } else {
+ text.textContent = "You already have the most powerful weapon!";
+ button2.textContent = "Sell weapon for 15 gold";
+ button2.addEventListener("click", sellWeapon);
+ }
+}
+
+function sellWeapon() {
+ if (inventory.length > 1) {
+ gold += 15;
+ goldText.textContent = gold;
+ let currentWeapon = inventory.shift();
+ text.textContent = `You sold a ${currentWeapon}. In your inventory you have: ${inventory}`;
+ } else {
+ text.textContent = "Don't sell your only weapon!";
+ }
+}
+
+let fightingIndex;
+
+function fightSlime() {
+ fightingIndex = 0;
+ goFight();
+}
+
+function fightBeast() {
+ fightingIndex = 1;
+ goFight();
+}
+
+function fightDragon() {
+ fightingIndex = 2;
+ goFight();
+}
+
+let monsterHealth;
+
+const monsters = [
+ {
+ name: "slime",
+ level: 2,
+ health: 15,
+ },
+ {
+ name: "fanged beast",
+ level: 8,
+ health: 60,
+ },
+ {
+ name: "dragon",
+ level: 20,
+ health: 300,
+ },
+];
+
+const monsterName = document.getElementById("monster-name");
+const monsterHealthText = document.getElementById("monster-health");
+
+function goFight() {
+ update(locations[3]);
+ monsterHealth = monsters[fightingIndex].health;
+ monsterStats.style.display = "block";
+ monsterName.textContent = monsters[fightingIndex].name;
+ monsterHealthText.textContent = monsterHealth;
+}
+
+let xp = 0;
+
+function attack() {
+ const currentWeaponName = weapons[currentWeaponIndex].name;
+ const monstersName = monsters[fightingIndex].name;
+
+ text.textContent = `The ${monstersName} attacks. You attack it with your ${currentWeaponName}.`;
+
+ health -= getMonsterAttackValue(monsters[fightingIndex].level);
+
+ if (isMonsterHit()) {
+ monsterHealth -=
+ weapons[currentWeaponIndex].power + Math.floor(Math.random() * xp) + 1;
+ } else {
+ text.textContent += " You miss.";
+ }
+
+ healthText.textContent = health;
+ monsterHealthText.textContent = monsterHealth;
+
+ if (health <= 0) {
+ lose();
+ } else if (monsterHealth <= 0) {
+ if (fightingIndex === 2) {
+ winGame();
+ } else {
+ defeatMonster();
+ }
+ }
+
+ if (Math.random() <= 0.1 && inventory.length !== 1) {
+ text.textContent += ` Your ${inventory.pop()} breaks.`;
+ currentWeaponIndex--;
+ }
+}
+
+// Have campers create this function on their own
+// Provide the hit formula for them though
+function getMonsterAttackValue(level) {
+ const hit = level * 5 - Math.floor(Math.random() * xp);
+ return hit > 0 ? hit : 0;
+}
+
+// Have campers create this function on their own
+function isMonsterHit() {
+ return Math.random() > 0.2 || health < 20;
+}
+
+// Have campers create this function on their own
+function dodge() {
+ const monstersName = monsters[fightingIndex].name;
+ text.textContent = `You dodge the attack from the ${monstersName}`;
+}
+
+const xpText = document.getElementById("xp-text");
+
+function defeatMonster() {
+ gold += Math.floor(monsters[fightingIndex].level * 6.7);
+ xp += monsters[fightingIndex].level;
+ goldText.textContent = gold;
+ xpText.textContent = xp;
+ update(locations[4]);
+}
+
+// Have campers create these lose and winGame functions on their own
+function lose() {
+ update(locations[5]);
+}
+
+function winGame() {
+ update(locations[6]);
+}
+
+function restart() {
+ xp = 0;
+ health = 100;
+ gold = 50;
+ currentWeaponIndex = 0;
+ inventory = ["stick"];
+ goldText.textContent = gold;
+ healthText.textContent = health;
+ xpText.textContent = xp;
+ goTown();
+}
diff --git a/fullstack-cert/js-projects/rpg-workshop/styles.css b/fullstack-cert/js-projects/rpg-workshop/styles.css
new file mode 100644
index 000000000..d99038a1e
--- /dev/null
+++ b/fullstack-cert/js-projects/rpg-workshop/styles.css
@@ -0,0 +1,56 @@
+:root {
+ --dark-blue: #0a0a23;
+ --white: #fff;
+ --red: #c70d0d;
+ --golden-orange: #feac32;
+}
+
+body,
+#text {
+ background-color: var(--dark-blue);
+}
+
+#text {
+ color: var(--white);
+ padding: 10px;
+}
+
+#game {
+ max-width: 500px;
+ max-height: 400px;
+ background-color: var(--white);
+ color: var(--white);
+ margin: 30px auto 0;
+ padding: 10px;
+}
+
+#controls,
+#stats {
+ border: 1px solid var(--dark-blue);
+ padding: 5px;
+ color: var(--dark-blue);
+}
+
+#monster-stats {
+ display: none;
+ border: 1px solid var(--dark-blue);
+ padding: 5px;
+ color: var(--white);
+ background-color: var(--red);
+}
+
+.stat {
+ padding-right: 10px;
+}
+
+button {
+ cursor: pointer;
+ color: var(--dark-blue);
+ background-color: var(--golden-orange);
+ background-image: linear-gradient(#fecc4c, #ffac33);
+ border: 3px solid var(--golden-orange);
+}
+
+button:hover {
+ background-image: linear-gradient(#ffac33, #fecc4c);
+}
diff --git a/fullstack-cert/js-projects/second-functions/script.js b/fullstack-cert/js-projects/second-functions/script.js
new file mode 100644
index 000000000..8669860a1
--- /dev/null
+++ b/fullstack-cert/js-projects/second-functions/script.js
@@ -0,0 +1,28 @@
+function checkAnswer(userAnswer, correctAnswer) {
+ return userAnswer === correctAnswer;
+}
+
+const runQuiz = () => {
+ const questions = [
+ { question: "What is the capital of France?", answer: "Paris" },
+ { question: "What is 2 + 2?", answer: "4" },
+ { question: "What is the largest planet in our solar system?", answer: "Jupiter" },
+ { question: "What is the smallest prime number?", answer: "2" },
+ ];
+
+ let score = 0;
+
+ questions.forEach((q) => {
+ const userAnswer = prompt(q.question);
+ if (checkAnswer(userAnswer, q.answer)) {
+ console.log(`Question: ${q.question}\nCorrect!`);
+ score++;
+ } else {
+ console.log(`Question: ${q.question}\nWrong. The correct answer is ${q.answer}.`);
+ }
+ });
+
+ console.log(`You scored ${score} out of ${questions.length}.`);
+}
+
+runQuiz();
diff --git a/fullstack-cert/js-projects/second-functions/user-stories.md b/fullstack-cert/js-projects/second-functions/user-stories.md
new file mode 100644
index 000000000..b0d7335da
--- /dev/null
+++ b/fullstack-cert/js-projects/second-functions/user-stories.md
@@ -0,0 +1,19 @@
+1. You should define a function named `askQuestion` with a `question` parameter. The function should return a prompt with `question` as its parameter.
+
+2. You should define a function named `checkAnswer` with two parameters: `userAnswer` and `correctAnswer`. The function should return the comparison of `userAnswer.toLowerCase()` and `correctAnswer.toLowerCase()`.
+
+3. You should define an arrow function named `runQuiz`. Step 4-7 should be created within the `runQuiz` function.
+
+4. You should create an array named `questions`. The array should have objects with `question` and `answer` properties. For example, one object should look like this: `{ question: "What is 2 + 2?", answer: "4" }`. You should create at least four objects.
+
+5. You should create a `score` variable with a value of `0`.
+
+6. You should use a `forEach` method to iterate over each question in the `questions` array. In the `forEach` method, do these:
+ - Use the `prompt` function to ask the user the current question and store their response in a `userAnswer` variable.
+ - Create an `if` statement and use the `checkAnswer` function as its condition. The `checkAnswer` function should have two parameters: `userAnswer` and the current answer.
+ - If the answer is correct, log `Correct!` to the console and increment `score` by 1.
+ - If the answer is wrong, create an `else` statement that tells the user their answer is wrong.
+
+7. You should log the user's total score to the console.
+
+8. You should call the `runQuiz` function.
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/second-oop/script.js b/fullstack-cert/js-projects/second-oop/script.js
new file mode 100644
index 000000000..1db30f86e
--- /dev/null
+++ b/fullstack-cert/js-projects/second-oop/script.js
@@ -0,0 +1,63 @@
+class BankAccount {
+ constructor(balance = 0) {
+ this.balance = balance;
+ this.transactions = [];
+ }
+
+ deposit(amount) {
+ if (amount > 0) {
+ this.transactions.push({ type: 'deposit', amount });
+ this.updateBalance();
+ console.log(`Successfully deposited $${amount}. New balance: $${this.balance}`);
+ } else {
+ console.log('Deposit amount must be greater than zero.');
+ }
+ }
+
+ withdraw(amount) {
+ if (amount > 0 && amount <= this.balance) {
+ this.transactions.push({ type: 'withdraw', amount });
+ this.updateBalance();
+ console.log(`Successfully withdrew $${amount}. New balance: $${this.balance}`);
+ } else {
+ console.log('Insufficient balance or invalid amount.');
+ }
+ }
+
+ checkBalance() {
+ console.log(`Current balance: $${this.balance}`);
+ }
+
+ updateBalance() {
+ this.balance = this.transactions.reduce((acc, transaction) => {
+ return transaction.type === 'deposit' ? acc + transaction.amount : acc - transaction.amount;
+ }, 0);
+ }
+
+ listAllDeposits() {
+ const deposits = this.transactions
+ .filter(transaction => transaction.type === 'deposit')
+ .map(transaction => transaction.amount);
+ console.log('Deposits:', deposits);
+ return deposits;
+ }
+
+ listAllWithdrawals() {
+ const withdrawals = this.transactions
+ .filter(transaction => transaction.type === 'withdraw')
+ .map(transaction => transaction.amount);
+ console.log('Withdrawals:', withdrawals);
+ return withdrawals;
+ }
+}
+
+const myAccount = new BankAccount();
+
+myAccount.deposit(100);
+myAccount.deposit(500);
+myAccount.withdraw(30);
+myAccount.withdraw(100);
+myAccount.checkBalance();
+myAccount.listAllDeposits();
+myAccount.listAllWithdrawals();
+
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/second-oop/user-stories.md b/fullstack-cert/js-projects/second-oop/user-stories.md
new file mode 100644
index 000000000..81ef9c99b
--- /dev/null
+++ b/fullstack-cert/js-projects/second-oop/user-stories.md
@@ -0,0 +1,13 @@
+1. You should define a class named `BankAccount` with a `constructor` that has a `balance` parameter. The default parameter value should be set to 0. The constructor should also initialize an empty `transactions` array to store transaction records.
+
+2. You should define a method named `updateBalance`.
+
+3. You should define a method named `deposit` with an `amount` parameter. This method should update `balance` accordingly.
+
+4. You should define a method named `withdraw` with an `amount` parameter. This method should update `balance` accordingly.
+
+5. You should define a method named `checkBalance` that returns the current balance.
+
+6. You should define a method named `listAllDeposits` that returns all deposits.
+
+7. You should define a method named `listAllWithdrawals` that returns all withdrawals.
diff --git a/fullstack-cert/js-projects/sentence-analyzer/script.js b/fullstack-cert/js-projects/sentence-analyzer/script.js
new file mode 100644
index 000000000..3824f7835
--- /dev/null
+++ b/fullstack-cert/js-projects/sentence-analyzer/script.js
@@ -0,0 +1,69 @@
+let sentence = prompt('Enter a sentence to analyze:');
+
+// Initialize stat variables to 0
+let wordCount = 0;
+let vowelCount = 0;
+let consonantCount = 0;
+let punctuationCount = 0;
+
+// Define varaibles for vowels, consonants, and possible punctuation marks from the sentence
+const vowels = 'aeiou';
+const consonants = 'bcdfghjklmnpqrstvwxyz';
+const punctuations = '.,!?;:-()[]{}"\'–';
+
+// analyze the sentence with the good old for loop
+for (let i = 0; i < sentence.length; i++) {
+ let char = sentence[i];
+
+ // Count vowels and consonants
+ if (vowels.indexOf(char) !== -1) {
+ vowelCount++;
+ } else if (consonants.indexOf(char) !== -1) {
+ consonantCount++;
+ }
+
+ // Count punctuation marks
+ if (punctuations.indexOf(char) !== -1) {
+ punctuationCount++;
+ }
+}
+
+// Use while loop to count words to show campers how while loop works. WE could use the existing for loop too.
+let index = 0;
+while (index < sentence.length) {
+ if (sentence[index] === ' ' || index === sentence.length - 1) {
+ wordCount++;
+ }
+ index++;
+}
+
+// Make campers refactor the whole thing to use a cleaner for...of loop
+/*
+for (const char of sentence) {
+ // Count vowels and consonants
+ if (vowels.indexOf(char) !== -1) {
+ vowelCount++;
+ } else if (consonants.indexOf(char) !== -1) {
+ consonantCount++;
+ }
+
+ // Count punctuation
+ if (punctuations.indexOf(char) !== -1) {
+ punctuationCount++;
+ }
+
+ if (char === ' ' || i === sentence.length - 1) {
+ wordCount++;
+ }
+}
+*/
+
+// Results
+// We could get fancy by making the sentence introducing the results bigger
+// console.log('%cSentence Analysis Results', 'font-size: 20px');
+console.log('Sentence Analysis Results');
+console.log(`Original Text: ${sentence}`);
+console.log(`Total words: ${wordCount}`);
+console.log(`Vowel count: ${vowelCount}`);
+console.log(`Consonant count: ${consonantCount}`);
+console.log(`Punctuation count: ${punctuationCount}`);
diff --git a/fullstack-cert/js-projects/shopping-list/script.js b/fullstack-cert/js-projects/shopping-list/script.js
new file mode 100644
index 000000000..812023ba9
--- /dev/null
+++ b/fullstack-cert/js-projects/shopping-list/script.js
@@ -0,0 +1,55 @@
+console.log("Let's create a grocery shopping list");
+// first create the shopping list variable with an empty array
+const shoppingList = [];
+
+// teach push method and have them practice here
+console.log(
+ "It will be nice to have some fruit to eat. Let's add some to our list."
+);
+
+shoppingList.push("Apples");
+console.log(`Current Shopping List: ${shoppingList}`);
+shoppingList.push("Grapes");
+console.log(`Current Shopping List: ${shoppingList}`);
+
+// teach unshift method and have them practice here
+console.log(
+ "It looks like we are out of cooking oil at home. Let's put that at the top of the list so we get that first."
+);
+
+shoppingList.unshift("Vegetable Oil");
+console.log(`Current Shopping List: ${shoppingList}`);
+
+// have them review the push method
+console.log(
+ "It might be nice to have some snacks. Let's add some to the bottom of our list."
+);
+
+// teach them that push accepts multiple items
+shoppingList.push("Popcorn", "Beef Jerky", "Potato Chips");
+console.log(`Current Shopping List: ${shoppingList}`);
+
+// teach them the pop method
+console.log(
+ "This looks like to much junk food. Let's remove the last item from the list"
+);
+
+shoppingList.pop();
+console.log(`Current Shopping List: ${shoppingList}`);
+
+// review unshift method and have them practice here
+console.log(
+ "It might be nice to get a dessert. Let's add that to the top of the list so we get that first."
+);
+
+shoppingList.unshift("Chocolate Cake");
+console.log(`Current Shopping List: ${shoppingList}`);
+
+// teach the shift method and have them practice here
+console.log(
+ "On second thought, maybe we should be more health conscious. Let's remove the dessert from the list."
+);
+
+shoppingList.shift();
+
+console.log(`Here is the final shopping list: ${shoppingList}`);
diff --git a/fullstack-cert/js-projects/space-mission-roster/script.js b/fullstack-cert/js-projects/space-mission-roster/script.js
new file mode 100644
index 000000000..ec5526a7c
--- /dev/null
+++ b/fullstack-cert/js-projects/space-mission-roster/script.js
@@ -0,0 +1,139 @@
+const squad = [];
+
+const firstAstronaut = {
+ id: 1,
+ name: "Andy",
+ role: "Commander",
+ isEVAEligible: true,
+ priority: 3
+};
+
+function addCrewMember(crew, astronaut) {
+ for (let i = 0; i < crew.length; i++) {
+ if (crew[i].id === astronaut.id) {
+ throw new Error("Duplicate ID: " + astronaut.id);
+ }
+ }
+
+ crew.push(astronaut);
+ console.log(`Added ${astronaut.name} as ${astronaut.role}.`);
+}
+
+addCrewMember(squad, firstAstronaut);
+
+const remainingCrew = [
+ { id: 2, name: "Bart", role: "Pilot", isEVAEligible: false, priority: 8 },
+ { id: 3, name: "Caroline", role: "Engineer", isEVAEligible: true, priority: 4 },
+ { id: 4, name: "Diego", role: "Scientist", isEVAEligible: false, priority: 1 },
+ { id: 5, name: "Elise", role: "Medic", isEVAEligible: true, priority: 7 },
+ { id: 6, name: "Felix", role: "Navigator", isEVAEligible: true, priority: 6 },
+ { id: 7, name: "Gertrude", role: "Communications", isEVAEligible: false, priority: 4 },
+ { id: 8, name: "Hank", role: "Mechanic", isEVAEligible: true, priority: 2 },
+ { id: 9, name: "Irene", role: "Specialist", isEVAEligible: true, priority: 5 },
+ { id: 10, name: "Joan", role: "Technician", isEVAEligible: false, priority: 1 },
+];
+
+for (let i = 0; i < remainingCrew.length; i++) {
+ addCrewMember(squad, remainingCrew[i]);
+}
+
+function swapCrewMembers(crew, fromIndex, toIndex) {
+ if (
+ fromIndex < 0 ||
+ toIndex < 0 ||
+ fromIndex >= crew.length ||
+ toIndex >= crew.length
+ ) {
+ throw new Error("Invalid crew indices");
+ }
+
+ // non-mutating copy of crew array
+ const updatedCrew = crew.slice();
+
+ // swapping using splice
+ const temp = updatedCrew[fromIndex];
+ updatedCrew.splice(fromIndex, 1, updatedCrew[toIndex]);
+ updatedCrew.splice(toIndex, 1, temp);
+
+ for (let i = 0; i < updatedCrew.length; i++) {
+ console.log(updatedCrew[i].name);
+ }
+ return updatedCrew;
+}
+
+updatedSquad = swapCrewMembers(squad, 2, 5);
+
+function getEVAReadyCrew(crew) {
+ const eligible = [];
+
+ // manual filter for EVA-eligible members
+ for (let i = 0; i < crew.length; i++) {
+ if (crew[i].isEVAEligible) {
+ eligible.push(crew[i]);
+ }
+ }
+
+ // manual sort (bubble sort) by priority
+ for (let i = 0; i < eligible.length - 1; i++) {
+ for (let j = 0; j < eligible.length - 1 - i; j++) {
+ if (eligible[j].priority < eligible[j + 1].priority) {
+ const temp = eligible[j];
+ eligible[j] = eligible[j + 1];
+ eligible[j + 1] = temp;
+ }
+ }
+ }
+ return eligible;
+}
+
+const EVAReadySquad = getEVAReadyCrew(updatedSquad);
+
+console.log("EVA-Ready Crew:");
+for (let i = 0; i < EVAReadySquad.length; i++) {
+ console.log(EVAReadySquad[i].name);
+}
+
+function chunkCrew(crew, size) {
+ if (size < 1) {
+ throw new Error("Chunk size must be >= 1");
+ }
+
+ const chunks = [];
+
+ for (let i = 0; i < crew.length; i += size) {
+ chunks.push(crew.slice(i, i + size)); // non-mutating slice into chunks
+ }
+
+ return chunks;
+}
+
+const EVAChunks = chunkCrew(EVAReadySquad, 3);
+console.log("EVA-Ready Crew Chunks:");
+for (let i = 0; i < EVAChunks.length; i++) {
+ console.log(`Chunk ${i + 1}:`);
+ for (let j = 0; j < EVAChunks[i].length; j++) {
+ console.log(EVAChunks[i][j].name);
+ }
+}
+
+function printCrewSummary(crew) {
+ const sorted = crew.slice();
+
+ // manual sort by priority descending (bubble sort)
+ for (let i = 0; i < sorted.length - 1; i++) {
+ for (let j = 0; j < sorted.length - 1 - i; j++) {
+ if (sorted[j].priority < sorted[j + 1].priority) {
+ const temp = sorted[j];
+ sorted[j] = sorted[j + 1];
+ sorted[j + 1] = temp;
+ }
+ }
+ }
+
+ for (let i = 0; i < sorted.length; i++) {
+ console.log(sorted[i].name);
+ }
+}
+
+console.log("Crew Summary:");
+printCrewSummary(updatedSquad);
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/stack-class/script.js b/fullstack-cert/js-projects/stack-class/script.js
new file mode 100644
index 000000000..b78488ff6
--- /dev/null
+++ b/fullstack-cert/js-projects/stack-class/script.js
@@ -0,0 +1,25 @@
+class Stack {
+ constructor() {
+ this.collection = [];
+ }
+
+ push = function (item) {
+ this.collection.push(item);
+ }
+
+ pop = function () {
+ return this.collection.pop();
+ }
+
+ peek = function () {
+ return this.collection[this.collection.length - 1];
+ }
+
+ isEmpty = function () {
+ return this.collection.length === 0;
+ }
+
+ clear = function () {
+ this.collection.length = 0;
+ }
+}
diff --git a/fullstack-cert/js-projects/stack-class/user-stories.md b/fullstack-cert/js-projects/stack-class/user-stories.md
new file mode 100644
index 000000000..809a887f9
--- /dev/null
+++ b/fullstack-cert/js-projects/stack-class/user-stories.md
@@ -0,0 +1,11 @@
+1. You should define a `Stack` class that has a `collection` property initialized to an empty array. You'll use this array to mimic a stack.
+
+1. The `Stack` class should have a `push` method that adds an item to the top of the stack.
+
+1. The `Stack` class should have a `pop` method that removes and returns the element on the top of the stack.
+
+1. The `Stack` class should have a `peek` method that returns the element on the top of the stack.
+
+1. The `Stack` class should have an `isEmpty` method that returns `true` if the stack is empty, and `false` otherwise.
+
+1. The `Stack` class should have a `clear` method that empties the stack.
\ No newline at end of file
diff --git a/fullstack-cert/js-projects/story-teller-app/index.html b/fullstack-cert/js-projects/story-teller-app/index.html
new file mode 100644
index 000000000..f2820773e
--- /dev/null
+++ b/fullstack-cert/js-projects/story-teller-app/index.html
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+ Storyteller app
+
+
+
+
Want to hear a short story?
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/fullstack-cert/js-projects/story-teller-app/script.js b/fullstack-cert/js-projects/story-teller-app/script.js
new file mode 100644
index 000000000..8f4eca709
--- /dev/null
+++ b/fullstack-cert/js-projects/story-teller-app/script.js
@@ -0,0 +1,59 @@
+// start with practicing querySelector()
+const storyContainer = document.querySelector(".story-container");
+
+// practice working with getElementById()
+const scaryStoryBtn = document.getElementById("scary-btn");
+const funnyStoryBtn = document.getElementById("funny-btn");
+const adventureStoryBtn = document.getElementById("adventure-btn");
+const result = document.getElementById("result");
+
+// have them create an object of stories
+
+const storyObj = {
+ scary: {
+ story: `In the dark woods, a group of friends stumbled upon an old, abandoned cabin.
+ They enter the cabin and awaken something malevolent that had been dormant for centuries.`,
+ borderColor: "#EE4B2B",
+ },
+ funny: {
+ story: `During a camping trip, Mark decided to show off his culinary skills by cooking dinner over an open fire.
+ However, his attempt caused him to burn the dinner as well as his eyebrows off.`,
+ borderColor: "#f1be32",
+ },
+ adventure: {
+ story: `Lost in the heart of the Amazon rain forest, Sarah and Jake stumbled upon an ancient temple.
+ They braved deadly traps and encountered strange wildlife,
+ all while deciphering cryptic clues left behind by a mysterious civilization.`,
+ borderColor: "#acd157",
+ },
+};
+
+/**
+ *
+ * First have them create a function
+ * with just a console statement
+ * so they can test the event listener
+ *
+function displayStory() {
+ console.log("You clicked the button");
+}
+
+scaryStoryBtn.addEventListener("click", displayStory);
+ *
+ */
+
+// then write steps to have them remove the console and build out the displayStory function
+
+function displayStory(genre) {
+ if (storyObj.hasOwnProperty(genre)) {
+ // this is a good reminder of when to use bracket vs dot notation for objects
+ //storyObj[genre]
+
+ result.textContent = storyObj[genre].story;
+ storyContainer.style.borderColor = storyObj[genre].borderColor;
+ }
+}
+
+scaryStoryBtn.addEventListener("click", () => displayStory("scary"));
+funnyStoryBtn.addEventListener("click", () => displayStory("funny"));
+adventureStoryBtn.addEventListener("click", () => displayStory("adventure"));
diff --git a/fullstack-cert/js-projects/story-teller-app/styles.css b/fullstack-cert/js-projects/story-teller-app/styles.css
new file mode 100644
index 000000000..b39b27f97
--- /dev/null
+++ b/fullstack-cert/js-projects/story-teller-app/styles.css
@@ -0,0 +1,76 @@
+/*Provide all styles for them*/
+*,
+*::before,
+*::after {
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
+}
+
+:root {
+ --dark-grey: #1b1b32;
+ --black: #000;
+ --white: #fff;
+ --golden-yellow: #fecc4c;
+ --yellow: #ffcc4c;
+ --gold: #feac32;
+ --orange: #ffac33;
+ --dark-orange: #f89808;
+}
+
+body {
+ background-color: var(--dark-grey);
+ color: var(--white);
+}
+
+h1,
+#result {
+ text-align: center;
+}
+
+h1 {
+ margin: 10px 0 15px;
+}
+
+.story-container {
+ margin: auto;
+ padding: 10px;
+ width: 80%;
+ border-style: double;
+ border-width: 14px;
+ border-color: var(--white);
+}
+
+.btn-container {
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+}
+
+@media (min-width: 760px) {
+ .btn-container {
+ flex-direction: row;
+ }
+}
+
+#result {
+ margin-top: 15px;
+ font-size: 1.2rem;
+ line-height: 30px;
+}
+
+.btn {
+ cursor: pointer;
+ width: 200px;
+ margin: 10px 0 10px 0.5rem;
+ color: var(--black);
+ background-color: var(--gold);
+ background-image: linear-gradient(var(--golden-yellow), var(--orange));
+ border-color: var(--gold);
+ border-width: 3px;
+}
+
+.btn:hover {
+ background-image: linear-gradient(var(--yellow), var(--dark-orange));
+}
diff --git a/fullstack-cert/js-projects/theme-switcher/index.html b/fullstack-cert/js-projects/theme-switcher/index.html
new file mode 100644
index 000000000..76b1ce1b7
--- /dev/null
+++ b/fullstack-cert/js-projects/theme-switcher/index.html
@@ -0,0 +1,36 @@
+
+
+
+
+
+ Theme Switcher
+
+
+
+
+
+
Light
+
Dark
+
Ocean
+
Nord
+
+
+
+
+
Magni rem natus quidem molestias deserunt. Tenetur nobis dicta dolorem tempora quo. Deleniti numquam reprehenderit in cupiditate. Voluptates enim aut corrupti itaque deleniti in quo. Animi nostrum aut ut. Incidunt ut sint quo totam saepe qui quia distinctio.
+
+
diff --git a/fullstack-cert/js-projects/theme-switcher/script.js b/fullstack-cert/js-projects/theme-switcher/script.js
new file mode 100644
index 000000000..340cc25fd
--- /dev/null
+++ b/fullstack-cert/js-projects/theme-switcher/script.js
@@ -0,0 +1,72 @@
+const themes = [
+ {
+ name: 'light',
+ message: 'Hello sunshine — Light theme is on!'
+ },
+ {
+ name: 'dark',
+ message: 'The night is yours — Dark theme is on!'
+ },
+ {
+ name: 'nord',
+ message: 'The frost has settled - Nord theme is on!'
+ },
+ {
+ name: 'ocean',
+ message: 'Blue skies and high tides — Ocean theme is on!'
+ },
+];
+
+const setTheme = theme => {
+ document.body.className = '';
+ document.body.classList.add(`theme-${theme.name}`);
+}
+
+const updateStatus = theme => {
+ const status = document.getElementById('status');
+
+ status.textContent = theme.message;
+}
+
+document.addEventListener('DOMContentLoaded', () => {
+ themes.forEach(theme => {
+ const button = document.getElementById(`theme-${theme.name}`);
+
+ if (button) {
+ button.addEventListener('click', () => {
+ setTheme(theme);
+ updateStatus(theme);
+ closeMenu();
+ });
+ }
+ });
+
+ const toggleButton = document.getElementById('themeSwitcherButton');
+ const menu = document.getElementById('themeDropdown');
+
+ toggleButton.addEventListener('click', () => {
+ const isExpanded = toggleButton.getAttribute('aria-expanded') === 'true';
+ if (isExpanded) {
+ closeMenu();
+ } else {
+ openMenu();
+ }
+ });
+
+ function closeMenu() {
+ menu.setAttribute('hidden', '');
+ toggleButton.setAttribute('aria-expanded', 'false');
+ }
+
+ function openMenu() {
+ menu.removeAttribute('hidden');
+ toggleButton.setAttribute('aria-expanded', 'true');
+ }
+
+ // Close the menu when clicking outside
+ document.addEventListener('click', (e) => {
+ if (!toggleButton.contains(e.target) && !menu.contains(e.target)) {
+ closeMenu();
+ }
+ });
+});
diff --git a/fullstack-cert/js-projects/theme-switcher/styles.css b/fullstack-cert/js-projects/theme-switcher/styles.css
new file mode 100644
index 000000000..867b45b40
--- /dev/null
+++ b/fullstack-cert/js-projects/theme-switcher/styles.css
@@ -0,0 +1,88 @@
+body {
+ margin: 0;
+ font-family: sans-serif;
+ transition: background 0.3s, color 0.3s;
+}
+
+ul {
+ margin: 0;
+ padding: 0;
+}
+
+li {
+ list-style-type: none;
+}
+
+.dropdown-btn {
+ position: relative;
+ padding: 10px 20px;
+ border: none;
+ cursor: pointer;
+}
+
+.dropdown-content {
+ position: absolute;
+ background-color: #ffffff;
+ min-width: 160px;
+ box-shadow: 0px 4px 8px rgba(0,0,0,0.2);
+ z-index: 1;
+}
+
+.dropdown-item {
+ width: 100%;
+ padding: 12px;
+ color: #000000;
+ background-color: #ffffff;
+ cursor: pointer;
+}
+
+.dropdown-item:hover {
+ background-color: #f1f1f1;
+}
+
+#status {
+ text-align: center;
+ min-height: 20px;
+}
+
+/* Themes */
+.theme-light {
+ background-color: #ffffff;
+ color: #000000;
+}
+
+.theme-light .dropdown-btn {
+ background-color: #d3b3aa;
+ color: #000000;
+}
+
+.theme-dark {
+ background-color: #121212;
+ color: #ffffff;
+}
+
+.theme-dark .dropdown-btn {
+ background-color: #4f4f4f;
+ color: #ffffff;
+}
+
+.theme-ocean {
+ background-color: #0077be;
+ color: #e0f7fa;
+}
+
+.theme-ocean .dropdown-btn {
+ background-color: #193e51;
+ color: #ffffff;
+}
+
+.theme-nord {
+ background-color: #2e3440;
+ color: #d8dee9;
+}
+
+.theme-nord .dropdown-btn {
+ background-color: #596680;
+ color: #ffffff;
+}
+
diff --git a/fullstack-cert/js-projects/voting-system/index.js b/fullstack-cert/js-projects/voting-system/index.js
new file mode 100644
index 000000000..3c89da7eb
--- /dev/null
+++ b/fullstack-cert/js-projects/voting-system/index.js
@@ -0,0 +1,48 @@
+// Initialize the poll with a Map
+const poll = new Map();
+
+function addOption(option) {
+ if (!poll.has(option)) {
+ poll.set(option, new Set()); // Each option has a Set to track unique voters
+ return `Option "${option}" added to the poll.`;
+ } else {
+ return `Option "${option}" already exists.`;
+ }
+}
+
+function vote(option, voterId) {
+ if (!poll.has(option)) {
+ return `Option "${option}" does not exist.`;
+ }
+ const voters = poll.get(option);
+ if (voters.has(voterId)) {
+ return `Voter ${voterId} has already voted for "${option}".`;
+ } else {
+ voters.add(voterId); // Add voterId to the Set for this option
+ return `Voter ${voterId} voted for "${option}".`;
+ }
+}
+
+function displayResults() {
+ let results = "Poll Results:\n";
+ for (let [option, voters] of poll.entries()) {
+ results += `${option}: ${voters.size} votes\n`;
+ }
+ return results.trim();
+}
+
+// Example usage
+
+// add options
+console.log(addOption("Turkey"));
+console.log(addOption("Morocco"));
+console.log(addOption("Qatar"));
+
+// vote
+console.log(vote("Turkey", "traveler1"));
+console.log(vote("Morocco", "traveler2"));
+console.log(vote("Turkey", "traveler2")); // A second unique voter for Option A
+console.log(vote("Qatar", "traveler3"));
+console.log(vote("Turkey", "traveler1")); // Duplicate vote attempt for voter1 on Option A
+
+console.log(displayResults());
diff --git a/fullstack-cert/js-projects/voting-system/user-stories.md b/fullstack-cert/js-projects/voting-system/user-stories.md
new file mode 100644
index 000000000..585979f85
--- /dev/null
+++ b/fullstack-cert/js-projects/voting-system/user-stories.md
@@ -0,0 +1,39 @@
+# --description--
+
+In this lab, you will build a voting system that would use `Map` to create a poll and `Set` to prevent duplicate voting.
+
+**Objective:** Fulfill the user stories below and get all the tests to pass to complete the lab.
+
+**User Stories:**
+
+1. You should initialize the `poll` variable to a new `Map` object.
+
+2. You should have a function `addOption` that accepts a parameter `option`.
+
+3. In the `addOption` function:
+
+- If the `option` does not already exist in the poll, it should be added to the poll with an empty `Set` as its value to track voters. You should also return the message `Option "