From 53661b3337503781d7730e25e2815f0f0a40b076 Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Thu, 27 Jul 2017 18:44:45 +0200 Subject: [PATCH] Removed old stuff --- .../Modules/Games/AcropobiaCommands.cs | 128 ------------------ 1 file changed, 128 deletions(-) diff --git a/src/NadekoBot/Modules/Games/AcropobiaCommands.cs b/src/NadekoBot/Modules/Games/AcropobiaCommands.cs index 198666ad..c9deb585 100644 --- a/src/NadekoBot/Modules/Games/AcropobiaCommands.cs +++ b/src/NadekoBot/Modules/Games/AcropobiaCommands.cs @@ -153,133 +153,5 @@ $@"-- await Context.Channel.EmbedAsync(embed).ConfigureAwait(false); } } - - //public enum AcroPhase - //{ - // Submitting, - // Idle, // used to wait for some other actions while transitioning through phases - // Voting - //} - - ////todo 85 Isolate, this shouldn't print or anything like that. - //public class OldAcrophobiaGame - //{ - // private readonly ITextChannel _channel; - // private readonly int _time; - // private readonly NadekoRandom _rng; - // private readonly ImmutableArray _startingLetters; - // private readonly CancellationTokenSource _source; - // private AcroPhase phase { get; set; } = AcroPhase.Submitting; - - // private readonly ConcurrentDictionary _submissions = new ConcurrentDictionary(); - // public IReadOnlyDictionary Submissions => _submissions; - - // private readonly ConcurrentHashSet _usersWhoSubmitted = new ConcurrentHashSet(); - // private readonly ConcurrentHashSet _usersWhoVoted = new ConcurrentHashSet(); - - // private int _spamCount; - - // //text, votes - // private readonly ConcurrentDictionary _votes = new ConcurrentDictionary(); - // private readonly Logger _log; - // private readonly DiscordSocketClient _client; - // private readonly NadekoStrings _strings; - - // public OldAcrophobiaGame(DiscordSocketClient client, NadekoStrings strings, ITextChannel channel, int time) - // { - // _log = LogManager.GetCurrentClassLogger(); - // _client = client; - // _strings = strings; - - // _channel = channel; - // _time = time; - // _source = new CancellationTokenSource(); - - // _rng = new NadekoRandom(); - // var wordCount = _rng.Next(3, 6); - - // var lettersArr = new char[wordCount]; - - // for (int i = 0; i < wordCount; i++) - // { - // var randChar = (char)_rng.Next(65, 91); - // lettersArr[i] = randChar == 'X' ? (char)_rng.Next(65, 88) : randChar; - // } - // _startingLetters = lettersArr.ToImmutableArray(); - // } - - // private Task PotentialAcro(SocketMessage arg) - // { - // var _ = Task.Run(async () => - // { - // try - // { - // var msg = arg as SocketUserMessage; - // if (msg == null || msg.Author.IsBot || msg.Channel.Id != _channel.Id) - // return; - - // ++_spamCount; - - // var guildUser = (IGuildUser)msg.Author; - - // var input = msg.Content.ToUpperInvariant().Trim(); - - // if (phase == AcroPhase.Submitting) - // { - // // all good. valid input. answer recorded - // await _channel.SendConfirmAsync(GetText("acrophobia"), - // GetText("acro_submit", guildUser.Mention, - // _submissions.Count)); - // try - // { - // await msg.DeleteAsync(); - // } - // catch - // { - // await msg.DeleteAsync(); //try twice - // } - // } - // else if (phase == AcroPhase.Voting) - // { - // if (_spamCount > 10) - // { - // _spamCount = 0; - // try { await _channel.EmbedAsync(GetEmbed()).ConfigureAwait(false); } - // catch { } - // } - - // //if (submissions.TryGetValue(input, out usr) && usr.Id != guildUser.Id) - // //{ - // // if (!usersWhoVoted.Add(guildUser.Id)) - // // return; - // // votes.AddOrUpdate(input, 1, (key, old) => ++old); - // // await channel.SendConfirmAsync("Acrophobia", $"{guildUser.Mention} cast their vote!").ConfigureAwait(false); - // // await msg.DeleteAsync().ConfigureAwait(false); - // // return; - // //} - - // int num; - // if (int.TryParse(input, out num) && num > 0 && num <= _submissions.Count) - // { - // var kvp = _submissions.Skip(num - 1).First(); - // var usr = kvp.Value; - // //can't vote for yourself, can't vote multiple times - // if (usr.Id == guildUser.Id || !_usersWhoVoted.Add(guildUser.Id)) - // return; - // _votes.AddOrUpdate(kvp.Key, 1, (key, old) => ++old); - - // } - - // } - // } - // catch (Exception ex) - // { - // _log.Warn(ex); - // } - // }); - // return Task.CompletedTask; - // } - - //} } } \ No newline at end of file