SlideShare a Scribd company logo
1 of 18
챌린지 미니 게임
2020204077 박규민
2022204048 임재영
알고리즘
도식화
메뉴 화면 출력 및 전환
#게임내에 출력되는 메뉴 화면은 오른쪽 이미지처럼
Puts 함수로 표현했습니다.
#다음 화면으로 넘어가는 경우에는
system("cls") 로 화면을 지우고
해당하는 화면을 출력하는 방식을 사용했습니다.
게임 화면 출력
#게임 화면의 경우
-테두리 : puts 함수로 표현
-게임 : printf 함수를 이용하여 이차원 배열을 불러오고
이차원 배열안에 저장되어 있는 값이 바뀌면서
화면에 출력이 된다.
게임 작동 방법 (키보드)
#게임 작동 방식
-버튼 입력
kbhit, getch 명령어를 통해서 키보드를 통해 입력된
값을 받고 해당 값에 맞는 함수를 제작하였다 (switch 사용)
ex_ 윗 방향키를 누를시 > 커서의 y값을 1증가 시킨다
ex_ p 버튼 누를시 > 깃발이 세워진다
ex_ wasd 방향키를 누를 시 커서의 위치 변수값이 1씩 변화한다.
미니게임 1 (지뢰찾기)
#게임 작동 방식 (맵과 지뢰 생성)
1. 2차원 배열 20x20크기의 게임판을 생성
2. Rand 명령어를 사용해 배열안에 랜덤하게 지뢰 설치
(지뢰의 경우 @로 표시됨)
미니게임 1 (지뢰찾기)
#게임 작동 방식 (맵 구체화)
1. 지뢰위치를 제외한 배열의 원소에 0 값을 넣어준다
2. 지뢰위치와 인접해 있는 배열들에 숫자를 1씩 더해준다
3. 해당 숫자에 해당하는 숫자 이모티콘을 배열에 집어
넣는다 (① ② ③ ④ 등)
미니게임 1 (지뢰찾기)
#게임 작동 방식 (깃발)
1. 지뢰의 위치에 깃발을 세울 경우
변수A 의 값을 1씩증가시킨다
2. 지뢰의 위치에 깃발을 세우지 않은 경우
변수B 의 값을 1씩 증가시킨다
변수 A와 변수 B의 합이 폭탄의 개수와 같을 때 게임은 종료된다
1. 변수B가 1이상인 경우 게임 클리어 실패
2. 변수B가 0일 경우 게임 클리어
미니게임 1 (지뢰찾기)
#게임 작동 방식 (난이도 별 특징)
NORMAL_MODE (보통) > 평범한 지뢰 찾기
EASY_MODE (쉬움) > 폭탄위치는 클릭이 안됨
HARD_MODE(어려움) > 5분 시간제한이 생김
+ 깃발 잘못 설치 시 게임 오버
이지 모드
하드 모드
하드 모드
미니게임 1 (지뢰찾기)
배열을 ■ 로 덮은뒤, 게임 시작 지뢰찾기 과정
미니게임 2 (스도쿠)
#게임 작동 방식 ( 맵 생성)
-이차원 배열을 만들고 배열의 원소에 스도쿠 값을 저장
-4가지 종류의 스도쿠 게임을 배열에 저장해 두고,
랜덤하게 하나의 스도쿠를 선택해 게임 시작
미니게임 2 (스도쿠)
#게임 작동 방식 ( 문제 생성)
-스도쿠가 저장되어 있는 이차원 배열의 값에서
스도쿠 문제에서 알려주는 값에 해당하는 부분을
제외한 부분에 0값을 넣은 또다른 배열 저장(문제지 저장)
# 여기서 만약 rand 명령어를 통해 랜덤하게 배열의
일부 원소들을 0으로 바꿀 경우 스도쿠를 풀지못하는
경우가 발생됨
> 초반에 만들어둔 4가지 스도쿠 배열중에 하나를 랜덤하게 사용
미니게임 2 (스도쿠)
#게임 작동 방식
-커서를 wasd방향키를 사용해 이동한 후 키보드k
버튼을 눌러 해당위치에 숫자 입력
#특수 기능
-게임도중 c버튼을 누르게 되면 스도쿠의 문제지에
답이 자동으로 채워진다.
미니게임 2 (스도쿠)
#게임 작동 방식
-채점 버튼
문제를 풀은 후
채점 버튼(p)을 클릭 시
채점 시작
정답이 들어가 있는 배열과
풀이 한 값이 들어가 있는 배열을
이중 for문으로 비교
<풀이가 틀릴 시 “오답입니다” 출력> <풀이가 맞을 시 “게임 클리어” 출력>
미니게임 2 (스도쿠)
#게임 작동 방식 (난이도 별 특징)
NORMAL_MODE (보통) > 평범한 스도쿠
EASY_MODE (쉬움) > 잘못된 값을 입력 시 정답을 출력
HARD_MODE(어려움) > 5분 시간제한이 생김
<이지 모드>
<하드 모드>
기록 저장 및 기록 확인
멀티 모드에서 게임 클리어 시 파일 입출력을 통해 게임 기록을
텍스트 파일에 저장 (저장 시 이름과 클리어 시간 ,난이도가 저장)
기록 저장 및 기록 확인
1. 파일 입출력을 통해 게임 기록이 저장된 텍스트 저장
2. 점수 확인 버튼 클릭
3. 점수를 확인하고 싶은 유저의 이름을 검색
4. 파일 입출력을 통해 기록이 저장된 텍스트 파일에서
해당 유저(이름)의 기록만을 검색하여 출력

More Related Content

Featured

Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 

Featured (20)

Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 

