Module: Lich::GameBase::GameInstanceFactory

Defined in:
documented/games.rb

Class Method Summary collapse

Class Method Details

.create(game_type) ⇒ Object



20
21
22
23
24
25
26
27
28
29
30
# File 'documented/games.rb', line 20

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