A* fix and update

Somehow messed up the cost setting of each board. Still not efficient
enough, it still saves unnecessary moves for some reason.