Class: SlackGame::Game::Demo::Position
- Inherits:
-
Object
- Object
- SlackGame::Game::Demo::Position
- Defined in:
- lib/slack_game/game/demo.rb
Instance Attribute Summary collapse
-
#range_x ⇒ Object
readonly
Returns the value of attribute range_x.
-
#range_y ⇒ Object
readonly
Returns the value of attribute range_y.
-
#x ⇒ Object
Returns the value of attribute x.
-
#y ⇒ Object
Returns the value of attribute y.
Instance Method Summary collapse
-
#initialize(x, y, range_x, range_y) ⇒ Position
constructor
A new instance of Position.
Constructor Details
#initialize(x, y, range_x, range_y) ⇒ Position
Returns a new instance of Position.
52 53 54 55 56 57 |
# File 'lib/slack_game/game/demo.rb', line 52 def initialize(x, y, range_x, range_y) @x = x @y = y @range_x = range_x @range_y = range_y end |
Instance Attribute Details
#range_x ⇒ Object (readonly)
Returns the value of attribute range_x.
51 52 53 |
# File 'lib/slack_game/game/demo.rb', line 51 def range_x @range_x end |
#range_y ⇒ Object (readonly)
Returns the value of attribute range_y.
51 52 53 |
# File 'lib/slack_game/game/demo.rb', line 51 def range_y @range_y end |
#x ⇒ Object
Returns the value of attribute x.
50 51 52 |
# File 'lib/slack_game/game/demo.rb', line 50 def x @x end |
#y ⇒ Object
Returns the value of attribute y.
50 51 52 |
# File 'lib/slack_game/game/demo.rb', line 50 def y @y end |