WEB开发网
开发学院软件开发C语言 C#实现的中国象棋程序开发笔记 阅读

C#实现的中国象棋程序开发笔记

 2009-06-01 08:31:14 来源:WEB开发网   
核心提示: 2. 象棋接口using System;using System.Collections;namespace Zivsoft.Business.Chess{ /// <summary> /// 象棋接口 /// </summary> interface IChess

2. 象棋接口

using System;
using System.Collections;

namespace Zivsoft.Business.Chess
{
    /// <summary>
    /// 象棋接口
    /// </summary>
    interface IChess
    {
        /// <summary>
        ///
        /// </summary>
        int NextX { get; }
        /// <summary>
        ///
        /// </summary>
        int NextY { get; }
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        ArrayList GetNextLocation();
        /// <summary>
        /// 如果是红色返回为真
        /// </summary>
        /// <returns></returns>
        bool IsRedChess { get;  }
        /// <summary>
        ///
        /// </summary>
        bool IsDogFall { get;  }
        /// <summary>
        /// 是否是进攻
        /// </summary>
        /// <returns></returns>
        bool IsAttack { get;  }
        /// <summary>
        ///
        /// </summary>
        string Name { get; }
        /// <summary>
        ///
        /// </summary>
        int X { get;  }
        /// <summary>
        ///
        /// </summary>
        int Y { get;  }
        /// <summary>
        ///
        /// </summary>
        /// <param name="X"></param>
        /// <param name="Y"></param>
        void Move(int x, int y);
        /// <summary>
        /// 移动
        /// </summary>
        /// <param name="X"></param>
        /// <param name="Y"></param>
        /// <param name="obj"></param>
        void Move(int x, int y, object obj);
    }
}

Tags:实现 中国象棋 程序开发

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接