Class: SlackGame::Game::Demo::Position

Inherits:
Object
  • Object
show all
Defined in:
lib/slack_game/game/demo.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_xObject (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_yObject (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

#xObject

Returns the value of attribute x.



50
51
52
# File 'lib/slack_game/game/demo.rb', line 50

def x
  @x
end

#yObject

Returns the value of attribute y.



50
51
52
# File 'lib/slack_game/game/demo.rb', line 50

def y
  @y
end