📄 chess.cs
字号:
using System;
namespace HRD.Core
{
//===========================================================
// 用来记录一盘棋局中的空格位置
//===========================================================
public struct BlankPosition
{
public int Pos1;
public int Pos2;
public BlankPosition(int x1, int y1, int x2, int y2)
{
this.Pos1 = y1 * 4 * 2 + x1;
this.Pos2 = y2 * 4 * 2 + x2;
}
public bool IsBlank(int position)
{
if( position == Pos1 || position == Pos2)
return true;
return false;
}
}
public enum ChessmanType
{
Blank = 0,
General = 1,
VChessman = 2,
HChessman = 3,
Solider = 4
}
public struct ChessStep
{
public Int64 layout;
public int chessmanPosition;
public MoveMethod moveMethod;
}
public enum MoveMethod
{
Up,
Down,
Left,
Right,
Up2,
Down2,
Left2,
Right2,
Turning,
Nothingness //没有任何移动
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -