private Stack <TileInstance> InsertOneMoreRoundTile(Stack <TileInstance> p_stack, int p_nb_players) { TileInstance last = new TileInstanceOneMoreRound(); List <TileInstance> list = new List <TileInstance> (p_stack); System.Random rng = new System.Random(); int n = list.Count; int k = rng.Next(n - 10 - (p_nb_players - 2) * 3, n - 4); list.Insert(k, last); return(new Stack <TileInstance> (list)); }
private Stack<TileInstance> InsertOneMoreRoundTile(Stack<TileInstance> p_stack, int p_nb_players) { TileInstance last = new TileInstanceOneMoreRound (); List<TileInstance> list = new List<TileInstance> (p_stack); System.Random rng = new System.Random (); int n = list.Count; int k = rng.Next (n - 10 - (p_nb_players - 2) * 3, n - 4); list.Insert (k, last); return new Stack<TileInstance> (list); }