Files
tictactoe/Gameplay/Globals.cs
2026-01-25 21:04:47 -05:00

26 lines
626 B
C#

using System;
using System.Collections.Generic;
public static partial class Globals
{
public static bool _animationRunning;
public static Random _rng = new();
public static List<string> _addressTranslation = new(){"NW","N","NE","W","C","E","SW","S","SE"};
public static void Shuffle<T>(this IList<T> list)
{
int n = list.Count;
while (n > 1) {
n--;
int k = _rng.Next(n + 1);
T value = list[k];
list[k] = list[n];
list[n] = value;
}
}
public static void LoadSeed(int SEED)
{
_rng = new(SEED);
}
}