| 因为附件不管用,现在分行发代码,大家自己粘贴吧不好意思 1-200
 //
 //  main.c
 //  大富翁内测版
 //
 //  Created by Answer.Zhao on 15/7/24.
 //  Copyright (c) 2015年 Answer.Zhao. All rights reserved.
 //
 
 /*
 ******************
 *                *
 *  ************  *
 *  *oooooooooo*  *
 *  *oooooooooo*  *
 *  *oooooooooo*  *
 *  *oooooooooo*  *
 *  ************  *
 *                *
 ******************
 
 */
 
 #include <stdio.h>
 #include <stdlib.h>
 #define M 11
 #define N 18
 
 char map[M][N]={
 {'*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*'},
 {'*','>',' ',' ',' ',' ','E',' ',' ',' ','O',' ',' ',' ',' ',' ','M','*'},
 {'*',' ',' ','*','*','*','*','*','*','*','*','*','*','*','*',' ',' ','*'},
 {'*',' ',' ','*','o','o','o','o','o','o','o','o','o','o','*',' ',' ','*'},
 {'*',' ',' ','*','o','o','o','o','o','o','o','o','o','o','*',' ',' ','*'},
 {'*',' ',' ','*','o','o','o','o','o','o','o','o','o','o','*',' ','H','*'},
 {'*',' ',' ','*','o','o','o','o','o','o','o','o','o','o','*',' ',' ','*'},
 {'*',' ',' ','*','o','o','o','o','o','o','o','o','o','o','*',' ',' ','*'},
 {'*','S',' ','*','*','*','*','*','*','*','*','*','*','*','*',' ',' ','*'},
 {'*',' ',' ',' ','X',' ',' ','C',' ',' ',' ',' ',' ',' ','T',' ',' ','*'},
 {'*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*'}
 };
 
 char fate[3][50]={
 "对方原地休息一回合\n",
 "经济危机,您的钱才丢失800\n",
 "恭喜您中彩票大奖!!奖金1000元!!\n"
 };
 int player_1_Setep=0;
 int player_2_Setep=0;
 int p1_x=1,p1_y=1;
 int p2_x=1,p2_y=1;
 int player_1_Gold=10000;
 int player_2_Gold=10000;
 int e_Gold_Get=500;
 
 
 char tem=' ';
 char road='*';
 char player1='A';
 char player2='B';
 
 int flag_Player1=1;
 int flag_Player2=0;
 
 int flag_Shop_E=1;
 int flag_Shop_E_p1=0;
 int flag_Shop_E_p2=0;
 int flag_Shop_O=1;
 int flag_Shop_O_p1=0;
 int flag_Shop_O_p2=0;
 int flag_Shop_H=1;
 int flag_Shop_H_p1=0;
 int flag_Shop_H_p2=0;
 int flag_Shop_T=1;
 int flag_Shop_T_p1=0;
 int flag_Shop_T_p2=0;
 int flag_Shop_B=1;
 int flag_Shop_B_p1=0;
 int flag_Shop_B_p2=0;
 int flag_Shop_C=1;
 int flag_Shop_C_p1=0;
 int flag_Shop_C_p2=0;
 int flag_Shop_S=1;
 int flag_Shop_S_p1=0;
 int flag_Shop_S_p2=0;
 
 
 int start=1;
 
 
 void show_Time(){
 
 printf("                             _ooOoo_                    \n");
 printf("                            o8888888o                   \n");
 printf("                            88  ®  88                   \n");
 printf("                            (| -_- |)                   \n");
 printf("                             O\ = /O                    \n");
 printf("                         ____/`---'\____                \n");
 printf("                       .   ' \\| |// `.                 \n");
 printf("                        / \\||| : |||// \               \n");
 printf("                      / _||||| -:- |||||- \             \n");
 printf("                       | | \\\ - /// | |  |             \n");
 printf("                    | \_| ''\---/'' | |   /             \n");
 printf("                      \ .-\__ `-` ___/-.  /             \n");
 printf("                  ___`. .' /--.--\ `. . __              \n");
 printf("                ."" '< `.___\_<|>_/___.' >'"".          \n");
 printf("               | | : `- \`.;`\ _ /`;.`/ - ` : | |       \n");
 printf("                 \ \ `-. \_ __\ /__ _/ .-` / /          \n");
 printf("        ======`-.____`-.___\_____/___.-`____.-'======   \n");
 printf("                            `=---='                     \n");
 
 printf("         .............................................  \n");
 printf("                  佛祖镇楼                  BUG辟易                 \n");
 printf("                      made  by  Answer.Zhao® \n");
 
 }
 
 void rules_Show(){
 char rules[12][150]={
 "\n",
 " 欢迎您参与大富翁游戏,每个玩家的初始金币为1W\n",
 " 在游戏中您可以购买土地,不同土地有不同的效果,具体效果如下:\n",
 " E:中国电力 $1000  特效:外人经过该土地需支付过路费$500,同时每回合给你提供$500\n",
 " O:小米科技 $1600  特效:外人经过该土地需支付过路费$600,同时每回合给你提供$600\n",
 " M:命运城堡        特效:经过此地将会得到一张随机的命运卡,祝你好运\n",
 " H:恒大地产 $3000  特效:外人经过该土地将会支付200*X(X为1~10)元\n",
 " T:泰达控股 $3500  特效:每回合为你分红150*X(X为1~10)元\n",
 " C:中国船厂 $2000  特效:外人经过该土地将会支付1000元\n",
 " X:中国银行 $2500  特效:每回合给你提供150*X(X为1~10)元\n",
 " S:百货大楼 $4000  特效:外人经过该土地将会支付给你150*X(X为1~10)元\n",
 "\n"
 };
 for(int i=0;i<12;i++){
 printf("%s",rules[i]);
 }
 }
 void gold_Result(int x,int y,int player){
 
 if(x==1&&y==1&player==1){
 int rand_T=-1;
 int rand_B=-1;
 rand_T=arc4random_uniform(10)+1;
 rand_B=arc4random_uniform(10)+1;
 player_1_Gold=player_1_Gold+500+e_Gold_Get*flag_Shop_E_p1+150*flag_Shop_T_p1*rand_T+150*flag_Shop_B_p1*rand_B;
 
 
 }else if (x==1&&y==1&player==2){
 int rand_T=-1;
 int rand_B=-1;
 rand_T=arc4random_uniform(10)+1;
 rand_B=arc4random_uniform(10)+1;
 player_2_Gold=player_2_Gold+500+e_Gold_Get*flag_Shop_E_p2+150*flag_Shop_T_p2*rand_T+150*flag_Shop_B_p2*rand_B;
 
 }
 
 
 }
 void gold_Shop(int x,int y,int player){
 if(x==1&&y==6&&player==1&&flag_Shop_E_p2==1){
 player_1_Gold=player_1_Gold-500;
 player_2_Gold=player_2_Gold+500;
 
 }else if (x==1&&y==6&&player==2&&flag_Shop_E_p1==1){
 player_1_Gold=player_1_Gold+500;
 player_2_Gold=player_2_Gold-500;
 }
 if(x==1&&y==10&&player==1&&flag_Shop_O_p2==1){
 player_1_Gold=player_1_Gold-600;
 player_2_Gold=player_2_Gold+600;
 }else if (x==1&&y==10&&player==2&&flag_Shop_O_p1==1){
 player_1_Gold=player_1_Gold+600;
 player_2_Gold=player_2_Gold-600;
 }
 if(x==5&&y==16&&player==1&&flag_Shop_H_p2==1){
 int rand =-1;
 rand=arc4random_uniform(10)+1;
 player_1_Gold=player_1_Gold-200*rand;
 printf("玩家一在酒店住的天数为%d\n",rand);
 }else if (x==5&&y==16&&player==2&&flag_Shop_H_p1==1){
 int rand =-1;
 rand=arc4random_uniform(10)+1;
 player_2_Gold=player_2_Gold-200*rand;
 printf("玩家二在酒店住的天数为%d\n",rand);
 }
 if(x==9&&y==7&&player==1&&flag_Shop_O_p2==1){
 player_1_Gold=player_1_Gold-1000;
 
 }else if (x==1&&y==10&&player==2&&flag_Shop_O_p1==1){
 player_2_Gold=player_2_Gold-1000;
 }
 if(x==8&&y==1&&player==1&&flag_Shop_H_p2==1){
 int rand =-1;
 rand=arc4random_uniform(10)+1;
 player_1_Gold=player_1_Gold-150*rand;
 printf("玩家一在超市消费的倍数为%d\n",rand);
 }else if (x==8&&y==1&&player==2&&flag_Shop_H_p1==1){
 int rand =-1;
 rand=arc4random_uniform(10)+1;
 player_2_Gold=player_2_Gold-150*rand;
 printf("玩家二在超市消费的倍数为%d\n",rand);
 }
 
 |