//
// Created by Dan Crosby on 3/29/21.
//

#ifndef EAGLE0_UNITCONVERSIONS_HPP
#define EAGLE0_UNITCONVERSIONS_HPP

#include <vector>

#include "src/main/cpp/net/eagle0/shardok/library/ShardokCTypes.h"
#include "src/main/flatbuffer/net/eagle0/shardok/storage/unit.hpp"
#include "src/main/protobuf/net/eagle0/common/common_unit.pb.h"

namespace shardok {

using std::vector;
using Unit = net::eagle0::shardok::storage::fb::Unit;
using Hero = net::eagle0::shardok::storage::fb::Hero;
using Battalion = net::eagle0::shardok::storage::fb::Battalion;

auto ConvertBattalion(const net::eagle0::common::CommonBattalion &battalion) -> Battalion;

auto ConvertHero(const net::eagle0::common::CommonHero &hero) -> Hero;

auto ConvertUnit(
        const net::eagle0::common::CommonUnit &unit,
        PlayerId shardokPlayerId,
        const vector<PlayerId> &allPlayerIds) -> Unit;
}  // namespace shardok

#endif  // EAGLE0_UNITCONVERSIONS_HPP
