я пытаюсь записать значение точки сравнения, например, 1,0 равно 1,0 (верно)
это то, что я имею до сих пор.
есть идеи?
class Point
attr_reader :x, :y
def initialize x,y
@x =x
@y =y
end
def compare_point(x,y , a,b) # used to compare points
if(x=a, y=b)
puts correct
else
puts wrong
end
end
end
@current_location = Point.new 1,0
@start_location = Point.new 1,0
compare_point(@start_location,@current_location)