Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Push up Path methods up the class hierarchy

Joined
Nov 3, 2013
Messages
609
@Cloud @Arbiter
Can you push the next() and generationTime() methods up into the Path class? Otherwise I have to do this:
Code:
Path path = pathBuilder.build(Players.getLocal(), bank.getArea());
if(path instanceof RegionPath) return ((RegionPath) path).getNext().getPosition().minimap();
else if (path instanceof WebPath)return ((WebPath) path).getNext().getPosition().minimap();
Which seems a bit silly :(
 
Last edited:
Engineer
Joined
Jul 28, 2013
Messages
2,776
What's the point of the interface except to abstract away common methods?
I've gone ahead and added getNext to Path, but I haven't added get generation time because it's not always something that's available.
 
Top