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