A-Star implementation in Java