JBotSim
JBotSim copied to clipboard
Topology.addNode() could return the added Node
I have been frustrated several times that, when adding a default node to a Topology, Topology.addNode(-1, -1) did not return the created Node so that I can use it afterwards.
The currently available methods forced me to first create the instance of Node myself, and then add it to the Topology.
Proposition
I suggest changing, at least, the prototype of void addNode(double x, double y) to Node addNode(double x, double y).
Note: other addNode() variants could also benefit from such modification.