Class: RPG::MoveCommand

Inherits:
Object
  • Object
show all
Defined in:
lib/rpg/move_command.rb

Overview

Data class for the Move command.

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#codeObject

Move command code.



5
6
7
# File 'lib/rpg/move_command.rb', line 5

def code
  @code
end

#parametersObject

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