File indexing completed on 2024-04-14 04:00:25

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 AIENTITY_H
0008 #define AIENTITY_H
0009 
0010 #include "entity.h"
0011 
0012 class AI;
0013 
0014 class AIEntity : public Entity
0015 {
0016 Q_OBJECT
0017     AI* m_ai;
0018     Sea* m_sea;
0019 
0020 
0021     friend class DelayedShot;
0022 public:
0023     AIEntity(Sea::Player player, Sea* sea, SeaView *seaview);
0024     ~AIEntity() override;
0025 
0026     void notify(Sea::Player player, const Coord& c, const HitInfo& info) override;
0027     void notifyChat(const Entity*, const QString&) override { }
0028     void notifyNick(Sea::Player, const QString&) override { }
0029     void start() override;
0030     void startPlacing() override;
0031     void startPlaying() override;
0032     void hit(Shot* shot) override;
0033     void notifyGameOptions() override;
0034 
0035     QIcon icon() const override;
0036 public Q_SLOTS:
0037     void notifyAbort() override { }
0038     void notifyRestartPlacing(Sea::Player) override { }
0039 
0040 private Q_SLOTS:
0041     void getShoot();
0042 };
0043 
0044 
0045 #endif // AIENTITY_H
0046