Finished testing and docs for now. Time for new features!
This commit is contained in:
@@ -41,6 +41,11 @@ class Position
|
||||
return "(#{@x_pos}, #{y_pos})"
|
||||
end
|
||||
|
||||
# Custom comparison. We need to check the the point is the same, not the
|
||||
# identity.
|
||||
#
|
||||
# @param other [Positon] The position to compare with
|
||||
# @return [Boolean] If they are in the same position as each other.
|
||||
def ==(other)
|
||||
return other.x_pos == @x_pos && other.y_pos == @y_pos
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user