Module: Lich::GameBase::GameInstanceFactory
- Defined in:
- documented/games.rb
Overview
Factory for creating game-specific objects
Class Method Summary collapse
-
.create(game_type) ⇒ Lich::Gemstone::GameInstance, ...
Creates a game-specific instance based on the game type identifier.
Class Method Details
.create(game_type) ⇒ Lich::Gemstone::GameInstance, ...
Creates a game-specific instance based on the game type identifier.
166 167 168 169 170 171 172 173 174 175 176 |
# File 'documented/games.rb', line 166 def self.create(game_type) case game_type when /^GS/ Gemstone::GameInstance.new when /^DR/ DragonRealms::GameInstance.new else # Default to a basic implementation if game type is unknown GameInstance::Base.new end end |