Knight-Path 1.0.D018
|
00001 // 00002 // knight-path - shortest knight path between two squares 00003 // Copyright (C) 2011 Peter Miller 00004 // 00005 // This program is free software; you can redistribute it and/or modify 00006 // it under the terms of the GNU General Public License as published by 00007 // the Free Software Foundation; either version 3 of the License, or (at 00008 // your option) any later version. 00009 // 00010 // This program is distributed in the hope that it will be useful, 00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 // General Public License for more details. 00014 // 00015 // You should have received a copy of the GNU General Public License along 00016 // with this program. If not, see <http://www.gnu.org/licenses/>. 00017 // 00018 00019 #ifndef KNIGHT_PATH_SOLVER_TAXI_H 00020 #define KNIGHT_PATH_SOLVER_TAXI_H 00021 00022 #include <knight-path/solver.h> 00023 00033 class solver_taxi: 00034 public solver 00035 { 00036 public: 00040 virtual ~solver_taxi(); 00041 00047 static pointer create(void); 00048 00049 // See base class for documentation. 00050 list_t solve(const position &from, const position &to); 00051 00052 private: 00057 solver_taxi(); 00058 00065 list_t shortest_solution; 00066 00079 void ply(const position &from, const position &to, const list_t &progress); 00080 00088 solver_taxi(const solver_taxi &rhs); 00089 00096 solver_taxi &operator=(const solver_taxi &rhs); 00097 }; 00098 00099 #endif // KNIGHT_PATH_SOLVER_TAXI_H