Files
python/C++专题课程/回溯算法/皇后问题(回溯法)/nQueen/nQueen/Position.cs

32 lines
573 B
C#
Raw Normal View History

2025-08-30 18:35:01 +08:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace nQueen
{
/// <summary>
/// 表示位置信息的类
/// </summary>
class Position
{
int x;
int y;
public int X
{
get { return x; }
set { x = value; }
}
public int Y
{
get { return y; }
set { y = value; }
}
public Position(int i, int j)
{
X = i;
Y = j;
}
}
}