프로그래밍
-
C게임프로그래밍 2프로그래밍 2013. 11. 9. 19:19
#include #include void main() { printf("\n 가위바위보 게임 시작합니다.\n"); printf("가위, 바위, 보 셋 중 하나를 제시하세요\n"); printf("1. 가위 2. 바위 3. 보\n"); int playerHand; int computerHand; reinput:; scanf("%d",&playerHand); computerHand = rand()%3; computerHand = computerHand +1; printf("플레이어:"); switch(playerHand) { case 1: printf("가위"); break; case 2: printf("바위"); break; case 3: printf("보"); break; default: printf("..
-
게임프로그래밍 1프로그래밍 2013. 11. 8. 00:24
#include void main(void) { int swordCount = 0 ; int playerHP = 100; int playerTotalMoney = 0; int playerNowMoney = 100; village : printf("당신은 지금 마을 안에 있습니다.\n"); printf("북쪽에는 은행이 있고, 동쪽에는 상점이,"); printf("서쪽에는 쉴 수 있는 여관이 있습니다.\n"); printf("그리고 마을 밖으로 나가려면 남쪽으로 가면 됩니다.\n"); printf("어디로 이동하시겠습니까?\n\n"); printf("1.상점 2.여관 3.은행 4.마을나가기(번호를 입력 후 엔터를 쳐 주세요)\n"); int i = 0; scanf("%d",&i); printf("당신은 %..
-
도스창에서 게임 만들기프로그래밍 2013. 10. 31. 16:27
#include void main(void) { printf("당신은 지금 마을 안에 있습니다.\n"); printf("북쪽에는 은행이 있고, 동쪽에는 상점이,"); printf("서쪽에는 쉴 수 있는 여관이 있습니다."); printf("그리고 마을 밖으로 나가려면 남쪽으로 가면 됩니다."); } #include void main(void) { printf("당신은 지금 마을 안에 있습니다.\n북쪽에는 은행이 있고, 동쪽에는 상점이 , 서쪽에는 쉴 수있는 여관이 있습니다.\n 그리고 마을 밖으로 나가려면 남쪽으로 가면 됩니다.\n"); } #include void main(void) { int swordCount = 0; int playerHP = 0; int playerTotalMoney = 0; i..