Sha256: 90c621bbc2ed426ee1d747b897cf187f324222d5e8e303c4625e2cdde12e986a
Contents?: true
Size: 398 Bytes
Versions: 6
Compression:
Stored size: 398 Bytes
Contents
module Codebreaker class DifficultyFactory def self.build(type) case type when DifficultyType::EASY Difficulties::Easy.new when DifficultyType::MEDIUM Difficulties::Medium.new when DifficultyType::HELL Difficulties::Hell.new else raise Errors::InvalidDifficultyError, "unknown difficulty type #{type}" end end end end
Version data entries
6 entries across 6 versions & 1 rubygems