To save the data,the Data Structure is two array,to save the position of the points.The objects have the checked/unchecked data,the class may have the property.In the left array,among the points,only one can be checked.The element of the right rarray is so.
The state can be changed by the point is clicked.To update the state by the user input.To save the state with an array two by two.To draw the lines by the data of the final array.Clicked the point of left one is checked/unchecked,save it to the final array,click the other point in the right,if checked and determined,save it to the final array,or remove the point before.In recycling,with the saving data,two by two,draw the lines.Do you understand?
《Information Science》To Build The Excercise Of Connecting Lines
于 2024-10-04 05:12:30 首次发布