completed A*.

Refactored the direction switchcase to separate method.
Changed to valid direction.
Switched int x, int y for Coordinate current and newC.