diff --git a/drawing/Graph.pde b/drawing/Graph.pde index ca9e76a..0193b37 100644 --- a/drawing/Graph.pde +++ b/drawing/Graph.pde @@ -9,4 +9,10 @@ class Graph{ } return true; } + + boolean check3edges_per_vertex(Vertex v){ + if(v.E.size()<3) return true; + if(v.E.size()>=3) return false; + return true; + } } diff --git a/drawing/drawing.pde b/drawing/drawing.pde index bdca3b8..b00a0fa 100644 --- a/drawing/drawing.pde +++ b/drawing/drawing.pde @@ -117,41 +117,28 @@ void mouse_over_BUTTON(){ text("Reset",rectX2+rectwidth/8,rectY2+rectheight/2); } - - void mouseClicked(){ if(check_mouse_over_button(rectX1,rectY1,rectheight,rectwidth)){ //draw edges should be implemented by pressing button. if (G.V.size()<=3) throw new RuntimeException("Requires at least 5 points"); - ArrayList index=new ArrayList (); for(int i=0;i