diff --git a/assignments/final/project source/placehold for pasting in entire repo b/assignments/final/CMSC495Final placeholder pdf similarity index 100% rename from assignments/final/project source/placehold for pasting in entire repo rename to assignments/final/CMSC495Final placeholder pdf diff --git a/assignments/final/Development Documents/designplan.pdf b/assignments/final/DevelopmentDocuments/CMS495DesignPlan.pdf similarity index 100% rename from assignments/final/Development Documents/designplan.pdf rename to assignments/final/DevelopmentDocuments/CMS495DesignPlan.pdf diff --git a/assignments/final/Development Documents/plansandspecifications.pdf b/assignments/final/DevelopmentDocuments/CMSC495DevelopmentPlan.pdf similarity index 100% rename from assignments/final/Development Documents/plansandspecifications.pdf rename to assignments/final/DevelopmentDocuments/CMSC495DevelopmentPlan.pdf diff --git a/assignments/final/Development Documents/phase1.pdf b/assignments/final/DevelopmentDocuments/CMSC495PhaseI.pdf similarity index 100% rename from assignments/final/Development Documents/phase1.pdf rename to assignments/final/DevelopmentDocuments/CMSC495PhaseI.pdf diff --git a/assignments/final/Development Documents/phase2.pdf b/assignments/final/DevelopmentDocuments/CMSC495PhaseII.pdf similarity index 100% rename from assignments/final/Development Documents/phase2.pdf rename to assignments/final/DevelopmentDocuments/CMSC495PhaseII.pdf diff --git a/assignments/final/DevelopmentDocuments/CMSC495PhaseIII.pdf b/assignments/final/DevelopmentDocuments/CMSC495PhaseIII.pdf new file mode 100644 index 0000000..8e7c726 Binary files /dev/null and b/assignments/final/DevelopmentDocuments/CMSC495PhaseIII.pdf differ diff --git a/assignments/final/Development Documents/testplan.pdf b/assignments/final/DevelopmentDocuments/CMSC495TestPlanUserGuide.pdf similarity index 100% rename from assignments/final/Development Documents/testplan.pdf rename to assignments/final/DevelopmentDocuments/CMSC495TestPlanUserGuide.pdf diff --git a/assignments/final/placeholder pdf b/assignments/final/placeholder pdf deleted file mode 100644 index a27c279..0000000 --- a/assignments/final/placeholder pdf +++ /dev/null @@ -1,20 +0,0 @@ -References -GitHub. (n.d.). GitHub Learning Lab. Retrieved from https://github.com/apps/github-learning-lab - -GitHub. (n.d.). GitHub Pages. Retrieved from https://pages.github.com/ - -GitHub. (n.d.). GitHub Pages Documentation. Retrieved from https://docs.github.com/en/pages - -GitHub. (n.d.). Introduction to GitHub. Retrieved from https://skills.github.com/ - -Godot Engine. (n.d.). Documentation. Retrieved from https://docs.godotengine.org/en/stable/index.html - -Institute of Electrical and Electronics Engineers. (n.d.). 278253. IEEE Xplore. Retrieved from https://ieeexplore.ieee.org/document/278253 - -Game Development Document link (GDD): https://github.com/AwaywithCharles/CMSC495-Capstone/blob/main/documentation/GDD.txt - -Minimum Viable Product (MVP): https://github.com/AwaywithCharles/CMSC495-Capstone/blob/main/documentation/MVP.txt - -Software Requirements Specifications(SRS): https://github.com/AwaywithCharles/CMSC495-Capstone/blob/main/documentation/SRS.txt - -The main repo for the project: https://github.com/AwaywithCharles/CMSC495-Capstone \ No newline at end of file diff --git a/assignments/final/project source code/docs/css/stylesheet.css b/assignments/final/project source code/docs/css/stylesheet.css new file mode 100644 index 0000000..d930341 --- /dev/null +++ b/assignments/final/project source code/docs/css/stylesheet.css @@ -0,0 +1,620 @@ +/* ------------------------------------------------------------------- */ +/* Table of Contents +----------------- +1. Import Fonts +2. Base Styles + 2.1 Root Variables + 2.2 Reset Styles + 2.3 Typography + 2.4 Header Styles + 2.5 Button and Link Styles +3. Layout Styles + 3.1 General Layout + 3.2 Back Button Styling +4. Interactive Elements + 4.1 CTA Buttons +5. Homepage Styles +6. Responsive Design Adjustments +7. Footer Styles +8. Hangman Game Styles +9. Minesweeper Game Styles +*/ +/* ------------------------------------------------------------------- */ + + + +/* ------------------------------------------------------------------- */ +/* ----------------- 1. Import Fonts --------------------------------- */ +/* ------------------------------------------------------------------- */ + +@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap'); + +/* ------------------------------------------------------------------- */ +/* ----------------- 2. Base Styles --------------------------------- */ +/* ------------------------------------------------------------------- */ + +/* 2.1 Root Variables */ +:root { + --gray-background: #DDD; + --border-radius: 0.4rem; +} + +/* 2.2 Reset Styles */ +html, body { + height: 100%; + margin: 0; + padding: 0; + font-family: 'JetBrains Mono'; +} + +body { + min-height: 100%; +} + +/* 2.3 Typography */ +*, h1, h2, p { + box-sizing: border-box; + padding: 0; + margin: 0; + font-size: 10px; + font-weight: normal; +} + +h1 { + padding: 4rem 0; + font-weight: bold; + text-align: center; + font-size: 3rem; +} + +p { + font-size: 1.8rem; +} + +/* 2.4 Header Styles */ +header p { + text-align: right; + margin: 1rem; +} + +.capstone { + font-weight: lighter; +} + +/* 2.5 Button and Link Styles */ +a { + text-decoration: none; + font-weight: bold; + color: black; +} + +a.meet-the-team { + display: block; +} + +button, .start-game { + border-radius: var(--border-radius); + font-weight: bold; +} + +.start-game { + display: inline-block; + text-decoration: none; + background-color: black; + color: white; + border: black; +} + +/* ------------------------------------------------------------------- */ +/* ----------------- 3. Layout Styles ------------------------------- */ +/* ------------------------------------------------------------------- */ + +/* 3.1 General Layout */ +.homepage { + margin-bottom: 2rem; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; +} + +nav { + background-color: var(--gray-background); +} + +#nav-desktop-tablet { + display: flex; + padding: 2.5rem; + font-size: 2rem; + gap: 2.5rem; +} + +#nav-desktop-tablet * { + color: #000000; + font-size: 2rem; +} + +.capstone { + margin-left: auto; +} + +/* meet the team stylings */ + +.meet-the-team { + font-size: 3rem; +} +.profile img { + float: left; +} + +.profile-info { + padding: 6rem; +} + +.repeat-name { + font-size: 2rem; + font-weight: bold; +} + +.profile-info h2 { + font-size: 2rem; +} + +/* documentation stylings */ +.documents h2 { + padding: 2rem; + font-size: 2rem; + text-align: center; +} + +/* ------------------------------------------------------------------- */ +/* ----------------- 4. Interactive Elements ------------------------- */ +/* ------------------------------------------------------------------- */ + +/* 4.1 CTA Buttons */ +.start-game, .meet-the-team, .toggle-profile { + border-radius: var(--border-radius); + display: block; +} + +.start-game { + background-color: black; + color: white; + text-decoration: none; +} + +/* ------------------------------------------------------------------- */ +/* ----------------- 5. Homepage Styles --------------------------- */ +/* ------------------------------------------------------------------- */ + +/* title/text stylings */ +.homepage p { + text-align: center; +} + +/* styles for section highlighting various features or sections */ +.highlights { + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 20px; + margin: 20px 0; +} + +.highlights article { + padding: 10px; + background-color: var(--gray-background); + border-radius: var(--border-radius); +} + +/* ------------------------------------------------------------------- */ +/* ----------------- 6. Responsive Design Adjustments ---------------- */ +/* ------------------------------------------------------------------- */ + +@media only screen and (max-width: 1000px) { + #nav-desktop-tablet { + padding: 1.4rem; + display: flex; + justify-content: center; + align-items: center; + gap: 2rem; + } + + #nav-desktop-tablet.hidden { + display: none; + } + + #nav-desktop-tablet a, #nav-desktop-tablet .capstone { + font-size: 1.8rem; + padding: 0; + } + + #nav-desktop-tablet .capstone { + font-size: 1.4rem; + } + + .capstone { + margin-left: auto; + } + + .homepage { + padding: 0 1rem; + } + + article { + padding: 2rem 0; + } + + article h2 { + font-size: 1.8rem; + text-align: center; + font-weight: bold; + padding-bottom: 1rem; + } + + .game-links a { + font-size: 1.8rem; + } +} + +@media only screen and (max-width: 480px) { + :root { + --link-btn-font-size: 2.2rem; + font-family: 'JetBrains Mono'; + } + + #nav-mobile { + width: 100%; + background-color: var(--gray-background); + padding: 1.5rem; + display: flex; + flex-direction: column; + justify-content: center; + align-items: flex-end; + } + + #nav-mobile.hidden { + display: none; + } + + #nav-mobile button { + border: none; + background-color: var(--gray-background)ne; + } + + #nav-mobile button img { + width: 3rem; + height: auto; + } + + #nav-mobile div { + padding-top: 2rem; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + gap: 2rem; + width: 100%; + } + + .capstone { + margin: 3rem 0 0 0; + text-align: center; + } + + #nav-mobile div.hidden { + display: none; + } + + .start-game { + margin-top: 6rem; + margin-bottom: 2rem; + padding: 2rem 2.5rem; + font-size: var(--link-btn-font-size); + } + + a { + font-size: var(--link-btn-font-size); + text-decoration: none; + } + + .back { + margin: 1rem; + } + + .profiles { + margin-bottom: 3rem; + } + + .highlights, .profiles { + display: flex; + flex-direction: column; + } + + .toggle-profile, .profile { + width: 85%; + margin: 0.75rem auto; + padding: 1.5rem 1.75rem; + } + + .toggle-profile { + display: flex; + justify-content: space-between; + align-items: center; + font-size: var(--link-btn-font-size); + border: none; + background-color: var(--gray-background); + } + + .toggle-profile p { + font-weight: bold; + font-size: var(--link-btn-font-size); + font-family: 'JetBrains Mono'; + } + + .toggle-profile img { + width: 3.5rem; + height: auto; + } + + .repeat-name { + display: none; + } + + .profile { + background-color: var(--gray-background); + border-radius: 0 0 var(--border-radius) var(--border-radius); + } + + .profile img { + display: block; + margin: 0.5rem auto; + float: none; + } + + .profile-info { + padding: 1rem; + } + + .profile h2 { + font-size: var(--link-btn-font-size); + padding: 1rem 0; + } + + /* toggle classes used in js file */ + .toggle-profile.collapse-bottom-margin { + margin-bottom: 0; + } + .profile.collapse-top-margin { + margin-top: 0; + } + .hidden { + display: none; + } +} + +/* ------------------------------------------------------------------- */ +/* ----------------- 7. Footer Stles ---------------------------------- */ +/* ------------------------------------------------------------------- */ + +/* Footer Styles */ +.footer-container { + display: flex; + justify-content: center; + align-items: center; + flex-wrap: wrap; + text-align: center; + padding: 20px; + background-color: var(--gray-background); + font-size: 0.8rem; +} + +.footer-links, .footer-legal, .footer-university { + margin: 0 10px; + padding: 5px; + flex: 1 1 auto; +} + +.footer-links ul { + display: flex; + padding: 0; + list-style: none; + align-items: center; +} + +.footer-links li { + margin-right: 15px; +} + +.footer-links li:last-child { + margin-right: 0; +} + +.footer-links a { + font-size: 1.8rem; + color: inherit; + text-decoration: none; +} + +.footer-links a:hover { + text-decoration: underline; +} + +.footer-legal { + font-size: 1rem; +} + +.footer-legal a { + text-decoration: underline; + font-size: 1rem; + margin-top: 1rem; + display: block; +} + +/* Additional styles to make sure everything looks good on smaller screens */ + +@media (max-width: 768px) { + .footer-container { + flex-direction: column; + } + + .footer-links ul { + flex-direction: column; + margin-top: 10px; + } +} + +/* ------------------------------------------------------------------- */ +/* ----------------- 8. Hangman---------------------- ---------------- */ +/* ------------------------------------------------------------------- */ + +/* General Styles for Hangman Game Container */ +.hangman-game-container { + max-width: 1200px; + margin: auto; + padding: 20px; +} + +/* Styles for Each Hangman Game Section */ +.hangman-game { + background-color: #f9f9f9; + border: 1px solid #ccc; + border-radius: 10px; + padding: 20px; + margin: 20px 0; + box-shadow: 0 0 10px rgba(0,0,0,0.1); +} + +/* Specific Container for Hangman Gameplay */ +.hangman-gameplay { + display: flex; + justify-content: space-around; + align-items: start; + max-height: 600px; + overflow-y: auto; + padding: 20px; + box-shadow: 0 4px 8px rgba(0,0,0,0.1); + background: #fff; + border-radius: 10px; + border: 1px solid #ccc; +} + +.hangman-image-container { + flex: 1; + padding: 10px; + display: flex; + justify-content: center; + align-items: center; +} + +.hangman-images { + max-width: 100%; + height: auto; +} + +/* Styles for Displaying Hangman Images */ +.hangman-images { + height: 200px; + width: 100%; + display: flex; + justify-content: center; +} + +/* Styling for Text Displays and Input Fields in Hangman Game */ +.hangman-word-display, .hangman-wrong-guesses { + font-size: 24px; + font-weight: bold; + margin: 10px; +} + +.hangman-input { + width: 60%; + padding: 10px; + margin: 10px; + font-size: 16px; +} + +/* Hangman Button Styles */ +.hangman-button { + padding: 10px 20px; + margin: 10px; + background-color: black; + color: white; + border: none; + border-radius: 5px; + cursor: pointer; + font-size: 16px; +} + +.hangman-button:hover { + background-color: #0056b3; +} + +.letter-buttons button { + padding: 10px 15px; + margin: 5px; + background-color: #808080; + color: white; + border: none; + border-radius: 5px; + cursor: pointer; + font-size: 16px; +} + +.letter-buttons button:disabled { + cursor: default; + opacity: 0.5; +} + +/* ------------------------------------------------------------------- */ +/* ----------------- 8. Minesweeper ---------------------------------- */ +/* ------------------------------------------------------------------- */ + +#minesweeper{padding:2rem} + +#minesweeper #game.hidden,#minesweeper #main-menu.hidden,.hidden{display:none} + +#minesweeper button{padding:.8rem 1.5rem;font-family:JetBrains Mono} + +#minesweeper .return{text-decoration:underline;font-weight:700;border:none;background-color:#fff} + +#minesweeper #main-menu{display:grid;grid-template-columns:1fr 1fr;gap:2rem}#main-menu>div{display:flex;flex-direction:column;align-items:center;gap:1rem}#minesweeper h2{margin-top:2rem;font-weight:700;font-size:2.4rem}#main-menu p,#minesweeper h2{text-align:center}#main-menu form{display:flex;flex-direction:column;gap:1rem}#main-menu form>div{display:flex;justify-content:space-evenly;gap:1rem}#main-menu input{border:none;border-bottom:.1rem solid;font-family:JetBrains Mono}#main-menu button{margin-top:1rem}#instructions h2,#instructions p{margin-bottom:1.5rem}#instructions h3{font-size:2.2rem}#instructions ul{padding:0 2rem}#instructions li{font-size:1.8rem;margin-bottom:1rem}#instructions a{font-size:1.8rem}#instructions button{padding:1rem 1.8rem;margin:2rem auto}#board-background{width:100%;background-color:#ededed;padding:2rem 0}#board{max-width:fit-content;margin:0 auto}#board .row{display:flex}#board button{border-radius:0;padding:.8rem;width:3rem;height:3rem;border-color:#d3d3d3}button[data-status=checked]{color:#000;font-weight:700;background-color:#fff7e4}button[data-num-adj-mines="1"]{background-color:#ffe6c6}button[data-num-adj-mines="2"]{background-color:#ffc384}button[data-num-adj-mines="3"]{background-color:#dea38b}button[data-num-adj-mines="4"]{background-color:#e9f59d}button[data-num-adj-mines="5"]{background-color:#b0eb93}button[data-num-adj-mines="6"]{background-color:#accce4}button[data-num-adj-mines="7"]{background-color:#b0a9e4}button[data-num-adj-mines="8"]{background-color:#feaae4}button[data-status=flag]{background:url(../images/minesweeper/flag.svg) no-repeat 50%;background-size:1.5rem 1.5rem}button[data-status=question]{background:url(../images/minesweeper/question.svg) no-repeat 50%;background-size:1.5rem 1.5rem}button[data-status=bomb-reveal]{background:url(../images/minesweeper/bomb.svg) no-repeat 50%;background-size:1.5rem 1.5rem}#flagged-mines-container,#info,#settings{display:flex;justify-content:center;align-items:center;gap:4rem}#info{margin-bottom:.5rem}#flagged-mines-container{gap:.2rem}#mine-svg-container{margin-bottom:.3rem}#emoji,#mine-svg-container,img[src="bomb.svg"]{width:2.5rem;height:2.5rem}#emoji{border:none;background:url(../images/minesweeper/alive.svg) no-repeat 50%;background-size:2.5rem 2.5rem}#emoji.dead{background:url(../images/minesweeper/dead.svg) no-repeat 50%;background-size:2.5rem 2.5rem}#timer span{font-size:1.8rem}#settings{flex-direction:column;gap:.5rem;margin-top:.5rem}#settings .return{background-color:#ededed;font-size:1.8rem;font-weight:400}dialog{border-color:grey;border-radius:1rem;margin:auto;padding:2rem}dialog div{display:flex;flex-direction:column;align-items:center;gap:1rem}dialog p{text-align:center}dialog button{margin:0 auto} + + +/* game page stuff */ +.game-links { + display: flex; + justify-content: center; + align-items: center; + flex-wrap: wrap; + padding: 20px; +} + +.game-link { + display: flex; + flex-direction: column; + align-items: center; + background-color: black; + color: white; + padding: 10px; + margin: 10px; + text-decoration: none; + border-radius: 5px; + width: 150px; +} + +.game-link:hover { + background-color: #0056b3; +} + +.game-link img { + max-width: 100%; + height: auto; + margin-bottom: 10px; +} + +@media (max-width: 600px) { + .game-link { + padding: 8px 16px; + font-size: smaller; + } +} diff --git a/assignments/final/project source code/docs/documents.html b/assignments/final/project source code/docs/documents.html new file mode 100644 index 0000000..a0d85b0 --- /dev/null +++ b/assignments/final/project source code/docs/documents.html @@ -0,0 +1,95 @@ + + + + Documents + + + + + + + + + + + +
+

Project Documentation

+ + +
+

Plans and Specifications

+ +
+ +
+

Design Plan

+ +
+ +
+

Test Plan

+ +
+ + +
+

Phase I

+ +
+ + +
+

Phase II

+ +
+ + +
+

Phase III

+ +
+ + +
+

Final

+ +
+ +
+ + + + diff --git a/docs/documents/designplan.pdf b/assignments/final/project source code/docs/documents/designplan.pdf similarity index 100% rename from docs/documents/designplan.pdf rename to assignments/final/project source code/docs/documents/designplan.pdf diff --git a/docs/documents/phase1.pdf b/assignments/final/project source code/docs/documents/phase1.pdf similarity index 100% rename from docs/documents/phase1.pdf rename to assignments/final/project source code/docs/documents/phase1.pdf diff --git a/docs/documents/phase2.pdf b/assignments/final/project source code/docs/documents/phase2.pdf similarity index 100% rename from docs/documents/phase2.pdf rename to assignments/final/project source code/docs/documents/phase2.pdf diff --git a/docs/documents/plansandspecifications.pdf b/assignments/final/project source code/docs/documents/plansandspecifications.pdf similarity index 100% rename from docs/documents/plansandspecifications.pdf rename to assignments/final/project source code/docs/documents/plansandspecifications.pdf diff --git a/docs/documents/testplan.pdf b/assignments/final/project source code/docs/documents/testplan.pdf similarity index 100% rename from docs/documents/testplan.pdf rename to assignments/final/project source code/docs/documents/testplan.pdf diff --git a/assignments/final/project source code/docs/game.html b/assignments/final/project source code/docs/game.html new file mode 100644 index 0000000..abb4259 --- /dev/null +++ b/assignments/final/project source code/docs/game.html @@ -0,0 +1,65 @@ + + + + + + Games + + + + + + + + + + +
+

