//
// Created by Dan Crosby on 12/24/21.
//

#include "TerrainHelpers.hpp"

#include "TileModifierHelpers.hpp"

namespace shardok::fb {

auto ToTerrainProto(const Terrain* terrain) -> TerrainProto {
    TerrainProto terrainProto = {};
    terrainProto.set_type(static_cast<net::eagle0::shardok::common::Terrain_Type>(terrain->type()));

    *terrainProto.mutable_modifier() = ToTileModifierProto(terrain->modifier());

    return terrainProto;
}

}  // namespace shardok::fb