中国像棋/ChessBase.cs

(开头部分) 1KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace 中国像棋
{
    public enum ChessType
    {
        Red,Black
    }
    public enum CheckWin
    {
        xiang,shi,bing,ma,ju,pao,jiang,shuai
    }
    public class ChessBase
    {
        public int X { get; set; }
        public int Y { get; set; }
        public ChessType type { get; set; }
        public CheckWin edg { get; set; }
        private string _imgPath;
        public string ImgPath
        {
            get {
                return _imgPath;
            }
            set
            {
                if (value.Contains("/"))
                {
                    _imgPath = value.Replace("/", @"\");
                }
                else
                {
                    _imgPath = value;
                }
            }
        }
        public virtual bool Eatablemove(Point start, Point end)
        {
            return true;
        }
        public virtual bool Noteatablemove(Point start, Point end)
        {
            return true;
        }

        public ChessBase(int X, int Y,string ImgPath,ChessType type,CheckWin edg)
        {
            this.X = X;
            this.Y = Y;
            this.ImgPath = ImgPath;
            this.type = type;
            this.edg = edg;
        }
        
后面还有 5 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。