Explore Our Games

+ +
+ + + + + + diff --git a/assignments/final/project source code/docs/hangman.html b/assignments/final/project source code/docs/hangman.html new file mode 100644 index 0000000..eb1d7a4 --- /dev/null +++ b/assignments/final/project source code/docs/hangman.html @@ -0,0 +1,88 @@ + + + + + + Games + + + + + + + + + + + +
+ +
+ + + + +
+

Hangman

+
+
+ Hangman +
+
+
+
+
+ + + +
+
+
+ +
+
+ + + + + + + + diff --git a/assignments/final/project source code/docs/images/back-arrow.svg b/assignments/final/project source code/docs/images/back-arrow.svg new file mode 100644 index 0000000..bbcd50c --- /dev/null +++ b/assignments/final/project source code/docs/images/back-arrow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assignments/final/project source code/docs/images/down-arrow.svg b/assignments/final/project source code/docs/images/down-arrow.svg new file mode 100644 index 0000000..b2f8463 --- /dev/null +++ b/assignments/final/project source code/docs/images/down-arrow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assignments/final/project source code/docs/images/hangman.png b/assignments/final/project source code/docs/images/hangman.png new file mode 100644 index 0000000..d406a6a Binary files /dev/null and b/assignments/final/project source code/docs/images/hangman.png differ diff --git a/assignments/final/project source code/docs/images/hangman/HangmanPole.png b/assignments/final/project source code/docs/images/hangman/HangmanPole.png new file mode 100644 index 0000000..969532a Binary files /dev/null and b/assignments/final/project source code/docs/images/hangman/HangmanPole.png differ diff --git a/assignments/final/project source code/docs/images/hangman/HangmanPoleWithHangMan.png b/assignments/final/project source code/docs/images/hangman/HangmanPoleWithHangMan.png new file mode 100644 index 0000000..99b1ad3 Binary files /dev/null and b/assignments/final/project source code/docs/images/hangman/HangmanPoleWithHangMan.png differ diff --git a/assignments/final/project source code/docs/images/hangman/HangmanPoleWithHead.png b/assignments/final/project source code/docs/images/hangman/HangmanPoleWithHead.png new file mode 100644 index 0000000..377ae00 Binary files /dev/null and b/assignments/final/project source code/docs/images/hangman/HangmanPoleWithHead.png differ diff --git a/assignments/final/project source code/docs/images/hangman/HangmanPoleWithHeadAndBody.png b/assignments/final/project source code/docs/images/hangman/HangmanPoleWithHeadAndBody.png new file mode 100644 index 0000000..2dd87be Binary files /dev/null and b/assignments/final/project source code/docs/images/hangman/HangmanPoleWithHeadAndBody.png differ diff --git a/assignments/final/project source code/docs/images/hangman/HangmanPoleWithHeadAndBodyAndBothHands.png b/assignments/final/project source code/docs/images/hangman/HangmanPoleWithHeadAndBodyAndBothHands.png new file mode 100644 index 0000000..ed289e8 Binary files /dev/null and b/assignments/final/project source code/docs/images/hangman/HangmanPoleWithHeadAndBodyAndBothHands.png differ diff --git a/assignments/final/project source code/docs/images/hangman/HangmanPoleWithHeadAndBodyAndBothHandsAndLeftLeg.png b/assignments/final/project source code/docs/images/hangman/HangmanPoleWithHeadAndBodyAndBothHandsAndLeftLeg.png new file mode 100644 index 0000000..2477339 Binary files /dev/null and b/assignments/final/project source code/docs/images/hangman/HangmanPoleWithHeadAndBodyAndBothHandsAndLeftLeg.png differ diff --git a/assignments/final/project source code/docs/images/hangman/HangmanPoleWithHeadAndBodyAndLeftHand.png b/assignments/final/project source code/docs/images/hangman/HangmanPoleWithHeadAndBodyAndLeftHand.png new file mode 100644 index 0000000..204e8d5 Binary files /dev/null and b/assignments/final/project source code/docs/images/hangman/HangmanPoleWithHeadAndBodyAndLeftHand.png differ diff --git a/assignments/final/project source code/docs/images/menu.svg b/assignments/final/project source code/docs/images/menu.svg new file mode 100644 index 0000000..53cc227 --- /dev/null +++ b/assignments/final/project source code/docs/images/menu.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/assignments/final/project source code/docs/images/minesweeper.png b/assignments/final/project source code/docs/images/minesweeper.png new file mode 100644 index 0000000..586ffe1 Binary files /dev/null and b/assignments/final/project source code/docs/images/minesweeper.png differ diff --git a/assignments/final/project source code/docs/images/profile.jpeg b/assignments/final/project source code/docs/images/profile.jpeg new file mode 100644 index 0000000..7857061 Binary files /dev/null and b/assignments/final/project source code/docs/images/profile.jpeg differ diff --git a/assignments/final/project source code/docs/images/up-arrow.svg b/assignments/final/project source code/docs/images/up-arrow.svg new file mode 100644 index 0000000..58e2020 --- /dev/null +++ b/assignments/final/project source code/docs/images/up-arrow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assignments/final/project source code/docs/images/x.svg b/assignments/final/project source code/docs/images/x.svg new file mode 100644 index 0000000..f2b2cc8 --- /dev/null +++ b/assignments/final/project source code/docs/images/x.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/assignments/final/project source code/docs/index.html b/assignments/final/project source code/docs/index.html new file mode 100644 index 0000000..5617e7c --- /dev/null +++ b/assignments/final/project source code/docs/index.html @@ -0,0 +1,72 @@ + + + + Home - UMGC Educational Hangman + + + + + + + + + + + +
+

