1 / 15

Data Structure Study - 2008 Summer vacation

Data Structure Study - 2008 Summer vacation. 3 일차 ( 프로그래밍 ). Contents. Attendance & Crossing program check What is the daebeom’s coding style ? Simple project. Attendance & Crossing program check. 출석 체크 크로싱 프로그래밍 체크 How ? 압축파일. Coding style. 중괄호 작성 주석은 ?. Coding style. 명칭 작성법

jamese
Download Presentation

Data Structure Study - 2008 Summer vacation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Data Structure Study- 2008 Summer vacation 3일차 (프로그래밍)

  2. Contents • Attendance & Crossing program check • What is the daebeom’s coding style ? • Simple project

  3. Attendance & Crossing program check • 출석 체크 • 크로싱 프로그래밍 체크 • How ? • 압축파일..

  4. Coding style • 중괄호 작성 • 주석은 ?

  5. Coding style

  6. 명칭 작성법 • 전부 소문자: score, remaintime, callnextlink • 어근만 대문자: Score, RemainTime, CallNextLink • 낙타형: score, remainTime, callNextLink • 매크로는 모두 대문자 • 강대범의 추천 : <prefix>_<큰특징>_<작은특징>

  7. 슈도 코드 (pseudo code)

  8. Text Starcraft Brood war • 저작권 : 강대범 & 블리자드 • 스타크래프트는 2개의 종족으로 이루어져 있다 • Terran • Scv : 체력 10, 공격력 5, 방어력 0 • Marine : 체력 10, 공격력 5, 방어력 1 • Vulture : 체력 20, 공격력 10, 방어력 2 • Protoss • Probe : 체력 10, 공격력 4, 방어력 1 • Zilot : 체력 30, 공격력 10, 방어력 1 • Dragon : 체력 10, 공격력 5, 방어력 3

  9. Text Starcraft Brood war • Support input file • 첫번째 알파벳 : 종족 • 두번째 알파벳 : 유닛 • 세번째 알파벳 : 유닛 ID

  10. Text Starcraft Brood war • Command input file • 공격하는 종족 • 유닛 ID • 공격할 유닛 ID

  11. Text Starcraft Brood war • Output file • Terran , Protoss

  12. Text Starcraft Brood war • 확장 프로그램 • 유닛을 공격 했는데 이미 죽은 유닛이거나 없을 때 • 일단 해 볼 것 : 공격 안 하고 쉰다 • 추가적으로 할 수 있는 것 • 다음 공격 유닛을 고르는데 우선순위를 매긴다 • 우선 순위는 체력이 제일 낮은 유닛을 먼저 공격한다 • 유닛의 개수를 늘린다 • 일단 현재의 유닛은 모두 지대공, 지대지 가능하다고 가정 • 유닛에 공대공, 공대지, 지대공, 지대지의 종류를 설정한다 • 추가설명 하겠음 (말로… )

  13. Text Starcraft Brood war • 이러고도 더 하고 싶다면.. • MFC 로 구현해 본다 • 종족마다 자원을 할당하여 자원 내에서 유닛 개수를 추가할 수 있게 한다 • 저그를 추가한다 • 유닛에 진동형, 노멀형, 폭발형의 종류를 넣는다 • 즉, 유닛에 따라 공격력이 달라진다… • 유닛에 크기를 같이 지정한다 • 프로그램을 링크드 리스트로 바꾼다 • 여기까지도 했다면… • 스카웃

  14. 단계별 • Class Design • 어떤 class 들이 필요할까? • 각 class 내에는 어떤 멤버 변수가 있을까? • 각 class 내에는 어떤 함수가 있을까? • Class 간의 관계는 어떠한가 • Report 참고…

More Related