Class: Gamefic::Engine::Web
- Inherits:
-
Base
- Object
- Base
- Gamefic::Engine::Web
- Defined in:
- lib/gamefic-sdk/platform/web/engine.rb
Instance Attribute Summary collapse
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
Instance Attribute Details
#user ⇒ Object (readonly)
Returns the value of attribute user.
12 13 14 |
# File 'lib/gamefic-sdk/platform/web/engine.rb', line 12 def user @user end |
Instance Method Details
#post_initialize ⇒ Object
14 15 16 |
# File 'lib/gamefic-sdk/platform/web/engine.rb', line 14 def post_initialize self.user_class = Gamefic::User::Web end |
#receive(input) ⇒ Object
31 32 33 34 |
# File 'lib/gamefic-sdk/platform/web/engine.rb', line 31 def receive input @user.character.queue.push input unless input.nil? update end |
#run ⇒ Object
18 19 20 21 22 23 |
# File 'lib/gamefic-sdk/platform/web/engine.rb', line 18 def run connect plot.introduce @user.character plot.ready @user.update end |
#turn ⇒ Object
25 26 27 28 29 |
# File 'lib/gamefic-sdk/platform/web/engine.rb', line 25 def turn @plot.ready @user.update update unless @user.character.queue.empty? end |