Пример #1
0
        private static GameOrder CreateOneGameOrder(int orderNo, int count, GameOrder preOrder)
        {
            GameOrder order = new GameOrder();

            order.SetNewId();
            order.SetCreateDate();
            order.SetRowAdded();

            order.IsTeam         = preOrder.IsTeam;
            order.GameId         = preOrder.GameId;
            order.PreOrderId     = preOrder.Id;                //前轮次
            order.OrderNo        = orderNo;                    //当前轮次
            order.Name           = string.Format(count > 1 ? "1/{1}决赛" : "决赛", order.OrderNo, count);
            order.KnockoutOption = KnockoutOption.KNOCKOUT.Id; //淘汰制度
            order.KnockoutCount  = 1;
            order.GroupCount     = count;
            order.KnockoutTotal  = count * 2;
            order.State          = GameOrderState.NOTSTART.Id;
            return(order);
        }