c++草原战争

//感觉解释不全,很难玩
#include <bits/stdc++.h>   //WEWILLFINDYOUANDHANTYOU 
#include <windows.h>       //GETYOUANDKILLYOUEATYOU!
#include <conio.h>
using namespace std;
int t,g[15][15],h;
int xf=1,yf=1,hf=10,ff=1,gf=1;
int xs=12,ys=12,hs=10,fs=0,gs=1;
int xt,yt,xln,yln,fx[]={-1,1,0,0},fy[]={0,0,-1,1};
int dp[15][15][15][15],cd;
bool bt,bl,bn,bs;
string st="▓",f[4]={"↑","↓","←","→"},s;
string gz=" <( 操作方法 )>\n1.A 用w a s d移动, 按x键攻击.\n2.B 用u h j k移动, 按n键攻击.\n";
void col(int c1,int c2,string c){
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), c1*16+c2);
cout<<c;
} void HideCursor(){
CONSOLE_CURSOR_INFO cursor_info = {1, 0};      
SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE), &cursor_info);
} int makeg(int k){
if(k<=600) return 0;//荒原 
if(k<=690) return 1;//草地 
if(k<=780) return 2;//沼泽 
if(k<=870) return 3;//冰川 
if(k<=980) return 4;//废墟 
if(k<=986) return 5;//小炮 
if(k<=988) return 6;//大炮 
if(k<=991) return 7;//穿透枪 
if(k<=992) return 8;// 弹炮 
if(k<=997) return 9;//火矢 
if(k<=999) return 10;//脉冲枪  
if(k<=1000) return 11;//手榴弹  
} void make(){
int i=14,j; 
col(cd,7,"");
while(i--) cout<<st;
cout<<endl;
for(i=1;i<=12;i++){
    col(cd,7,st);
    for(j=1;j<=12;j++){
        if(i==xf&&j==yf) col(10,2,f[ff]);
        else if(i==xs&&j==ys) col(12,4,f[fs]);
        else if(g[i][j]==4) col(cd,7,st);
        else if(g[i][j]==3) col(cd,11,st);
        else if(g[i][j]==2) col(cd,13,st);
        else if(g[i][j]==1) col(cd,10,st);
        else if(g[i][j]==11) col(cd,2,"⊕");
        else if(g[i][j]==10) col(cd,7,"◎");
        else if(g[i][j]==9) col(cd,13,"Δ");
        else if(g[i][j]==8) col(cd,12,"¤");
        else if(g[i][j]==7) col(cd,11,"≈");
        else if(g[i][j]==6) col(cd,14,"≡");
        else if(g[i][j]==5) col(cd,10,"=");
        else col(cd,7,"  ");
    } col(cd,7,st);
    cout<<endl;
} i=14; 
col(cd,7,"");
while(i--) cout<<st;
cout<<endl<<endl;
col(10,0,"");
if(gf==1) cout<<"  ";
if(gf==5) cout<<"=";
if(gf==6) cout<<"≡";
if(gf==7) cout<<"≈";
if(gf==8) cout<<"¤";
if(gf==9) cout<<"Δ";
if(gf==10) cout<<"◎";
if(gf==11) cout<<"⊕";
col(cd,10," ph : ");
printf("%-4d",hf);
col(12,0,"");
if(gs==1) cout<<"  ";
if(gs==5) cout<<"=";
if(gs==6) cout<<"≡";
if(gs==7) cout<<"≈";
if(gs==8) cout<<"¤";
if(gs==9) cout<<"Δ";
if(gs==10) cout<<"◎";
if(gs==11) cout<<"⊕
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值