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

0001 /*
0002     SPDX-FileCopyrightText: 2007 Paolo Capriotti <p.capriotti@gmail.com>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #ifndef AI__AI_H
0008 #define AI__AI_H
0009 
0010 #include "sea.h"
0011 #include "ships.h"
0012 
0013 class AI
0014 {
0015 protected:
0016     Sea::Player m_player;
0017     Sea* m_sea;
0018     const BattleShipsConfiguration* m_config;
0019 public:
0020     AI(Sea::Player player, Sea* sea, const BattleShipsConfiguration* config);
0021     virtual ~AI() { }
0022     virtual Coord getMove() = 0;
0023     virtual void setShips();
0024     virtual void notify(Sea::Player player, const Coord& c, const HitInfo& hit) = 0;
0025     Coord desperateMove() const;
0026 };
0027 
0028 #endif // AI__AI_H
0029