vdoring / fh-player-vs-monster-turngame Goto Github PK
View Code? Open in Web Editor NEWThird FST HDR Project. 3 jobs characters VS Monsters Turn Game!
License: GNU General Public License v3.0
Third FST HDR Project. 3 jobs characters VS Monsters Turn Game!
License: GNU General Public License v3.0
4가지 공격방식, 특정 공격은 확률에 따라 크리티컬이 뜰수도, 공격에 실패할수도 있습니다.
턴이 구현되었습니다.
기본적으로 나(플레이어)가 선공이며 그 이후론 몬스터가 공격합니다.(이는 한쪽이 HP가 다될때까지 계속)
1.방어력에따른 데미지감소 구현하기
2.초기화 구현하기
3.종료 구현하기
4.게임이 끝나도 프로그램이 종료되지 않도록 하기
3번. 종료를 입력해도 종료가 되지않거나 애러가 뜬다.
예상되는 증상으로는 while문이 중첩 사용되서, 한번의 break로는 완전히 나갈 수 없는점
또는 while문을 사용하지 말아야할곳까지 범위를 지정해서 사용했다 등..
일단 코드를 다시 짜봐야겠다.
1.시작 2.초기화 3.종료 부터.
나머지 부분은 크게 문제없어보인다.
While을 사용한 기본적인 시작시스템
#include <stdio.h>
int main()
{
int a, aa, b;
printf("시작.\n");
while (1) {
printf("1.게임시작 2.초기화 3.종료\n");
scanf("%d", &a);
if (a == 1) {
printf("게임캐릭터를 선택하세요\n");
scanf("%d", &aa);
if (aa == 99) {
printf("메인으로 돌아감니다\n");
}
}
if (a == 2) {
printf("초기화 완료\n");
}
if (a == 3) {
printf("게임이 종료됩니다.\n\n\n");
break;
}
}
}
캐릭터 선택.
4가지 공격방식 및 선택
선택에따른 계산과 데미지(불완전)
상대몬스터의 턴일때 공격. 계산과 데미지(불완전)
능력치초기화, 종료는 아직 사용하지 못함
제작중..!
한 플레이어/몬스터 턴이 지나갈때마다 턴이 지나가게 하지말고
플레이어 몬스터 = 1턴
이렇게 변경하기
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.