File indexing completed on 2024-05-12 07:58:31

0001 /***************************************************************************
0002 *   KBlocks, a falling blocks game by KDE                                 *
0003 *   SPDX-FileCopyrightText: 2010 University Freiburg <squall.leonhart.cai@gmail.com> *
0004 *                                                                          *
0005 *   SPDX-License-Identifier: GPL-2.0-or-later
0006 ***************************************************************************/
0007 #ifndef KBLOCKSAIPLANNER_H
0008 #define KBLOCKSAIPLANNER_H
0009 
0010 #include <list>
0011 #include <vector>
0012 
0013 #include "PlannerInterface.h"
0014 
0015 typedef std::list<KBlocks_PieceType_Detail> AIPlanner_PieceValue_Sequence;
0016 typedef std::vector<KBlocksPiece> AIPlanner_PieceInfo_Sequence;
0017 
0018 class KBlocksAIPlanner : public PlannerInterface
0019 {
0020 public:
0021     explicit KBlocksAIPlanner(KBlocksField *p);
0022     ~KBlocksAIPlanner() override;
0023 
0024     int  process(KBlocks_PieceType_Detail pieceValue) override;
0025     bool getNextBoardStatus(int index, KBlocksField *field) override;
0026     bool getNextPieceState(int index, KBlocksPiece *piece) override;
0027 
0028     int count() override;
0029 
0030 private:
0031     AIPlanner_PieceInfo_Sequence mNextPieceValues;
0032 };
0033 
0034 #endif