Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mc - guesswho #350

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 16 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
# Project Name
# MC - Guess Who?

Replace this readme with your own information about your project.
This project was about making a game of Guess Who?. The board with characters should be generated when the website is loaded, and it should be possible to restart the game or play again after the game has ended.
When the game starts, aandomly selected person should be set as the secret person.

Start by briefly describing the assignment in a sentence or two. Keep it short and to the point.
The player should be able to select questions (set options) to ask about the people on the cards, and filter the board based on those questions. The player should receive feedback on whether the option selected was wrong or right, and the player should be able to guess on a person they think is correct.

## The problem

Describe how you approached to problem, and what tools and techniques you used to solve it. How did you plan? What technologies did you use? If you had more time, what would be next?
What I found difficult this week was understanding the code that was already there (even though there was a video). I understood what the code was, but not always where I should add to it and how.

The biggest error I encoutered was that when I selected the correct eye color or hair color, I first got the message that it was the right option, then a new alert showed up saying it was a wrong option, and then all the cards disappeared. It was an easy fix - just curly brackets. However, I was trying to find the error in the wrong places.

It was not as easy to console.log this time - I was not able to find the best places to place the console.log because all the code depended on each other.

With more time, I would do the stretch goals and change the design.

I still feel like I do not always understand why different codes are used - but some of the logic I do understand.

Trouble with the VScode shell - had to get help from Diego, therefore have not been able to push the project while working on it.

## View it live

Have you deployed your project somewhere? Be sure to include the link to the deployed project so that the viewer can click around and see what it's all about.
https://mc-guesswho.netlify.app/
122 changes: 66 additions & 56 deletions code/index.html
Original file line number Diff line number Diff line change
@@ -1,64 +1,74 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Project Name</title>
<link rel="stylesheet" href="style.css" />
<link
href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap"
rel="stylesheet"
/>
</head>
<body>
<aside class="question-section">
<button type="button" id="restart" class="outlined-button">RESTART</button>

<img
class="guess-who-icon"
src="images/guess-who-bubble.png"
alt="Guess Who"
/>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>MC - Guess Who?</title>
<link rel="stylesheet" href="style.css" />
<link
href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap"
rel="stylesheet" />
</head>

<h1>Does the person have</h1>
<body>
<!--SIDE BANNER-->
<aside class="question-section">
<button type="button" id="restart" class="outlined-button">RESTART</button>
<img class="guess-who-icon" src="images/guess-who-bubble.png" alt="Guess Who" />

<select title="questions" id="questions">
<optgroup label="hair">
<option value="brown">brown hair</option>
<option value="yellow">yellow hair</option>
<!-- Add the rest of hair colors as options -->
</optgroup>
<optgroup label="eyes">
<option value="hidden">hidden eyes</option>
<!-- Add the rest of eye colors as options -->
</optgroup>
<optgroup label="accessories">
<option value="glasses">glasses</option>
<!-- Add the other accessory option here. (hat) -->
</optgroup>
<optgroup label="other">
<option value="smoker">a smoking habit</option>
</optgroup>
</select>
<!------------PERSON ATTRIBUTES------------->
<h1>Does the person have</h1>

<button id="filter" class="filled-button">FIND OUT</button>
</aside>
<select title="questions" id="questions">
<option value="SelectOption">Select an option</option>
<!--Hair-->
<optgroup label="hair">
<option value="brown">brown hair</option>
<option value="yellow">yellow hair</option>
<option value="grey">grey hair</option>
<option value="black">black hair</option>
<option value="orange">orange hair</option>
<option value="purple">purple hair</option>
<option value="white">white hair</option>
<option value="hidden">hidden hair</option>
<!--Eyes-->
</optgroup>
<optgroup label="eyes">
<option value="hidden">hidden eyes</option>
<option value="blue">blue eyes</option>
<option value="green">green eyes</option>
<option value="brown">brown eyes</option>
<!--ACCESSORIES-->
</optgroup>
<optgroup label="accessories">
<option value="glasses">glasses</option>
<option value="hat">hat</option>
<!--Other-->
</optgroup>
<optgroup label="other">
<option value="smoker">a smoking habit</option>
</optgroup>
</select>
<!-----------PERSON ATTRIBUTES END----------->

<section class="board-wrapper">
<main class="game-board" id="board"></main>
</section>
<button id="findOut" class="filled-button">FIND OUT</button>
</aside>

<section id="winOrLose" class="win-or-lose-wrapper">
<div class="win-or-lose">
<img
class="guess-who-icon"
src="images/guess-who-bubble.png"
alt="Guess Who"
/>
<h1 id="winOrLoseText"></h1>
<button type="button" id="playAgain" class="filled-button">PLAY AGAIN</button>
</div>
</section>
<script src="script.js"></script>
</body>
</html>
<!-----------SHOW BOARD------------->
<section class="board-wrapper">
<main class="game-board" id="board"></main>
</section>

<!---------GUESS RIGHT OR WRONG--------->
<section id="winOrLose" class="win-or-lose-wrapper">
<div class="win-or-lose">
<img class="guess-who-icon" src="images/guess-who-bubble.png" alt="Guess Who" />
<h1 id="winOrLoseText"></h1>
<button type="button" id="playAgain" class="filled-button">PLAY AGAIN</button>
</div>
</section>
<script src="script.js"></script>
</body>

</html>
Loading