simple pathfinder algorithm, but with some examples of classes, operator overloading and other random stuff