如何编写一个扫雷速度最快的自动扫雷程序
如何编写一个扫雷速度最快的自动扫雷程序
日期:2017-12-04 22:37:29 人气:1
#include
#include
#include
using namespace std;
int map[12][12]; // 为避免边界的特殊处理,故将二维数组四周边界扩展1
int derection[3] = { 0, 1, -1 }; //方向数组
int calculate ( int x, int y )
{
int counter = 0;
for ( int i = 0; i < 3; i++ )
fo