고급 C 최종 계획서.pptx

  • 1. 챌린지 미니 게임 2020204077 박규민 2022204048 임재영
  • 4. 메뉴 화면 출력 및 전환 #게임내에 출력되는 메뉴 화면은 오른쪽 이미지처럼 Puts 함수로 표현했습니다. #다음 화면으로 넘어가는 경우에는 system("cls") 로 화면을 지우고 해당하는 화면을 출력하는 방식을 사용했습니다.
  • 5. 게임 화면 출력 #게임 화면의 경우 -테두리 : puts 함수로 표현 -게임 : printf 함수를 이용하여 이차원 배열을 불러오고 이차원 배열안에 저장되어 있는 값이 바뀌면서 화면에 출력이 된다.
  • 6. 게임 작동 방법 (키보드) #게임 작동 방식 -버튼 입력 kbhit, getch 명령어를 통해서 키보드를 통해 입력된 값을 받고 해당 값에 맞는 함수를 제작하였다 (switch 사용) ex_ 윗 방향키를 누를시 > 커서의 y값을 1증가 시킨다 ex_ p 버튼 누를시 > 깃발이 세워진다 ex_ wasd 방향키를 누를 시 커서의 위치 변수값이 1씩 변화한다.
  • 7. 미니게임 1 (지뢰찾기) #게임 작동 방식 (맵과 지뢰 생성) 1. 2차원 배열 20x20크기의 게임판을 생성 2. Rand 명령어를 사용해 배열안에 랜덤하게 지뢰 설치 (지뢰의 경우 @로 표시됨)
  • 8. 미니게임 1 (지뢰찾기) #게임 작동 방식 (맵 구체화) 1. 지뢰위치를 제외한 배열의 원소에 0 값을 넣어준다 2. 지뢰위치와 인접해 있는 배열들에 숫자를 1씩 더해준다 3. 해당 숫자에 해당하는 숫자 이모티콘을 배열에 집어 넣는다 (① ② ③ ④ 등)
  • 9. 미니게임 1 (지뢰찾기) #게임 작동 방식 (깃발) 1. 지뢰의 위치에 깃발을 세울 경우 변수A 의 값을 1씩증가시킨다 2. 지뢰의 위치에 깃발을 세우지 않은 경우 변수B 의 값을 1씩 증가시킨다 변수 A와 변수 B의 합이 폭탄의 개수와 같을 때 게임은 종료된다 1. 변수B가 1이상인 경우 게임 클리어 실패 2. 변수B가 0일 경우 게임 클리어
  • 10. 미니게임 1 (지뢰찾기) #게임 작동 방식 (난이도 별 특징) NORMAL_MODE (보통) > 평범한 지뢰 찾기 EASY_MODE (쉬움) > 폭탄위치는 클릭이 안됨 HARD_MODE(어려움) > 5분 시간제한이 생김 + 깃발 잘못 설치 시 게임 오버 이지 모드 하드 모드 하드 모드
  • 11. 미니게임 1 (지뢰찾기) 배열을 ■ 로 덮은뒤, 게임 시작 지뢰찾기 과정
  • 12. 미니게임 2 (스도쿠) #게임 작동 방식 ( 맵 생성) -이차원 배열을 만들고 배열의 원소에 스도쿠 값을 저장 -4가지 종류의 스도쿠 게임을 배열에 저장해 두고, 랜덤하게 하나의 스도쿠를 선택해 게임 시작
  • 13. 미니게임 2 (스도쿠) #게임 작동 방식 ( 문제 생성) -스도쿠가 저장되어 있는 이차원 배열의 값에서 스도쿠 문제에서 알려주는 값에 해당하는 부분을 제외한 부분에 0값을 넣은 또다른 배열 저장(문제지 저장) # 여기서 만약 rand 명령어를 통해 랜덤하게 배열의 일부 원소들을 0으로 바꿀 경우 스도쿠를 풀지못하는 경우가 발생됨 > 초반에 만들어둔 4가지 스도쿠 배열중에 하나를 랜덤하게 사용
  • 14. 미니게임 2 (스도쿠) #게임 작동 방식 -커서를 wasd방향키를 사용해 이동한 후 키보드k 버튼을 눌러 해당위치에 숫자 입력 #특수 기능 -게임도중 c버튼을 누르게 되면 스도쿠의 문제지에 답이 자동으로 채워진다.
  • 15. 미니게임 2 (스도쿠) #게임 작동 방식 -채점 버튼 문제를 풀은 후 채점 버튼(p)을 클릭 시 채점 시작 정답이 들어가 있는 배열과 풀이 한 값이 들어가 있는 배열을 이중 for문으로 비교 <풀이가 틀릴 시 “오답입니다” 출력> <풀이가 맞을 시 “게임 클리어” 출력>
  • 16. 미니게임 2 (스도쿠) #게임 작동 방식 (난이도 별 특징) NORMAL_MODE (보통) > 평범한 스도쿠 EASY_MODE (쉬움) > 잘못된 값을 입력 시 정답을 출력 HARD_MODE(어려움) > 5분 시간제한이 생김 <이지 모드> <하드 모드>
  • 17. 기록 저장 및 기록 확인 멀티 모드에서 게임 클리어 시 파일 입출력을 통해 게임 기록을 텍스트 파일에 저장 (저장 시 이름과 클리어 시간 ,난이도가 저장)
  • 18. 기록 저장 및 기록 확인 1. 파일 입출력을 통해 게임 기록이 저장된 텍스트 저장 2. 점수 확인 버튼 클릭 3. 점수를 확인하고 싶은 유저의 이름을 검색 4. 파일 입출력을 통해 기록이 저장된 텍스트 파일에서 해당 유저(이름)의 기록만을 검색하여 출력