File indexing completed on 2024-11-24 03:44:58

0001 /*
0002  * Copyright (C) 1998-2002 Tom Holroyd <tomh@kurage.nimh.nih.gov>
0003  * Copyright (C) 2006-2009 Stephan Kulow <coolo@kde.org>
0004  *
0005  * This program is free software; you can redistribute it and/or
0006  * modify it under the terms of the GNU General Public License as
0007  * published by the Free Software Foundation; either version 2 of
0008  * the License, or (at your option) any later version.
0009  *
0010  * This program is distributed in the hope that it will be useful,
0011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0013  * GNU General Public License for more details.
0014  *
0015  * You should have received a copy of the GNU General Public License
0016  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
0017  */
0018 
0019 #ifndef CASTLESOLVER_H
0020 #define CASTLESOLVER_H
0021 
0022 // own
0023 #include "abstract_fc_solve_solver.h"
0024 
0025 constexpr auto Nwpiles = 8;
0026 constexpr auto Ntpiles = 4;
0027 class Castle;
0028 
0029 class CastleSolver : public FcSolveSolver
0030 {
0031 public:
0032     explicit CastleSolver(const Castle *dealer);
0033     int good_automove(int o, int r);
0034     int get_possible_moves(int *a, int *numout) override;
0035     void translate_layout() override;
0036     MoveHint translateMove(const MOVE &m) override;
0037     void setFcSolverGameParams() override;
0038     int get_cmd_line_arg_count() override;
0039     const char **get_cmd_line_args() override;
0040     card_t O[12]; /* output piles store only the rank or NONE */
0041     const Castle *deal;
0042 };
0043 
0044 #endif // CASTLESOLVER_H