public static void RunTwitchCommandQueue() { WriteToConsole("Executing new twitch command queue:"); while (twitchCommandQueue.Count > 0) { TwitchCommandInfo commandInfo = twitchCommandQueue.Dequeue(); switch (commandInfo.command) { case TwitchCommand.KillRandomPlayer: MurderRandomPlayer(); break; case TwitchCommand.SwapPlayers: RandomlySwapAllPlayers(); break; case TwitchCommand.KillNamedPlayer: MurderPlayerByName(commandInfo.infoString); break; default: break; } } }
public static void AddTwitchCommand(TwitchCommandInfo command) { twitchCommandQueue.Enqueue(command); }