/// <summary>
        /// Generates random Vector2 samples from a grid.
        /// </summary>
        /// <param name="grid">The grid to make sampling on.</param>
        /// <param name="seed">Seed.</param>
        public GridBasedSampling(IList <UnityEngine.Vector2> grid, int seed)
        {
            _listShuffler = new ListShuffler(seed);

            _allNodes = new List <UnityEngine.Vector2>(grid);
            _listShuffler.Shuffle(_allNodes);

            _availableNodes = new List <UnityEngine.Vector2>(_allNodes);
        }
Ejemplo n.º 2
0
    public List <FishTokenType> listForm()
    {
        List <FishTokenType> fishTokens = new List <FishTokenType> ();

        foreach (var pair in fishTuple)
        {
            int numTokensOfType = pair.Value;
            for (int i = 0; i < numTokensOfType; i++)
            {
                fishTokens.Add(pair.Key);
            }
        }
        ListShuffler.Shuffle(fishTokens);
        return(fishTokens);
    }