Adds System enum to represent supported game systems, simplifying the process to add future game systems.
24 lines
482 B
Swift
24 lines
482 B
Swift
//
|
|
// DeltaCoreProtocol+Delta.swift
|
|
// Delta
|
|
//
|
|
// Created by Riley Testut on 4/30/17.
|
|
// Copyright © 2017 Riley Testut. All rights reserved.
|
|
//
|
|
|
|
import DeltaCore
|
|
|
|
extension DeltaCoreProtocol
|
|
{
|
|
var supportedRates: ClosedRange<Double> {
|
|
guard let system = System(gameType: self.gameType) else { return 1...1 }
|
|
|
|
switch system
|
|
{
|
|
case .snes: return 1...4
|
|
case .gba: return 1...3
|
|
case .gbc: return 1...4
|
|
}
|
|
}
|
|
}
|