Open jenessalemon opened 7 years ago
First of all, your polygon constructor is missing some braces:
polygon.generator <- new.polygon(point1, point2, point3, point4) #Something goes here
if(!inherits(point1, "point") | !inherits(point2, "point"), !inherits(point3, "point") | !inherits(point4, "point"))
stop("You haven't given me four points!")
out = list(new.line(point1, point2), new.line(point2, point3), new.line(point3, point4), new.line(point4, point1))
return(out)
#Something goes here
...but otherwise looks (at a glance) to be fine.
Could you do me a favour? Could you pop online at https://appear.in/usubioprogramming and meet me there? It's a bit difficult to diagnose this one without speaking to you.
PS - your code looks really good - you've really gotten the point of this exercise. It's very impressive!
Will, I am drawing my polygon in lesson_3, and I cannot see why the loop is breaking. It's so strange. The first three lines are drawn, and then something happens and it just breaks. Wondering if you can help me figure out why?