/// <summary> /// Makes all nodes available again. If <paramref name="reShuffle"/> is true, also reshuffles the nodes. /// </summary> public void ResetSampleHistory(bool reShuffle) { if (reShuffle) { _listShuffler.Shuffle(_allNodes); } _availableNodes = new List <UnityEngine.Vector2>(_allNodes); }
/// <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); }
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); }