private async Task FinishSpinProcessAsync() { if (_gameContainer.GameStatus == EnumWhatStatus.LastSpin) { _gameContainer.RepaintBoard(); } else if (_gameContainer.GameStatus == EnumWhatStatus.NeedFindSellPrice || _gameContainer.GameStatus == EnumWhatStatus.NeedSellHouse) { await SoldHouseAsync(_gameBoard.NumberRolled); } else { throw new BasicBlankException("When finishing spin process, not sure what to do. Rethink"); } }
public async Task ChoseCareerAsync(int deck) { if (_gameContainer.CanSendMessage()) { await _gameContainer.Network !.SendAllAsync("chosecareer", deck); } if (_gameContainer.WasNight) { RemoveCareer(deck); } var thisCareer = CardsModule.GetCareerCard(deck); _gameContainer.SingleInfo !.Hand.Add(thisCareer); await _gameContainer.ShowCardAsync(thisCareer); string career1 = PopulatePlayerProcesses.CareerChosen(_gameContainer.SingleInfo, out string career2); if (career1 != "Teacher" && _gameContainer.SaveRoot.WasNight == false) { RemoveCareer(deck); } PopulatePlayerProcesses.FillInfo(_gameContainer.SingleInfo); if (PrivateCanGetSalary(career1, career2)) { _gameContainer.SaveRoot.EndAfterSalary = _gameContainer.GameStatus == EnumWhatStatus.NeedNewCareer || _gameContainer.SaveRoot.WasNight; var thisSalary = _gameContainer.SingleInfo.GetSalaryCard(); _gameContainer.SingleInfo.Hand.RemoveSpecificItem(thisSalary); _gameContainer.GameStatus = EnumWhatStatus.NeedChooseSalary; await _gameContainer.ContinueTurnAsync !.Invoke(); return; } if (_gameContainer.SaveRoot.WasNight) { _gameContainer.SaveRoot.EndAfterSalary = true; } else if (_gameContainer.TeacherChooseSecondCareer) { _gameContainer.GameStatus = EnumWhatStatus.NeedNewCareer; _gameContainer.SaveRoot.MaxChosen = 1; } else { _gameContainer.GameStatus = EnumWhatStatus.NeedToSpin; } _gameContainer.RepaintBoard(); await _gameContainer.ContinueTurnAsync !.Invoke(); }
private void RepaintBoard() { _gameContainer.RepaintBoard(); //i think. }