Cleaning up and writing tests

This commit is contained in:
2025-10-02 21:45:52 -06:00
parent ed3cd08130
commit 279658f3e5
17 changed files with 584 additions and 56 deletions
+7 -1
View File
@@ -16,7 +16,6 @@ class Position
# initialize with a, b, c position
raise NotImplementedError.new('(a, b, c) positioning not implimented!')
else
require 'byebug';debugger
raise ArgumentError.new('Creation of a position requires two or three integer args for a position.')
end
end
@@ -35,7 +34,14 @@ class Position
return [x_pos, y_pos]
end
# Returns the string formatted version
#
# @return [String] Returns a string representing the point.
def to_s
return "(#{@x_pos}, #{y_pos})"
end
def ==(other)
return other.x_pos == @x_pos && other.y_pos == @y_pos
end
end