public async Task EndTurnAsync() { _command.ManuelFinish = true; //now has to manually be done. //view model is responsible for filling out canendturn and alreadyreceivedbunco upon endturnasync. //_thisMod.CanEndTurn = false; //_thisMod.AlreadyReceivedBunco = false; _saveRoot !.PlayOrder !.WhoTurn = await _saveRoot.PlayerList.CalculateWhoTurnAsync(); await _thisState.SaveSimpleSinglePlayerGameAsync(_saveRoot); await NewTurnAsync(); //i think }
public async Task NewGameAsync() { if (await _thisSave.CanOpenSavedSinglePlayerGameAsync() == false) { _games.SpaceList.ClearBoard(); PreviousOpen = new Vector(3, 3); CustomBasicList <int> thisList = _rs.GenerateRandomList(8); _games.SpaceList.PopulateBoard(thisList); } else { _games = await _thisSave.RetrieveSinglePlayerGameAsync <XPuzzleSaveInfo>(); //hopefully this is not iffy. MainContainer !.ReplaceObject(_games); } await _aggregator.SendLoadAsync(); await _thisSave.SaveSimpleSinglePlayerGameAsync(_games); }
public async Task SaveGameAsync() { SaveRoot.MainPileData = await _thisMod !.MainPiles1 !.GetSavedPilesAsync(); SaveRoot.WasteData = await _thisMod.WastePiles1 !.GetSavedGameAsync(); SaveRoot.Discard = _thisMod.MainDiscardPile !.GetSavedPile(); SaveRoot.IntDeckList = _thisMod.DeckPile !.GetCardIntegers(); await FinishSaveAsync(); //this means the ones i previously could not save i now can. has to look at the vb code possibly though in those cases. await _thisState.SaveSimpleSinglePlayerGameAsync(SaveRoot); //i think }
public async Task SaveStateAsync() { if (_isBusy) { return; } _isBusy = true; _saveRoot.DeckList = DeckPile !.GetCardIntegers(); await _thisState.SaveSimpleSinglePlayerGameAsync(_saveRoot); //i think _isBusy = false; }
public async Task SaveStateAsync() { if (_isBusy) { return; } _isBusy = true; SaveRoot.DeckList = DeckPile !.GetCardIntegers(); SaveRoot.MainPiles = _model !.Main1.PileList !.ToCustomBasicList(); SaveRoot.WasteData = _model.Waste1.PileList !.ToCustomBasicList(); await _thisState.SaveSimpleSinglePlayerGameAsync(SaveRoot); //i think _isBusy = false; }
public async Task RollAsync() { await _mainGame.RollDiceAsync(); int score = _mainGame.ScoreRoll(); if (score == 0) { CanEndTurn = true; //could be iffy. return; } _mainGame.UpdateScores(score); _saveroot !.HasRolled = true; await _state.SaveSimpleSinglePlayerGameAsync(_saveroot); //needs to save. this could have been a serious bug. }
public async Task HightlightSpaceAsync(GameSpace thisSpace) { SelectUnSelectSpace(thisSpace); PreviousPiece = thisSpace.Vector; await _thisState.SaveSimpleSinglePlayerGameAsync(_saveRoot); }