Class: Beefdump::Client::Base
- Inherits:
-
Object
- Object
- Beefdump::Client::Base
- Defined in:
- lib/beefdump/client/base.rb
Overview
The most basic client which is kind of a client specification
Direct Known Subclasses
Instance Attribute Summary collapse
-
#player ⇒ Object
readonly
Returns the value of attribute player.
Instance Method Summary collapse
-
#act ⇒ Object
Do whatever the client would like to do.
-
#disconnect ⇒ Object
The server wants to close the connection to the client.
-
#initialize(game, player = nil) ⇒ Base
constructor
Initialize the client on connection to the server.
Constructor Details
#initialize(game, player = nil) ⇒ Base
Initialize the client on connection to the server
8 9 10 11 |
# File 'lib/beefdump/client/base.rb', line 8 def initialize(game, player = nil) @game = game @player = player end |
Instance Attribute Details
#player ⇒ Object (readonly)
Returns the value of attribute player.
5 6 7 |
# File 'lib/beefdump/client/base.rb', line 5 def player @player end |
Instance Method Details
#act ⇒ Object
Do whatever the client would like to do. This is called by the server in any game loop.
15 16 |
# File 'lib/beefdump/client/base.rb', line 15 def act end |
#disconnect ⇒ Object
The server wants to close the connection to the client. Clean up the stuff in here
20 21 |
# File 'lib/beefdump/client/base.rb', line 20 def disconnect end |