Welcome to the UMGC Educational Hangman Game

+

This project is a collaborative effort by a team of students focused on combining education with entertainment through an interactive Hangman game that teaches programming concepts.

+ + +
+
+

Interactive Learning Tool

+

Engage with programming terminology in a fun and interactive way. Each correctly guessed word teaches a new concept.

+
+
+

Responsive Design

+

Our website adapts to various devices, ensuring a seamless user experience whether on a desktop, tablet, or smartphone.

+
+
+

Educational Content

+

Each successful guess is not just a win—it's a learning opportunity, providing explanations and insights into programming.

+
+
+
+ + + + + diff --git a/assignments/final/project source code/docs/js/hangman.js b/assignments/final/project source code/docs/js/hangman.js new file mode 100644 index 0000000..afb4310 --- /dev/null +++ b/assignments/final/project source code/docs/js/hangman.js @@ -0,0 +1,237 @@ +// words +const words = [ + "algorithm", "function", "variable", "loop", "array", "boolean", "string", "integer", "float", + "exception", "pointer", "recursion", "binary", "syntax", "compile", "debugging", "inheritance", + "encapsulation", "abstraction", "polymorphism", "interface", "constructor", "destructor", + "method", "module", "library", "framework", "database", "devops", "agile", "scrum", "kanban", + "github", "markdown", "asynchronous", "callback", "closure", "prototype", "promise", "event", + "concurrency", "parallelism", "deadlock", "mutex", "semaphore", + "thread", "process", "dead code", "refactoring", "sprint" +]; + +// definitions +const wordDefinitions = { + "algorithm": "A step-by-step procedure to solve a problem.", + "variable": "A container for storing data values.", + "function": "A block of reusable code that performs a specific task.", + "array": "A data structure that stores a collection of elements.", + "boolean": "A data type that represents true or false values.", + "loop": "A control flow statement that executes a block of code repeatedly.", + "string": "A sequence of characters.", + "integer": "A data type representing whole numbers.", + "float": "A data type representing numbers with a fractional part.", + "exception": "An error that occurs during the execution of a program.", + "pointer": "A variable that stores the memory address of another variable.", + "recursion": "A programming technique where a function calls itself.", + "binary": "A numbering system with a base of 2.", + "syntax": "The rules that govern the structure of statements in a programming language.", + "compile": "The process of translating source code into machine code.", + "debugging": "The process of finding and fixing errors in a program.", + "inheritance": "A mechanism in OOP where a class can inherit properties and behaviors from another class.", + "encapsulation": "The bundling of data and methods that operate on the data into a single unit.", + "abstraction": "The process of hiding the implementation details and showing only the essential features of an object.", + "polymorphism": "The ability of a single interface to represent multiple underlying data types.", + "interface": "A contract that specifies the methods a class must implement.", + "constructor": "A special type of method used to initialize objects.", + "destructor": "A special type of method used to destroy objects.", + "method": "A function associated with a class or object.", + "module": "A self-contained unit of code that can be reused and imported into other modules.", + "library": "A collection of reusable code and resources.", + "framework": "A reusable, prewritten code or set of libraries that provide generic functionality.", + "database": "A structured set of data stored and organized for easy access and retrieval.", + "devops": "A set of practices that combines software development and IT operations to shorten the systems development life cycle and provide continuous delivery with high software quality.", + "agile": "A set of principles for software development under which requirements and solutions evolve through the collaborative effort of self-organizing cross-functional teams.", + "scrum": "An Agile framework for completing complex projects, typically used in software development.", + "kanban": "A method for managing knowledge work with an emphasis on just-in-time delivery while not overloading the team members.", + "github": "A web-based platform for hosting and collaborating on Git repositories.", + "markdown": "A lightweight markup language with plain-text formatting syntax.", + "asynchronous": "A programming pattern that allows operations to run separately from the main program flow.", + "callback": "A function passed as an argument to another function, to be executed later.", + "closure": "A function bundled together with its lexical environment.", + "prototype": "An object used as a template from which to create other objects.", + "promise": "An object representing the eventual completion or failure of an asynchronous operation.", + "event": "A signal that indicates that something has happened.", + "concurrency": "The ability of different parts or units of a program to be executed out-of-order or in partial order.", + "parallelism": "The simultaneous execution of multiple tasks.", + "deadlock": "A situation where two or more processes are unable to proceed because each is waiting for the other to do something.", + "mutex": "A synchronization primitive used to control access to a shared resource by multiple threads.", + "semaphore": "A synchronization primitive that restricts the number of simultaneous users of a shared resource.", + "thread": "The smallest unit of execution that can be scheduled by an operating system.", + "process": "An instance of a computer program that is being executed.", + "refactoring": "The process of restructuring existing computer code without changing its external behavior.", + "sprint": "A short, time-boxed period during which a specific task must be completed and made ready for review." +}; + +// game state var. +let selectedWord, selectedDefinition; +let guessedLetters, wrongGuesses, attempts; + +// max allowed incorrect guesses. +const maxAttempts = 6; + +// paths to images corresponding to different stages of hangman. +const hangmanImages = [ + 'images/hangman/HangmanPole.png', + 'images/hangman/HangmanPoleWithHead.png', + 'images/hangman/HangmanPoleWithHeadAndBody.png', + 'images/hangman/HangmanPoleWithHeadAndBodyAndLeftHand.png', + 'images/hangman/HangmanPoleWithHeadAndBodyAndBothHands.png', + 'images/hangman/HangmanPoleWithHeadAndBodyAndBothHandsAndLeftLeg.png', + 'images/hangman/HangmanPoleWithHangMan.png' +]; + + +// added to handle wrong guesses and initialize and now claling correct html for funcitonality +function updateWrongGuesses() { + const wrongGuessesElement = document.getElementById('wrongGuesses'); + console.log(wrongGuessesElement); + if (wrongGuessesElement !== null) { + wrongGuessesElement.textContent = 'Wrong guesses: ' + attempts; + } else { + console.error('Wrong guesses display element not found!'); + } +} + + +// init game once the HTML document has fully loaded. +document.addEventListener('DOMContentLoaded', initializeGame); + +// init game by setting game state and updating UI components. +function initializeGame() { + try{ + // select random word from list. + const randomIndex = Math.floor(Math.random() * words.length); + selectedWord = words[randomIndex]; + selectedDefinition = wordDefinitions[selectedWord]; + + // reset game state. + guessedLetters = []; + wrongGuesses = []; + attempts = 0; + + // init UI components. + createLetterButtons(); + updateWordDisplay(); + updateHangmanImage(); + updateWrongGuesses(); + } catch (error) { + console.error('Error Initializing game:', error); + } +} + +// creates/displays letter buttons for user interaction. +function createLetterButtons() { + // define alphabet for buttons + const letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; + const letterContainer = document.getElementById('letterButtons'); + letterContainer.innerHTML = ''; + + // create button for each letter in alph + letters.split('').forEach(letter => { + const button = document.createElement('button'); + button.textContent = letter; + button.id = 'letter-' + letter; + button.onclick = function() { handleGuess(letter); }; + letterContainer.appendChild(button); + }); +} + +// hanles guessess, added console logging and try/catch for troubleshooting.... + +function handleGuess(letter) { + try { + console.log('Guessed letter:', letter); + console.log('Current state:', { guessedLetters, wrongGuesses, attempts }); + + const button = document.getElementById('letter-' + letter); + button.disabled = true; + + if (selectedWord.toUpperCase().includes(letter)) { + if (!guessedLetters.includes(letter)) { + guessedLetters.push(letter); + } + button.style.backgroundColor = '#D3D3D3'; + updateWordDisplay(); + } else { + if (!wrongGuesses.includes(letter)) { + wrongGuesses.push(letter); + attempts++; + button.style.backgroundColor = 'red'; + updateHangmanImage(); + updateWrongGuesses(); + } + } + checkGameOver(); + } catch (error) { + console.error('Error handling guess:', error, { guessedLetters, wrongGuesses, attempts }); + } +} + + +// updates display of word with correctly guessed letters. +function updateWordDisplay() { + const wordDisplay = document.getElementById('wordDisplay'); + wordDisplay.innerText = selectedWord.split('').map(letter => + guessedLetters.includes(letter.toUpperCase()) ? letter : '_' + ).join(' '); +} + +// checks if game has ended by winning or losing. +function checkGameOver() { + const wordDisplay = document.getElementById('wordDisplay').innerText.replace(/\s+/g, ''); + if (!wordDisplay.includes('_')) { + // If no blanks, player wins. + alert(`Congratulations! You won! The word was "${selectedWord}". Definition: ${selectedDefinition}`); + initializeGame(); + } else if (attempts >= maxAttempts) { + // If max number of attempts is reached, update image before showing the game over alert. + + updateHangmanImage() + + + // Delay the game over alert to allow the image to update on the screen. + setTimeout(() => { + alert(`Game Over! The correct word was "${selectedWord}". Definition: ${selectedDefinition}`); + initializeGame(); + }, 500); // Delay of 500 milliseconds (0.5 seconds) + } +} + + +// updates hangman image to reflect current number of incorrect guesses. +function updateHangmanImage() { + const hangmanImage = document.querySelector('.hangman-images'); + if (attempts <= maxAttempts) { + hangmanImage.src = hangmanImages[attempts]; + } +} + +// handles logic when player submits fullword guess. +function submitFullWordGuess() { + const fullWordGuess = document.getElementById('fullWordGuess'); + const guess = fullWordGuess.value.toLowerCase(); + fullWordGuess.value = ''; + + if (guess === selectedWord) { + // If the guess is correct, the player wins. + guessedLetters = selectedWord.split(''); + updateWordDisplay(); + alert(`Congratulations! You guessed the word: ${selectedWord}. Definition: ${selectedDefinition}`); + initializeGame(); + } else { + // uncorrect fullword guesses count as a failed attempt(s). + if (!wrongGuesses.includes(document.getElementById('wordDisplay').innerText)) { + wrongGuesses.push(document.getElementById('wordDisplay').innerText); + attempts++; + updateHangmanImage(); + updateWrongGuesses(); + } + checkGameOver(); + } +} + +//handles reset game button onclick +function restartGame() { + initializeGame() +} + diff --git a/assignments/final/project source code/docs/js/minesweeper.js b/assignments/final/project source code/docs/js/minesweeper.js new file mode 100644 index 0000000..440da83 --- /dev/null +++ b/assignments/final/project source code/docs/js/minesweeper.js @@ -0,0 +1,12 @@ +parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,u=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return u=t.done,t},e:function(t){s=!0,o=t},f:function(){try{u||null==n.return||n.return()}finally{if(s)throw o}}}}function r(t,e){if(t){if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);rj(this,d,"f")-1))for(var a=e-1;a<=e+1;a++)if(!(a<0||a>j(this,l,"f")-1||n==t&&a==e)){var i=document.querySelector("[data-x = '".concat(n,"'][data-y = '").concat(a,"']"));"unchecked"===(null==i?void 0:i.getAttribute("data-status"))&&r.push(i)}return r},k=function(){return Array.from(document.querySelectorAll("[data-type = 'notmine']")).every(function(t){return"checked"===t.getAttribute("data-status")})},A=function r(n,a){var i=document.querySelector("[data-x = '".concat(n,"'][data-y = '").concat(a,"']"));i.setAttribute("data-status","checked");var o,u=j(this,f,"m",g).call(this,n,a),s=0,c=e(u);try{for(c.s();!(o=c.n()).done;){"mine"===o.value.getAttribute("data-type")&&s++}}catch(h){c.e(h)}finally{c.f()}if(s>0)i.innerHTML=String(s),i.setAttribute("data-num-adj-mines",String(s));else for(var l=0;l0?"".concat(Number(m(this,c,"f"))," minute").concat(m(this,c,"f")>1?"s":"",", "):"").concat(Number(m(this,f,"f"))," second").concat(1!=m(this,f,"f")?"s":"")}}])}();c=new WeakMap,f=new WeakMap,u=new WeakMap,s=new WeakSet,l=function(){var t;60==p(this,f,m(this,f,"f")+1,"f")&&(p(this,f,0,"f"),p(this,c,(t=m(this,c,"f"),++t),"f")),m(this,s,"m",y).call(this)},h=function(t){return t>=10?String(t):"0".concat(t)},y=function(){t.minuteDisplay.textContent=m(this,s,"m",h).call(this,m(this,c,"f")),t.secondDisplay.textContent=m(this,s,"m",h).call(this,m(this,f,"f"))};var w=exports.default=v; + },{"./elements":"uIMb"}],"epB2":[function(require,module,exports) { + "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.setOutcome=L,exports.startTimer=y,exports.updateInfo=E;var e=require("./elements"),t=r(require("./Board")),n=r(require("./BoardUI")),i=r(require("./Timer"));function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=s(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,l=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){o=!0,a=e},f:function(){try{l||null==n.return||n.return()}finally{if(o)throw a}}}}function s(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n30)&&i.push("Width must be between 1 and 30 cells."),(t<=0||t>30)&&i.push("Length must be between 1 and 30 cells."),(n<=0||n>=e*t)&&i.push("Number of mines must be greater than 0 and less than the total number of cells."),0===i.length&&(h=e,g=t,v=n),i}function w(){e.validationErrMsgs.innerHTML=""}function b(t){var n,i=a(t);try{for(i.s();!(n=i.n()).done;){var r=n.value,s=document.createElement("p");s.textContent=r,e.validationErrMsgs.appendChild(s)}}catch(l){i.e(l)}finally{i.f()}}function y(){f.start()}function E(){d&&n.default.renderInfo(d.getNumMines(),d.getFlaggedMines())}function L(e){f.pause(),n.default.showAllMines(),"classic"===c&&"win"===e&&m++,"classic"===c&&m>o.length?n.default.renderEndGameDialog(c,e,f.getTimeString(),!0):n.default.renderEndGameDialog(c,e,f.getTimeString(),!1)}function I(){switch(f.reset(),n.default.clearBoardAndInfo(),u){case"main":e.mainMenu.classList.remove("hidden"),e.instructions.classList.add("hidden"),e.game.classList.add("hidden");break;case"instructions":e.mainMenu.classList.add("hidden"),e.instructions.classList.remove("hidden"),e.game.classList.add("hidden");break;case"game":e.mainMenu.classList.add("hidden"),e.instructions.classList.add("hidden"),e.game.classList.remove("hidden"),d&&(n.default.renderInitialBoard(d.getLength(),d.getWidth(),d.getHandleMouseDownFunction()),e.levelInfo.textContent="classic"===c?o[m].level:"",E())}}e.startClassicButton.addEventListener("click",function(){c="classic";var e=o[m];d=new t.default(e.width,e.length,e.mines),u="instructions",I()}),e.startCustomizedButton.addEventListener("click",function(){w();var n=p(Number(e.widthInput.value),Number(e.lengthInput.value),Number(e.minesInput.value));n.length>0?b(n):(c="customized",null===e.customizationForm||void 0===e.customizationForm||e.customizationForm.reset(),d=new t.default(h,g,v),u="instructions",I())}),e.exitInstructionsButton.addEventListener("click",function(){u="game",I()}),e.restartButtons.forEach(function(i){return i.addEventListener("click",function(){if("classic"===c){var i=o[m];d=new t.default(i.width,i.length,i.mines)}"customized"===c&&(d=new t.default(h,g,v)),n.default.resetEndGameDialog(),e.endGameDialog.close(),I()})}),e.returnButtons.forEach(function(e){return e.addEventListener("click",function(){"classic"===c&&(m=0),n.default.resetEndGameDialog(),u="main",I()})}),I(); + },{"./elements":"uIMb","./Board":"qpgg","./BoardUI":"Mwuz","./Timer":"UnlX"}]},{},["epB2"], null) + //# sourceMappingURL=/main.ee316cbf.js.map \ No newline at end of file diff --git a/assignments/final/project source code/docs/js/nav.js b/assignments/final/project source code/docs/js/nav.js new file mode 100644 index 0000000..4f1d554 --- /dev/null +++ b/assignments/final/project source code/docs/js/nav.js @@ -0,0 +1,27 @@ +const navDesktopTablet = document.getElementById('nav-desktop-tablet'); +const navMobile = document.getElementById('nav-mobile'); +const navMobileButtonImg = document.querySelector('#nav-mobile button img'); +const navMobileLinks = document.querySelector('#nav-mobile div'); + +window.addEventListener("load", adjustNavToScreenSize); +window.addEventListener('resize', adjustNavToScreenSize); + +function adjustNavToScreenSize() { + if (window.innerWidth <= 480) { + navDesktopTablet.classList.add('hidden'); + navMobile.classList.remove('hidden'); + } else { + navDesktopTablet.classList.remove('hidden'); + navMobile.classList.add('hidden'); + } +} + +navMobile.addEventListener('click', () => { + const link = navMobileButtonImg.getAttribute('src'); + if (link.includes('menu')) { + navMobileButtonImg.setAttribute('src', 'images/x.svg'); + } else { + navMobileButtonImg.setAttribute('src', 'images/menu.svg'); + } + navMobileLinks.classList.toggle('hidden'); +}) \ No newline at end of file diff --git a/assignments/final/project source code/docs/js/team.js b/assignments/final/project source code/docs/js/team.js new file mode 100644 index 0000000..7903314 --- /dev/null +++ b/assignments/final/project source code/docs/js/team.js @@ -0,0 +1,52 @@ +const profiles = document.querySelectorAll(".profile"); +// profiles.forEach(profile => profile.classList.add("hidden")); + +const profileButtons = document.querySelectorAll(".toggle-profile"); +profileButtons.forEach(button => button.addEventListener("click", toggleProfile)); + +const profileArrows = document.querySelectorAll(".toggle-profile img"); + +window.addEventListener("load", adjustVisToScreenSize); +window.addEventListener("resize", adjustVisToScreenSize) + +function adjustVisToScreenSize() { + if (window.innerWidth <= 480) { + profileButtons.forEach(profileButton => profileButton.classList.remove("hidden")); + profiles.forEach(profile => profile.classList.add("hidden")); + } else { + profileButtons.forEach(profileButton => profileButton.classList.add("hidden")); + profiles.forEach(profile => profile.classList.remove("hidden")); + } +} + +function toggleProfile(e) { + // obtaining profile button and profile div + const currentProfileButton = e.target.closest("button"); + const dataId = currentProfileButton.getAttribute("data-id"); + const currentProfileArrow = document.querySelector(`img[data-id='${dataId}']`); + const currentProfile = document.querySelector(`div[data-id='${dataId}']`); + + // closing/resetting any open profile buttons/divs + profiles.forEach(profile => { + if (profile != currentProfile) { + profile.classList.add("hidden"); + profile.classList.remove("collapse-top-margin"); + } + }); + profileButtons.forEach(profileButton => { + if (profileButton != currentProfileButton) profileButton.classList.remove("collapse-bottom-margin"); + }); + profileArrows.forEach(profileArrow => { + if (profileArrow != currentProfileArrow) profileArrow.setAttribute("src", "./images/down-arrow.svg"); + }); + + // opening current profile div + currentProfileButton.classList.toggle("collapse-bottom-margin"); + currentProfile.classList.toggle("hidden"); + currentProfile.classList.toggle("collapse-top-margin"); + if (currentProfileArrow.getAttribute("src").includes("down")) { + currentProfileArrow.setAttribute("src", "./images/up-arrow.svg"); + } else { + currentProfileArrow.setAttribute("src", "./images/down-arrow.svg"); + } +} \ No newline at end of file diff --git a/assignments/final/project source code/docs/minesweeper.html b/assignments/final/project source code/docs/minesweeper.html new file mode 100644 index 0000000..ae06b78 --- /dev/null +++ b/assignments/final/project source code/docs/minesweeper.html @@ -0,0 +1,44 @@ +Minesweeper + + + + + +

