A*算法【拼图游戏】
数据结构 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace 拼图 { /// <summary> /// 空格移动的方向 /// </summary> enum Direction { None, Up, Left, Right, Down } /// <summary> /// 解答 /// </summary> enum Answer { /// <summary> /// 不存在解答 /// </summary> NotExist, /// <summary> /// 存在解答 /// </summary> Exist, /// <summary> /// 在当前指定的搜索深度内不存在解答(需要扩大深度) /// </summary> NotExistInDepth } /// <summary> /// 局面状态信息 /// </summary> class StateMsg { private int depth; private Direction dir; public int Depth { get { return depth; } } public