8 - puzzle solver by C++