//
// Created by Dan Crosby on 4/6/21.
//

#ifndef EAGLE0_GAMEUPDATERECEIVER_HPP
#define EAGLE0_GAMEUPDATERECEIVER_HPP

#include "src/main/protobuf/net/eagle0/shardok/api/action_result_view.pb.h"

namespace shardok {
using std::vector;

class GameUpdateReceiver {
private:
    const long identifier;

    static std::atomic_long nextId;

public:
    GameUpdateReceiver() : identifier(nextId++) {}

    virtual ~GameUpdateReceiver() = default;
    virtual void ReceiveActionResult(const net::eagle0::shardok::api::ActionResultView& result) = 0;
    virtual void ReceiveActionResults(
            const vector<net::eagle0::shardok::api::ActionResultView>& results) = 0;

    [[nodiscard]] auto GetIdentifier() const -> long { return identifier; }
};
}  // namespace shardok

#endif  // EAGLE0_GAMEUPDATERECEIVER_HPP
