주짓수 점수판 웹 애플리케이션 개발하기

오늘은 주짓수 경기에서 사용할 수 있는 점수판 웹 애플리케이션을 개발한 과정을 공유하고자 합니다.

주요 기능

  1. 타이머 기능
  • 경기 시간 설정 (기본 5분)
  • 시작/일시정지/리셋 기능
  • 30초 전 알림음
  • 종료 알림음
  1. 점수 기록 기능
  • 2점, 3점, 4점 추가/감소
  • 패널티 기록
  • 어드밴티지 기록
  • 총점 자동 계산
  1. 선수 관리
  • 선수 이름 입력 및 수정
  • 각 선수별 독립적인 점수 관리

기술 스택

  • HTML5
  • CSS3
  • JavaScript (Vanilla)

주요 구현 내용

  1. 타이머 구현
JavaScriptCopyfunction startTimer() {    clearInterval(timerInterval);    timerInterval = setInterval(() => {        if (timeLeft > 0) {            timeLeft--;            updateTimerDisplay();            if (timeLeft === 30) {                document.getElementById('thirtySecondsLeft').play();            }        } else {            clearInterval(timerInterval);            document.getElementById('endAlarm').play();            alert("시간 종료!");        }    }, 1000);}
  1. 점수 관리
JavaScriptCopyfunction addScore(player, points) {    const element = document.getElementById(`player${player}-${Math.abs(points)}`);    if (element) {        let currentScore = parseInt(element.textContent) || 0;        currentScore += points;        if (currentScore < 0) currentScore = 0;        element.textContent = currentScore;        updateTotalScore(player);    }}

UI/UX 특징

  • 크로마키 촬영을 위한 초록색 배경
  • 직관적인 버튼 배치
  • 시각적으로 구분되는 점수 표시
  • 반응형 디자인

[advanced_iframe securitykey=”5ff454030f8102e89e5695bdf8708ab13075dbd0#@$” use_shortcode_attributes_only=”true” src=”https://ex.erci.se/wp-content/uploads/2024/12/BJJ-point-board.html&#8221; width=”100%” height=”600″ enable_external_height_workaround=”false” multi_domain_enabled=”false” use_post_message=”false”]

댓글

댓글 남기기

상호:엑서사이즈 통신판매번호:2018-경기의왕-0032호 사업자등록번호:138-13-13265 대표자:김무송 소재지: 경기도 의왕시 내손동 계원대학로 34 신우프라자 4층 전화번호:031)421-8585 ‘POWERED BY MOOSONG,KIM’ Since 2014

CONTACT US

긍정적인 내용 연락주세요. 최대한 빨리 답변드리겠습니다. We're not around right now. But you can send us an email and we'll get back to you, asap.

보내는 중입니다..

PLAY X 플레이엑스(엑서사이즈)에서 더 알아보기

지금 구독하여 계속 읽고 전체 아카이브에 액세스하세요.

계속 읽기

로그인하세요.

계정 내용을 잊으셨나요 ?