/*
 * 作者:吴隆健
 * 日期: 2019-04-22
 * 时间: 16:54
 * 
 */
using Newtonsoft.Json;
using System;
using System.Collections.Generic;

namespace GameData
{

    /// <summary>
    /// 分值
    /// </summary>
    public class FightScore : ICloneable
    {
        /// <summary>
        /// 数据库的id
        /// </summary>
        public int id;

        /// <summary>
        /// 竞技比赛id
        /// </summary>
        public int clubid;

        /// <summary>
        /// 玩法id
        /// 从int 改为string  之前也没有使用上。
        /// </summary>
        public string wayid;

        /// <summary>
        /// 朋友房唯一码
        /// </summary>
        public string weiyima;

        /// <summary>
        /// 游戏的服务器id
        /// </summary>
        public int game_serid;

        /// <summary>
        /// 房间号
        /// </summary>
        public int roomnum;

        /// <summary>
        /// 开始时间
        /// </summary>
        public DateTime startTime;

        /// <summary>
        /// 结束时间
        /// </summary>
        public DateTime endTime;

        /// <summary>
        /// 开战次数
        /// </summary>
        public int warCnt;

        /// <summary>
        /// 打完多少盘
        /// </summary>
        public int overCnt;

        /// <summary>
        /// 耗卡数量  --xu add
        /// </summary>
        public int CardNum;

        /// <summary>
        /// 解散原因
        /// </summary>
        public int Style;

        /// <summary>
        /// 解散玩家ID
        /// </summary>
        public int DisUserId;

        /// <summary>
        /// 分值
        /// </summary>
        public Player[] scores;
        /// <summary>
        /// 
        /// </summary>
        public FightScore() { }

        /// <summary>
        /// 浅克隆
        /// </summary>
        /// <returns></returns>
        public object Clone()
        {
            return this.MemberwiseClone();
        }

        /// <summary>
        /// 玩家
        /// </summary>
        public class Player
        {

            /// <summary>
            /// 用户唯一id
            /// </summary>
            public int userid;

            /// <summary>
            /// 名称
            /// </summary>
            public string name;

            /// <summary>
            /// 分值
            /// </summary>
            public decimal score;

            /// <summary>
            /// 玩家头像
            /// </summary>
            public string photo;

            /// <summary>
            /// 俱乐部id
            /// </summary>
            public int clubId;

            /// <summary>
            /// 俱乐部名字
            /// </summary>
            public string clubName;

            /// <summary>
            /// 
            /// </summary>
            public Player() { }

            /// <summary>
            /// 
            /// </summary>
            /// <param name="userid"></param>
            /// <param name="name"></param>
            /// <param name="score"></param>
            public Player(int userid, string name, decimal score)
            {
                this.userid = userid;
                this.name = name;
                this.score = score;
            }
        }
    }
}
