Point.cs
909 字节
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TheMachine
{
public class Point
{
public uint Id { get; set; }
public float X { get; set; }
public float Y { get; set; }
public uint UpID { get; set; }
public uint DownID { get; set; }
public uint LeftID { get; set; }
public uint RightID { get; set; }
public Point Up { get; set; }
public Point Down { get; set; }
public Point Left { get; set; }
public Point Right { get; set; }
public bool Visited { get; set; }
public Point(float x, float y, uint id)
{
X = x;
Y = y;
Visited = false;
Id = id;
}
public override string ToString()
{
return $"({X}, {Y})";
}
}
}