#include <bits/stdc++.h>
#include <iostream>
#include <windows.h>
#include <conio.h>
using namespace std;
int main(){
bool boo=0;
cout << "记忆卡牌游戏规则" << endl;
cout << "现有16张数字卡牌,由数字1~8组成,每个数字只出现2次" << endl;
cout << "游戏者需要将卡牌翻至背面,找出所有相同的数字" << endl;
cout << "每一轮只允许翻两张卡牌" << endl;
cout << "如果卡牌数字相同,则将卡牌上有数字的一面显示出来" << endl;
cout << "否则将卡牌翻回正面,进行下一轮" << endl;
cout << "系统测量游戏者找出所有相同数字的卡牌所花费的步数(即进行多少轮)" << endl;
cout<<"懂了吗?";
cout<<"按任意键开始.....";
getch();
system("cls");
// Sleep(2000); 假的啦
}
else if(a[ix][iy]a[jx][jy]){
X=MessageBox(0,"你对了!","恭喜!",0);
}
else{
arr[ix][iy]-=1;
arr[jx][jy]-=1;
}
system("cls");
for(int i=0;i<4;i++){
for(int j=0;j<4;j++){
if(arr[i][j]>0) cout<<a[i][j]<<' ';
else{
boo=1;
cout<<'*'<<' ';
}
}
cout<<endl;
}
if(boo0){
X=MessageBox(0,"恭喜!","你完成了挑战!",0);
return 0;
}
boo=0;
}
return 0;
}
别忘了点赞