1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-05-21 22:33:43 +02:00
vcmi/lib/callback/IClient.h
Ivan Savenko 2c17c2d5b7 Rework CCallback <-> CClient interaction
- callback is now part of lib instead of weird class that is shared by
client and AI while being part of client
- callback interacts with client class via minimal interface class
- removed no longer used unlockGsWhileWaiting field
2025-05-12 22:07:10 +03:00

29 lines
738 B
C++

/*
* IClient.h, part of VCMI engine
*
* Authors: listed in file AUTHORS in main folder
*
* License: GNU General Public License v2.0 or later
* Full text of license available in license.txt file, in main folder
*
*/
#pragma once
VCMI_LIB_NAMESPACE_BEGIN
class BattleID;
class BattleAction;
class BattleStateInfoForRetreat;
class PlayerColor;
struct CPackForServer;
class DLL_LINKAGE IClient
{
public:
virtual std::optional<BattleAction> makeSurrenderRetreatDecision(PlayerColor player, const BattleID & battleID, const BattleStateInfoForRetreat & battleState) = 0;
virtual int sendRequest(const CPackForServer & request, PlayerColor player, bool waitTillRealize) = 0;
virtual ~IClient() = default;
};
VCMI_LIB_NAMESPACE_END