Pathfinding and GameObjects with Velocity

I will work on getting it up on github today (first timer here lol) so link to follow, but in regards to your pseudocode suggestion, this is sort of where things are at (forgive me, this is my first stab as pseudocode too):

create () {

// target clicked, target coords stored in unit object, store velocity in game object as target
// if tile collision occurs
//     check if path to target found
//        velocity stored in game object as 1st tile in path
//     else
//        velocity stored in game object as target tile (in hopes of new collision)

}


update() {
// constantly set velocity as unit gameobject's stored velocity
}

this will require additional tweaking, but in this way my hope is that a new path is recalculated after each tile collision, a play on Starcraft’s pathfinding algo (sort of) an idea I got from this blog where the best path is recalculated constantly