Knight-Path 1.0.D018

/home/archives/knight-path/branch.1/branch.0/delta5682.018/knight-path/solver/brute_force.h

Go to the documentation of this file.
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_BRUTE_FORCE_H
00020 #define KNIGHT_PATH_SOLVER_BRUTE_FORCE_H
00021 
00022 #include <knight-path/solver.h>
00023 
00041 class solver_brute_force:
00042     public solver
00043 {
00044 public:
00048     virtual ~solver_brute_force();
00049 
00050     // See base class for documentation.
00051     list_t solve(const position &from, const position &to);
00052 
00057     static pointer create(void);
00058 
00059 private:
00064     solver_brute_force();
00065 
00072     list_t shortest_solution;
00073 
00086     void ply(const position &from, const position &to, const list_t &progress);
00087 
00094     solver_brute_force(const solver_brute_force &rhs);
00095 
00102     solver_brute_force &operator=(const solver_brute_force &rhs);
00103 };
00104 
00105 #endif // KNIGHT_PATH_SOLVER_BRUTE_FORCE_H