Minesweeper

+ +
+ +
+ + + \ No newline at end of file diff --git a/assignments/final/project source code/docs/team.html b/assignments/final/project source code/docs/team.html new file mode 100644 index 0000000..01d4b3a --- /dev/null +++ b/assignments/final/project source code/docs/team.html @@ -0,0 +1,116 @@ + + + + + + Meet the Team + + + + + + + + + + + + +

Meet the Team

+ + +
+ +
+ Profile picture of Charles Bostwick +
+

Charles Bostwick | Title

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

+
+
+ +
+ Profile picture of Jade Pearl +
+

Jade Pearl | Title

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

+
+
+ +
+ Profile picture of Ada Truong +
+

Ada Truong | Title

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

+
+
+ +
+ Profile picture of Holland Brawner +
+

Holland Brawner | Title

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

+
+
+ +
+ Profile picture of Robyn Cohen +
+

Robyn Cohen | Title

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

+
+
+
+ +
+ +
+ + + + \ No newline at end of file diff --git a/docs/documents.html b/docs/documents.html index a0d85b0..3a7d33e 100644 --- a/docs/documents.html +++ b/docs/documents.html @@ -33,42 +33,42 @@

Project Documentation

-

Plans and Specifications

- +

Design Plan

+
-

Design Plan

