private async void OnTest2(object sdr, RoutedEventArgs rea) { // change player ChangedPlayerModel changedPlayer = await ChangedPlayerController.ChangePlayer(this, 1, GameState.WaitingForRoll); VerifyRoundTrip <ChangedPlayerModel>(changedPlayer); NewLog.PushAction(changedPlayer); }
public async Task Redo() { var logEntry = UndoStack.Last(); UndoStack.RemoveAt(UndoStack.Count - 1); // // now get the controller for this particular Action switch (logEntry.Action) { case CatanAction.Rolled: RolledController.Redo(Page, (RolledModel)logEntry); break; case CatanAction.ChangedState: break; case CatanAction.ChangedPlayer: await ChangedPlayerController.Redo(Page, logEntry as ChangedPlayerModel); break; case CatanAction.Dealt: break; case CatanAction.CardsLost: break; case CatanAction.CardsLostToSeven: break; case CatanAction.MissedOpportunity: break; case CatanAction.DoneSupplemental: break; case CatanAction.DoneResourceAllocation: break; case CatanAction.PlayedKnight: break; case CatanAction.RolledSeven: break; case CatanAction.AssignedBaron: break; case CatanAction.UpdatedRoadState: break; case CatanAction.UpdateBuildingState: break; case CatanAction.AssignedPirateShip: break; case CatanAction.AddPlayer: break; case CatanAction.RandomizeTiles: break; case CatanAction.AssignHarbors: break; case CatanAction.SelectGame: break; case CatanAction.AssignRandomTiles: break; case CatanAction.InitialAssignBaron: break; case CatanAction.None: break; case CatanAction.SetFirstPlayer: break; case CatanAction.RoadTrackingChanged: break; case CatanAction.AddResourceCount: break; case CatanAction.ChangedPlayerProperty: break; case CatanAction.SetRandomTileToGold: break; case CatanAction.ChangePlayerAndSetState: break; default: break; } }