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

[2주차-1] who...r....u? #2

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

[2주차-1] who...r....u? #2

wants to merge 2 commits into from

Conversation

ingong
Copy link
Collaborator

@ingong ingong commented Apr 22, 2022

✨ 구현 기능 명세

구현사항

  1. ul.answer__list > li 에 있는 다섯 가지 이름을 클릭했을 때의 동작을 정의해야해요.
    1. 클릭한 이름과 현재 imageBoard 에 있는 사진의 주인공이 같은 지 비교해요.
    2. 같다면, 다음 단계로 넘어가요.
    3. 다르다면, 틀렸습니다! 모달을 띄워줘요.
  2. 다음 단계로 넘어갈 때(맞췄을 때) 해야하는 동작들은 다음과 같아요.
    1. 상단에 있는 scoreBoard__score 의 점수를 1점 증가시켜요.
    2. 다음 사람의 이미지로 imageBoard > image 의 이미지 소스를 변경해줘요.
    3. 준비된 모든 퀴즈가 끝났는 지 검사해요.
  3. 다시하기 버튼을 누르면 게임을 초기화 시켜주세요.
    1. 점수는 0점으로.
    2. 현재 단계는 맨 처음으로.

🎁 PR Point

재사용될 수도 있다고 생각해서 최대한 함수를 작게 나눠봤습니다. 그래서 코드가 좀 길어진 것 같아요

😭 어려웠던 점

Commit을 작게 나누려고 했는데 깜빡했어요..
JS로 구현할 때는 동작을 하나씩 다 정의해야해서 힘든 것 같아요,,

😎 구현 결과물

화면 기록 2022-04-22 18 30 25

@ingong ingong self-assigned this Apr 22, 2022
@ingong ingong requested review from NYeonK and henization April 22, 2022 10:01
Copy link

@Happhee Happhee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

귱금해서 왓다가는데 역싀 잘하신댜여 ㅎㅅㅎ 체고

@@ -30,3 +31,92 @@ const quizList = [
answer: "백지연",
},
];
window.addEventListener('DOMContentLoaded', () => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

우아 이거 그냥 load랑 머가 달라여?!

Comment on lines +115 to +117
function resetStep() {
currentStep = 0;
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

함수안에 하나의 코드만 들어가도 모듈화를 시키는 이유는 가독성 때문인가요?!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants