Module: Lich::GameBase::GameInstanceFactory
- Defined in:
- documented/games.rb
Overview
Factory for creating game-specific objects Factory for creating game-specific objects
Class Method Summary collapse
-
.create(game_type) ⇒ GameInstance
Creates a game instance based on the game type.
Class Method Details
.create(game_type) ⇒ GameInstance
Creates a game instance based on the game type
45 46 47 48 49 50 51 52 53 54 55 |
# File 'documented/games.rb', line 45 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 |