program.cs

来自「有本书所有程序的源代码,包括聊天系统,马的遍历等问题」· CS 代码 · 共 47 行

CS
47
字号
using System;

namespace KnightTourPlus
{
	class Program
	{
		static void Main( string[] args )
		{
			string StartX, StartY;
			int x = -1;
			int y = -1;
			do
			{
				Console.Write( "Input StartX(0-7):" );
				StartX = Console.ReadLine();
				try
				{
					x = int.Parse( StartX );
				}
				catch
				{
					x = -1;
					continue;
				}
			} while ( x < 0 || x > 7 );

			do
			{
				Console.Write( "Input StartY(0-7):" );
				StartY = Console.ReadLine();
				try
				{
					y = int.Parse( StartY );
				}
				catch
				{
					y = -1;
					continue;
				}
			} while ( y < 0 || y > 7 );
			SKKnightPlus skknightplus = new SKKnightPlus( x, y );
			skknightplus.StartSearch();
			Console.Read();
		}
	}
}

⌨️ 快捷键说明

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