Class: CARPS::GameClient
- Inherits:
-
Object
- Object
- CARPS::GameClient
- Defined in:
- lib/carps/service/game.rb
Overview
Client games
Instance Method Summary collapse
-
#initialize(dm, mod, conf) ⇒ GameClient
constructor
The first parameter is the dungeon master’s name The second is the mod.
-
#join_game(mailer) ⇒ Object
Join this game as a client.
-
#resume(mailer) ⇒ Object
Play the game.
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 |