c++怀旧五子棋win7版

//win7版 
#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<time.h>
#include<conio.h>
#include<windows.h>
#include<ctime>
using namespace std;
struct coordinate{
int X,Y;
}Coor1[626],Coor2[626];
char Getin=' ';
int Map[25][25],Sum1,Sum2;
int Map1[25][25]; 
void No(){
HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_CURSOR_INFO CursorInfo;
GetConsoleCursorInfo(handle, &CursorInfo);//获取控制台光标信息
CursorInfo.bVisible = false; //隐藏控制台光标
SetConsoleCursorInfo(handle, &CursorInfo);//设置控制台光标状态
}
void _Coordinate_(int x,int y){
HANDLE winHandle;//句柄
COORD pos = {x,y};
winHandle = GetStdHandle(STD_OUTPUT_HANDLE);
//设置光标位置 
SetConsoleCursorPosition(winHandle,pos); 
}
int Hrong(int x,int y,int n){
if(Map[x][y]==n)    return 5;
}
void Nturn(){
int x1[10],y1[10];
for(int i=Sum1-1;i>=0;i--){
    int x=Coor2[i].X,y=Coor2[i].Y,Emc=0;
    for(int j=0;j<10;j++){x1[j]=x;y1[j]=y;}
    while(Map[x1[0]][y1[0]]==2){    x1[0]++;y1[0]++;Emc++;}
    if(Emc==2&&Map[x-1][y-1]==0&&Map[x1[0]][y1[0]]==0){Map1[x1[0]][y1[0]]+=5+3*Hrong(x1[0]+1,y1[0]+1,2);}
    if(Emc==3&&Map[x1[0]][y1[0]]==0){Map1[x1[0]][y1[0]]+=50+90*Hrong(x1[0]+1,y1[0]+1,2);}
    if(Emc==4&&Map[x1[0]][y1[0]]==0){Map1[x1[0]][y1[0]]+=500;}
    Emc=0;
    while(Map[x1[1]][y1[1]]==2){    x1[1]--;y1[1]++;Emc++;}
    if(Emc==2&&Map[x+1][y-1]==0&&Map[x1[1]][y1[1]]==0){Map1[x1[1]][y1[1]]+=5+3*Hrong(x1[1]-1,y1[1]+1,2);}
    if(Emc==3&&Map[x1[1]][y1[1]]==0){Map1[x1[1]][y1[1]]+=50+90*Hrong(x1[1]-1,y1[1]+1,2);}
    if(Emc==4&&Map[x1[1]][y1[1]]==0){Map1[x1[1]][y1[1]]+=500;}
    Emc=0;
    while(Map[x1[2]][y1[2]]==2){    x1[2]++;y1[2]--;Emc++;}
    if(Emc==2&&Map[x-1][y+1]==0&&Map[x1[2]][y1[2]]==0){Map1[x1[2]][y1[2]]+=5+3*Hrong(x1[2]+1,y1[2]-1,2);}
    if(Emc==3&&Map[x1[2]][y1[2]]==0){Map1[x1[2]][y1[2]]+=50+90*Hrong(x1[2]+1,y1[2]-1,2);}
    if(Emc==4&&Map[x1[2]][y1[2]]==0){Map1[x1[2]][y1[2]]+=500;}
    Emc=0; 
    while(Map[x1[3]][y1[3]]==2){    x1[3]--;y1[3]--;Emc++;}
    if(Emc==2&&Map[x+1][y+1]==0&&Map[x1[3]][y1[3]]==0){Map1[x1[3]][y1[3]]+=5+3*Hrong(x1[3]-1,y1[3]-1,2);}
    if(Emc==3&&Map[x1[3]][y1[3]]==0){Map1[x1[3]][y1[3]]+=50+90*Hrong(x1[3]-1,y1[3]-1,2);}
    if(Emc==4&&Map[x1[3]][y1[3]]==0){Map1[x1[3]][y1[3]]+=500;}
    Emc=0;
    while(Map[x1[4]][y1[4]]==2){    x1[4]++;Emc++;}
    if(Emc==2&&Map[x-1][y]==0&&Map[x1[4]][y1[4]]==0){Map1[x1[4]][y1[4]]+=5+3*Hrong(x1[4]+1,y1[4],2);}
    if(Emc==3&&Map[x1[4]][y1[4]]==0){Map1[x1[4]][y1[4]]+=50+90*Hrong(x1[4]+1,y1[4],2);}
    if(Emc==4&&Map[x1[4]][y1[4]]==0){Map1[x1[4]][y1[4]]+=500;}
    Emc=0;
    while(Map[x1[5]][y1[5]]==2){    x1[5]--;Emc++;}
    if(Emc==2&&Map[x+1][y]==0&&Map[x1[5]][y1[5]]==0
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值