Class: CARPS::GameClient

Inherits:
Object
  • Object
show all
Defined in:
lib/carps/service/game.rb

Overview

Client games

Instance Method Summary collapse

Constructor Details

#initialize(dm, mod, conf) ⇒ GameClient

The first parameter is the dungeon master’s name The second is the mod. The third is the configuration file



78
79
80
81
82
# File 'lib/carps/service/game.rb', line 78

def initialize dm, mod, conf
   @dm = dm
   @mod = mod
   @conf = conf
end

Instance Method Details

#join_game(mailer) ⇒ Object

Join this game as a client

FIXME: just use resume



87
88
89
# File 'lib/carps/service/game.rb', line 87

def join_game mailer
   resume mailer
end

#resume(mailer) ⇒ Object

Play the game



92
93
94
95
96
# File 'lib/carps/service/game.rb', line 92

def resume mailer
   mod = load_mods[@mod]
   player_mailer = Player::Mailer.new @dm, mailer, @conf
   Process.singleton.launch player_mailer, mod + " -p"
end