中国像棋/ChessBoard.cs

(开头部分) 10KB

这里只显示每个文件的开头 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 class ChessBack
    {
        public ChessBack(Point startpoint ,Point endpoint,ChessBase startchess,ChessBase endchess)
        {

            this.startpoint = startpoint;
            this.endpoint = endpoint;
            this.startchess = startchess;
            this.endchess = endchess;
        }
        public  ChessBase endchess { get; set; }

        public ChessBase startchess { get; set; }

        public Point endpoint { get; set; }

        public Point startpoint { get; set; }
    }
    public class ChessBoard
    {
        public static List<ChessBack> before = new List<ChessBack>();
        public static List<ChessBase> AllChess = new List<ChessBase>();
        public static bool IsSelectedChess { get;set;}
        public static Point _startPoint;
        public static Point StartPoint
        {
            get { return _startPoint; }
            set
            {
                _startPoint = value;
                IsSelectedChess = true;                
            }
        }
        public static Point EndPoint { get; set; }
        public static ChessBase SelectedChess { get; set; }
        public static ChessType CourrenType { get; set; }
        
        public static void ChessBack()
        {
            if (before.Count() == 0)
                return;
            ChessBack chess = before.ElementAt(before.Count() - 1);
            chess.startchess.X = chess.startpoint.X;
            chess.startchess.Y = chess.startpoint.Y;
            if(chess.endchess!=null)
            {
                chess.endchess.X = chess.endpoint.X;
                chess.endchess.Y = chess.endpoint.Y;
                AllChess.Add(chess.endchess);
后面还有 172 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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