Exemplo n.º 1
0
    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));
    }
Exemplo n.º 2
0
    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);
    }