//
// Created by Dan Crosby on 4/5/20.
//

#include "WeatherHelpers.hpp"

net::eagle0::shardok::common::Weather::Wind MakeWind(
        const net::eagle0::shardok::common::HexMapDirection direction,
        const int32_t speedInMph) {
    net::eagle0::shardok::common::Weather::Wind wind{};
    wind.set_direction(direction);
    wind.set_speed_in_mph(speedInMph);
    return wind;
}

net::eagle0::shardok::common::Weather MakeWeather(
        const net::eagle0::shardok::common::Weather::Conditions conditions,
        net::eagle0::shardok::common::Weather::Wind wind) {
    net::eagle0::shardok::common::Weather w{};
    w.set_conditions(conditions);
    *w.mutable_wind() = wind;
    return w;
}

// Defining Dec, Jan, Feb to be Winter
auto MonthIsWinter(const int month) -> bool { return month == 12 || month == 1 || month == 2; }