File indexing completed on 2024-04-28 04:01:57

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 PLANNERINTERFACE_H
0008 #define PLANNERINTERFACE_H
0009 
0010 #include "KBlocksAITypeDefine.h"
0011 
0012 #include "../KBlocksField.h"
0013 #include "../KBlocksPiece.h"
0014 
0015 class PlannerInterface
0016 {
0017 public:
0018     explicit PlannerInterface(KBlocksField *p)
0019     {
0020         mpField = p;
0021     };
0022     virtual ~PlannerInterface() {};
0023 
0024     virtual int  process(KBlocks_PieceType_Detail) = 0;
0025 
0026     virtual bool getNextBoardStatus(int, KBlocksField *) = 0;
0027     virtual bool getNextPieceState(int, KBlocksPiece *) = 0;
0028 
0029     virtual int  count() = 0;
0030 
0031 protected:
0032     KBlocksField *mpField;
0033 };
0034 
0035 #endif