Module: Lich::GameBase::GameInstanceFactory

Defined in:
documented/games.rb

Class Method Summary collapse

Class Method Details

.create(game_type) ⇒ Object



25
26
27
28
29
30
31
32
33
34
35
# File 'documented/games.rb', line 25

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