public static UpgradeState ReduceUnlockUpgradeAction(UpgradeState state, UnlockUpgradeAction action) { return(state with { PurchasedUpgradeIds = state.PurchasedUpgradeIds.Concat(new[] { action.Id }) }); }
public static AppState ReduceUnlockUpgradeAction(AppState state, UnlockUpgradeAction action) { return(state with { Faith = state.Faith - action.Cost, Timestamp = DateTime.Now }); }