Class: RPG::MoveCommand
- Inherits:
-
Object
- Object
- RPG::MoveCommand
- Defined in:
- lib/rpg/move_command.rb
Overview
Data class for the Move command.
Instance Attribute Summary collapse
-
#code ⇒ Object
Move command code.
-
#parameters ⇒ Object
Array containing the Move command arguments.
Instance Method Summary collapse
-
#initialize(code = 0, parameters = []) ⇒ MoveCommand
constructor
A new instance of MoveCommand.
Constructor Details
#initialize(code = 0, parameters = []) ⇒ MoveCommand
Returns a new instance of MoveCommand.
11 12 13 14 |
# File 'lib/rpg/move_command.rb', line 11 def initialize(code = 0, parameters = []) @code = code @parameters = parameters end |
Instance Attribute Details
#code ⇒ Object
Move command code.
5 6 7 |
# File 'lib/rpg/move_command.rb', line 5 def code @code end |
#parameters ⇒ Object
Array containing the Move command arguments. The contents vary for each command.
9 10 11 |
# File 'lib/rpg/move_command.rb', line 9 def parameters @parameters end |