Module: Lich::GameBase::GameInstanceFactory
- Defined in:
- documented/games.rb
Overview
Factory for creating game-specific objects
Class Method Summary collapse
-
.create(game_type) ⇒ Gemstone::GameInstance, ...
Creates a game-specific instance based on the game type identifier.
Class Method Details
.create(game_type) ⇒ Gemstone::GameInstance, ...
Creates a game-specific instance based on the game type identifier.
173 174 175 176 177 178 179 180 181 182 183 |
# File 'documented/games.rb', line 173 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 |