private async Task PrivateChooseNumberAsync(SimpleNumber number) { if (BasicData.MultiPlayer) { await Network !.SendAllAsync("choosenumber", number.Value); } await ProcessChosenNumberAsync(number); }
public bool CanChooseNumber(SimpleNumber thisNumber) //done. { if (thisNumber.Used == true) { throw new BasicBlankException("It should not have considered this number because it was already used."); } return(SaveRoot !.HintList.Any(items => items == thisNumber.Value)); }
async Task IMiscDataNM.MiscDataReceived(string status, string content) { switch (status) //can't do switch because we don't know what the cases are ahead of time. { case "choosenumber": SimpleNumber thisNumber = SingleInfo !.NumberList.Single(x => x.Value == int.Parse(content)); await ProcessChosenNumberAsync(thisNumber); return; default: throw new BasicBlankException($"Nothing for status {status} with the message of {content}"); } }
public async Task ProcessChosenNumberAsync(SimpleNumber thisNumber) { _gameContainer.Command.ManuelFinish = true; //try this. thisNumber.IsSelected = true; CountdownVMData.ShowHints = false; Aggregator.RepaintBoard(); if (Test !.NoAnimations == false) { await Delay !.DelaySeconds(1); //so you can see the results. } thisNumber.Used = true; thisNumber.IsSelected = false; Aggregator.RepaintBoard(); await EndTurnAsync(); }