⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 header24.h

📁 Knight s Tour Implementation
💻 H
字号:
#include <iostream>
#include <cstdlib>
#include <ctime>
#include <iomanip>
#include <conio.h>
using namespace std;


/*=========Function declare==========*/
int isPossible(int, int);
void printArray(void);
void turn( int, int&, int& );
/*=========Variable declare==========*/
const int rows = 8;
const int hor[rows] = { 2, 1, -1, -2, -2, -1, 1, 2 },
ver[rows] = { -1, -2, -2, -1, 1, 2, 2, 1 };
int hCurrent, vCurrent, move;
int board[rows][rows] = {0};
int accessibility[rows][rows]={
	2,3,4,4,4,4,3,2,
	3,4,6,6,6,6,4,3,
	4,6,8,8,8,8,6,4,
	4,6,8,8,8,8,6,4,
	4,6,8,8,8,8,6,4,
	4,6,8,8,8,8,6,4,
	3,4,6,6,6,6,4,3,
	2,3,4,4,4,4,3,2};

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -