lib/strategy_game_backend/behaviours/movable.rb
def position
        raise StrategyGameBackend::Behaviours::Movable::Error, 'position is not set' if @x.nil? && @y.nil?

        [@x, @y]
      end
# Returns the current position of the movable thing as an array of [x, y].
Returns the current position of the movable thing as an array of [x, y].
Returns the current position of the movable thing as an array of [ x y ] .
def position
        raise StrategyGameBackend::Behaviours::Movable::Error, 'position is not set' if @x.nil? && @y.nil?
        [@x, @y]
      end
def position raise StrategyGameBackend :: Behaviours :: Movable :: Error , 'position is not set' if @x . nil? && @y . nil? [ @x , @y ] end
Returns the current position of the movable thing as an array of [x, y].
Returns the current position of the movable thing as an array of [ x y ] .