//
// Created by dancrosby on 3/22/20.
//

#include "TileModifierWithCoords.hpp"

#include "src/main/cpp/net/eagle0/shardok/library/fb_helpers/TileModifierHelpers.hpp"

namespace shardok {
auto MakeTmc(const Coords &coordinates, const TileModifierProto &modifier)
        -> TileModifierWithCoords {
    net::eagle0::shardok::common::TileModifierWithCoords tmc;
    *tmc.mutable_coords() = ToCoordsProto(coordinates);
    *tmc.mutable_modifiers() = modifier;

    return tmc;
}

auto MakeTmc(
        const Coords &coordinates,
        const net::eagle0::shardok::storage::fb::TileModifier &modifier) -> TileModifierWithCoords {
    net::eagle0::shardok::common::TileModifierWithCoords tmc;
    *tmc.mutable_coords() = ToCoordsProto(coordinates);
    *tmc.mutable_modifiers() = fb::ToTileModifierProto(modifier);

    return tmc;
}

}  // namespace shardok