Skip to content

Commit

Permalink
Update Gamification.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelesantos committed Sep 27, 2024
1 parent b8bea0c commit 6ec8d34
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Sources/RefdsGamification/Gamification.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import Foundation
import RefdsShared
import RefdsInjection

public final class Gamification<Center: GamificationCenterProtocol> {
public final class Gamification {
@RefdsDefaults(key: "refds.gamification.center.\(RefdsApplication.shared.id ?? "")")
public private(set) var center: Center?
public private(set) var center: GamificationCenter?

private let gameCenter: GameCenter = .init()
private let task: RefdsTask = .init(
Expand Down Expand Up @@ -87,8 +87,8 @@ public final class Gamification<Center: GamificationCenterProtocol> {

private func checkCompleted(
missions: [GamificationMissionProtocol],
on center: Center?
) -> Center? {
on center: GamificationCenter?
) -> GamificationCenter? {
guard var center = center else { return nil }
var completed = center.completed
missions.forEach { mission in
Expand All @@ -105,8 +105,8 @@ public final class Gamification<Center: GamificationCenterProtocol> {

private func checkCompleted(
challenges: [GamificationChallengeProtocol],
on center: Center?
) -> Center? {
on center: GamificationCenter?
) -> GamificationCenter? {
guard var center = center else { return nil }
var completed = center.completed
challenges.forEach { challenge in
Expand Down

0 comments on commit 6ec8d34

Please sign in to comment.