public void deal_normal() { log.log.trace(new System.Diagnostics.StackFrame(), service.timerservice.Tick, "begin deal_normal"); InitCards.GetInst((GameCommon.PeopleNum)peopleNum).InitCards(cards); Random ra = new Random(); int r = ra.Next(); int index = 0; for (int i = 0; i < 13; i++) { Int64 card_people = card_righter; for (int n = 0; n < peopleNum; n++) { index = r % cards.Count; player_cards[card_people].Add(cards[index]); cards.RemoveAt(index); card_people = (Int64)GetNextSite((GameCommon.mjSite)card_people); } } log.log.trace(new System.Diagnostics.StackFrame(), service.timerservice.Tick, "end deal_normal"); }
public void deal_laiyou() { log.log.trace(new System.Diagnostics.StackFrame(), service.timerservice.Tick, "begin deal_laiyou"); if (hub.hub.config.has_key("robot_deal_list")) { InitCards.GetInst((GameCommon.PeopleNum)peopleNum).InitCards(cards); var robot_deal_list = hub.hub.config.get_value_list("robot_deal_list"); Int64 card_people = card_righter; for (int i = 0; i < robot_deal_list.get_list_size(); i++) { var pai_list = robot_deal_list.get_list_list(i); for (int j = 0; j < pai_list.get_list_size(); j++) { Int64 c = pai_list.get_list_int(j); player_cards[card_people].Add(c); cards.Remove(c); } card_people = (Int64)GetNextSite((GameCommon.mjSite)card_people); } } else { deal_normal(); } log.log.trace(new System.Diagnostics.StackFrame(), service.timerservice.Tick, "end deal_laiyou"); }