- +

Development Plan

+

Test Plan

- +

Phase I

- +

Phase II

- +

Phase III

- +

Final

- +
diff --git a/docs/documents/CMSC495DesignPlan.pdf b/docs/documents/CMSC495DesignPlan.pdf new file mode 100644 index 0000000..e6a3d04 Binary files /dev/null and b/docs/documents/CMSC495DesignPlan.pdf differ diff --git a/docs/documents/CMSC495DevelopmentPlan.pdf b/docs/documents/CMSC495DevelopmentPlan.pdf new file mode 100644 index 0000000..093cd63 Binary files /dev/null and b/docs/documents/CMSC495DevelopmentPlan.pdf differ diff --git a/docs/documents/CMSC495PhaseI.pdf b/docs/documents/CMSC495PhaseI.pdf new file mode 100644 index 0000000..95c1e5f Binary files /dev/null and b/docs/documents/CMSC495PhaseI.pdf differ diff --git a/docs/documents/CMSC495PhaseII.pdf b/docs/documents/CMSC495PhaseII.pdf new file mode 100644 index 0000000..8cb33ba Binary files /dev/null and b/docs/documents/CMSC495PhaseII.pdf differ diff --git a/docs/documents/CMSC495PhaseIII.pdf b/docs/documents/CMSC495PhaseIII.pdf new file mode 100644 index 0000000..8e7c726 Binary files /dev/null and b/docs/documents/CMSC495PhaseIII.pdf differ diff --git a/docs/documents/CMSC495TestPlanUserGuide.pdf b/docs/documents/CMSC495TestPlanUserGuide.pdf new file mode 100644 index 0000000..d4b8251 Binary files /dev/null and b/docs/documents/CMSC495TestPlanUserGuide.pdf differ diff --git a/docs/js/hangman.js b/docs/js/hangman.js index 9f72896..afb4310 100644 --- a/docs/js/hangman.js +++ b/docs/js/hangman.js @@ -5,9 +5,8 @@ const words = [ "encapsulation", "abstraction", "polymorphism", "interface", "constructor", "destructor", "method", "module", "library", "framework", "database", "devops", "agile", "scrum", "kanban", "github", "markdown", "asynchronous", "callback", "closure", "prototype", "promise", "event", - "event loop", "concurrency", "parallelism", "deadlock", "race condition", "mutex", "semaphore", - "thread", "process", "thread pool", "dead code", "refactoring", "code smell", "unit test", - "integration test", "regression test", "sprint" + "concurrency", "parallelism", "deadlock", "mutex", "semaphore", + "thread", "process", "dead code", "refactoring", "sprint" ]; // definitions @@ -52,22 +51,14 @@ const wordDefinitions = { "prototype": "An object used as a template from which to create other objects.", "promise": "An object representing the eventual completion or failure of an asynchronous operation.", "event": "A signal that indicates that something has happened.", - "event loop": "A mechanism that waits for and dispatches events or messages in a program.", "concurrency": "The ability of different parts or units of a program to be executed out-of-order or in partial order.", "parallelism": "The simultaneous execution of multiple tasks.", "deadlock": "A situation where two or more processes are unable to proceed because each is waiting for the other to do something.", - "race condition": "A situation in which the behavior of a program depends on the timing of uncontrollable events.", "mutex": "A synchronization primitive used to control access to a shared resource by multiple threads.", "semaphore": "A synchronization primitive that restricts the number of simultaneous users of a shared resource.", "thread": "The smallest unit of execution that can be scheduled by an operating system.", "process": "An instance of a computer program that is being executed.", - "thread pool": "A collection of threads that are created once and reused for multiple tasks.", - "dead code": "Code that is never executed.", "refactoring": "The process of restructuring existing computer code without changing its external behavior.", - "code smell": "A surface indication that usually corresponds to a deeper problem in the system.", - "unit test": "A piece of code that tests a specific unit of functionality.", - "integration test": "Testing performed to examine the behavior of components when integrated together.", - "regression test": "Testing performed to verify that a recent program or code change has not adversely affected existing features.", "sprint": "A short, time-boxed period during which a specific task must be completed and made ready for review." }; @@ -95,7 +86,7 @@ function updateWrongGuesses() { const wrongGuessesElement = document.getElementById('wrongGuesses'); console.log(wrongGuessesElement); if (wrongGuessesElement !== null) { - wrongGuessesElement.textContent = 'Wrong guesses: ' + wrongGuesses.join(', '); + wrongGuessesElement.textContent = 'Wrong guesses: ' + attempts; } else { console.error('Wrong guesses display element not found!'); } @@ -194,7 +185,9 @@ function checkGameOver() { initializeGame(); } else if (attempts >= maxAttempts) { // If max number of attempts is reached, update image before showing the game over alert. - updateHangmanImage(); + + updateHangmanImage() + // Delay the game over alert to allow the image to update on the screen. setTimeout(() => { @@ -227,8 +220,18 @@ function submitFullWordGuess() { initializeGame(); } else { // uncorrect fullword guesses count as a failed attempt(s). - attempts++; - updateHangmanImage(); + if (!wrongGuesses.includes(document.getElementById('wordDisplay').innerText)) { + wrongGuesses.push(document.getElementById('wordDisplay').innerText); + attempts++; + updateHangmanImage(); + updateWrongGuesses(); + } checkGameOver(); } } + +//handles reset game button onclick +function restartGame() { + initializeGame() +} +