A* implementation for 4 and 8 neighbors

Signed-off-by: Luiz Carlos Cavalcanti <cavalcanti.luiz@gmail.com>