mirror of
https://github.com/nolen777/eagle0.git
synced 2026-07-29 01:35:42 +00:00
Qualify vectors in hex map helpers (#7743)
* Qualify vectors in hex map helpers * Qualify ZOC vector parameters
This commit is contained in:
@@ -20,10 +20,10 @@ namespace shardok {
|
||||
|
||||
using Terrain = net::eagle0::shardok::storage::fb::Terrain;
|
||||
|
||||
const vector<Coords> ADJACENT_TILE_MODS_EVEN_ROW =
|
||||
const std::vector<Coords> ADJACENT_TILE_MODS_EVEN_ROW =
|
||||
{Coords(-1, 0), Coords(0, 1), Coords(1, 0), Coords(1, -1), Coords(0, -1), Coords(-1, -1)};
|
||||
|
||||
const vector<Coords> ADJACENT_TILE_MODS_ODD_ROW =
|
||||
const std::vector<Coords> ADJACENT_TILE_MODS_ODD_ROW =
|
||||
{Coords(-1, 1), Coords(0, 1), Coords(1, 1), Coords(1, 0), Coords(0, -1), Coords(-1, 0)};
|
||||
|
||||
auto AllCastleCoords(const HexMap *hexMap) -> CoordsSet {
|
||||
@@ -78,7 +78,7 @@ auto HasForestAccess(
|
||||
const Coords &coords,
|
||||
const Units *units,
|
||||
const HexMap *hexMap,
|
||||
const vector<PlayerId> &allyPids,
|
||||
const std::vector<PlayerId> &allyPids,
|
||||
const PlayerId player) -> bool {
|
||||
if (GetTerrain(hexMap, coords)->type() ==
|
||||
net::eagle0::shardok::storage::fb::Terrain_::Type_FOREST)
|
||||
@@ -176,8 +176,8 @@ auto HexMapUtils::GetAdjacentCoords(const HexMap *map, const Coords &origin) ->
|
||||
}
|
||||
|
||||
auto HexMapUtils::GetAdjacentTiles(const HexMap *map, const Coords &origin)
|
||||
-> vector<AdjacentTile> {
|
||||
vector<AdjacentTile> adjacentTiles{};
|
||||
-> std::vector<AdjacentTile> {
|
||||
std::vector<AdjacentTile> adjacentTiles{};
|
||||
|
||||
const auto &modifierSet =
|
||||
(origin.row() % 2 ? ADJACENT_TILE_MODS_ODD_ROW : ADJACENT_TILE_MODS_EVEN_ROW);
|
||||
@@ -196,7 +196,7 @@ auto HexMapUtils::GetAdjacentTiles(const HexMap *map, const Coords &origin)
|
||||
}
|
||||
|
||||
[[nodiscard]] auto GetTilesAcrossWater(const HexMap *map, const Coords &coords) -> CoordsSet {
|
||||
const vector<AdjacentTile> adjacentTiles = HexMapUtils::GetAdjacentTiles(map, coords);
|
||||
const std::vector<AdjacentTile> adjacentTiles = HexMapUtils::GetAdjacentTiles(map, coords);
|
||||
CoordsSet braveWaterTargets(map);
|
||||
|
||||
for (const AdjacentTile &adjacentTile : adjacentTiles) {
|
||||
@@ -678,9 +678,9 @@ auto KnownAdjacentEnemies(
|
||||
const PlayerId playerId,
|
||||
const Units *units,
|
||||
const HexMap *map,
|
||||
const vector<PlayerId> &allyPids,
|
||||
const Coords &coords) -> vector<const Unit *> {
|
||||
vector<const Unit *> knownAdjacentEnemies{};
|
||||
const std::vector<PlayerId> &allyPids,
|
||||
const Coords &coords) -> std::vector<const Unit *> {
|
||||
std::vector<const Unit *> knownAdjacentEnemies{};
|
||||
|
||||
for (const Coords &adjCoords : HexMapUtils::GetAdjacentCoords(map, coords)) {
|
||||
const auto *possibleEnemy = KnownEnemyOccupant(playerId, units, allyPids, adjCoords);
|
||||
@@ -693,7 +693,7 @@ auto KnownAdjacentEnemies(
|
||||
auto KnownEnemyOccupant(
|
||||
const PlayerId playerId,
|
||||
const Units *units,
|
||||
const vector<PlayerId> &allyPids,
|
||||
const std::vector<PlayerId> &allyPids,
|
||||
const Coords &coords) -> const Unit * {
|
||||
const auto *occupant = Occupant(units, coords);
|
||||
if (occupant) {
|
||||
|
||||
@@ -29,7 +29,6 @@ using Terrain = net::eagle0::shardok::storage::fb::Terrain;
|
||||
using UnitView = net::eagle0::shardok::api::UnitView;
|
||||
using Unit = net::eagle0::shardok::storage::fb::Unit;
|
||||
using Units = flatbuffers::Vector<const Unit *>;
|
||||
using std::vector;
|
||||
|
||||
struct alignas(16) AdjacentTile {
|
||||
HexMapDirection directionTo;
|
||||
@@ -59,7 +58,7 @@ public:
|
||||
-> const CoordsSet &;
|
||||
|
||||
[[nodiscard]] static auto GetAdjacentTiles(const HexMap *map, const Coords &coords)
|
||||
-> vector<AdjacentTile>;
|
||||
-> std::vector<AdjacentTile>;
|
||||
|
||||
[[nodiscard]] static auto LineIsBlockedByMountains(
|
||||
const HexMap *map,
|
||||
@@ -78,7 +77,7 @@ auto HasForestAccess(
|
||||
const Coords &coords,
|
||||
const Units *units,
|
||||
const HexMap *hexMap,
|
||||
const vector<PlayerId> &allyPids,
|
||||
const std::vector<PlayerId> &allyPids,
|
||||
PlayerId player) -> bool;
|
||||
|
||||
auto GetTerrain(const HexMap *map, const Coords &coords) -> const Terrain *;
|
||||
@@ -124,10 +123,10 @@ static inline auto Occupant(const Units &units, const Coords &coords) -> const U
|
||||
}
|
||||
|
||||
static inline auto Occupants(
|
||||
const vector<const Unit *> &units,
|
||||
const std::vector<const Unit *> &units,
|
||||
const int rowCount,
|
||||
const int columnCount) -> vector<const Unit *> {
|
||||
vector<const Unit *> positions(rowCount * columnCount);
|
||||
const int columnCount) -> std::vector<const Unit *> {
|
||||
std::vector<const Unit *> positions(rowCount * columnCount);
|
||||
|
||||
for (const auto &unit : units) {
|
||||
if (unit->status() == net::eagle0::shardok::storage::fb::UnitStatus_NORMAL_UNIT) {
|
||||
@@ -142,8 +141,8 @@ static inline auto Occupants(
|
||||
static inline auto Occupants(
|
||||
const flatbuffers::Vector<const Unit *> &units,
|
||||
const int rowCount,
|
||||
const int columnCount) -> vector<const Unit *> {
|
||||
vector<const Unit *> positions(rowCount * columnCount);
|
||||
const int columnCount) -> std::vector<const Unit *> {
|
||||
std::vector<const Unit *> positions(rowCount * columnCount);
|
||||
|
||||
for (const auto &unit : units) {
|
||||
if (unit->status() == net::eagle0::shardok::storage::fb::UnitStatus_NORMAL_UNIT) {
|
||||
@@ -155,7 +154,7 @@ static inline auto Occupants(
|
||||
return positions;
|
||||
}
|
||||
|
||||
static inline auto Occupant(const vector<const Unit *> &units, const Coords &coords)
|
||||
static inline auto Occupant(const std::vector<const Unit *> &units, const Coords &coords)
|
||||
-> const Unit * {
|
||||
for (const auto &unit : units) {
|
||||
if (unit->status() == net::eagle0::shardok::storage::fb::UnitStatus_NORMAL_UNIT &&
|
||||
@@ -208,7 +207,7 @@ auto Occupant(const UnitContainer &units, const Coords &coords) -> std::optional
|
||||
static inline auto FriendlyOccupant(
|
||||
const PlayerId pid,
|
||||
const Units *units,
|
||||
const vector<PlayerId> &allyPids,
|
||||
const std::vector<PlayerId> &allyPids,
|
||||
const Coords &coords) -> const Unit * {
|
||||
const auto *occupant = Occupant(units, coords);
|
||||
if (occupant) {
|
||||
@@ -225,7 +224,7 @@ template<class U, class UnitContainer>
|
||||
auto FriendlyOccupant(
|
||||
PlayerId pid,
|
||||
const UnitContainer &units,
|
||||
const vector<PlayerId> &allyPids,
|
||||
const std::vector<PlayerId> &allyPids,
|
||||
const Coords &coords) -> std::optional<U> {
|
||||
auto occupantOptional = Occupant(units, coords);
|
||||
if (occupantOptional.has_value()) {
|
||||
@@ -241,14 +240,14 @@ auto FriendlyOccupant(
|
||||
auto KnownEnemyOccupant(
|
||||
PlayerId playerId,
|
||||
const Units *units,
|
||||
const vector<PlayerId> &allyPids,
|
||||
const std::vector<PlayerId> &allyPids,
|
||||
const Coords &coords) -> const Unit *;
|
||||
|
||||
template<class UnitContainer>
|
||||
auto KnownEnemyOccupant(
|
||||
PlayerId playerId,
|
||||
const UnitContainer &units,
|
||||
const vector<PlayerId> &allyPids,
|
||||
const std::vector<PlayerId> &allyPids,
|
||||
const Coords &coords) -> std::optional<typename UnitContainer::value_type> {
|
||||
auto occupantOptional = Occupant(units, coords);
|
||||
if (occupantOptional.has_value()) {
|
||||
@@ -265,7 +264,7 @@ auto KnownEnemyOccupant(
|
||||
[[nodiscard]] static inline auto KnownOccupant(
|
||||
const PlayerId playerId,
|
||||
const Units *units,
|
||||
const vector<PlayerId> &allyPids,
|
||||
const std::vector<PlayerId> &allyPids,
|
||||
const Coords &coords) -> const Unit * {
|
||||
const auto *occupant = Occupant(units, coords);
|
||||
if (occupant) {
|
||||
@@ -282,8 +281,8 @@ auto KnownAdjacentEnemies(
|
||||
PlayerId playerId,
|
||||
const Units *units,
|
||||
const HexMap *map,
|
||||
const vector<PlayerId> &allyPids,
|
||||
const Coords &coords) -> vector<const Unit *>;
|
||||
const std::vector<PlayerId> &allyPids,
|
||||
const Coords &coords) -> std::vector<const Unit *>;
|
||||
|
||||
auto DirectionsTo(int columnCount, const Coords &origin, const Coords &destination)
|
||||
-> HexMapDirectionsTo;
|
||||
|
||||
@@ -121,7 +121,7 @@ auto AttackOrientationForAttack(
|
||||
const PlayerId playerId,
|
||||
const Units *units,
|
||||
const HexMap *hexMap,
|
||||
const vector<PlayerId> &allyPids) -> CoordsSet {
|
||||
const std::vector<PlayerId> &allyPids) -> CoordsSet {
|
||||
CoordsSet cs(hexMap); // NOLINT(readability-identifier-length)
|
||||
for (const Unit *unit : *units) {
|
||||
if (unit->status() != net::eagle0::shardok::storage::fb::UnitStatus_NORMAL_UNIT) continue;
|
||||
@@ -139,7 +139,7 @@ auto AttackOrientationForAttack(
|
||||
const PlayerId playerId,
|
||||
const Units *units,
|
||||
const HexMap *hexMap,
|
||||
const vector<PlayerId> &allyPids,
|
||||
const std::vector<PlayerId> &allyPids,
|
||||
const Coords &coords) -> bool {
|
||||
CoordsSet adjCoords = HexMapUtils::GetAdjacentCoords(hexMap, coords);
|
||||
return std::any_of(std::begin(adjCoords), std::end(adjCoords), [&](const Coords &adjCoords) {
|
||||
|
||||
@@ -27,14 +27,14 @@ ExertsZoneOfControl(const SettingsGetter &settings, const Unit *unit, PlayerId t
|
||||
PlayerId playerId,
|
||||
const Units *units,
|
||||
const HexMap *hexMap,
|
||||
const vector<PlayerId> &allyPids) -> CoordsSet;
|
||||
const std::vector<PlayerId> &allyPids) -> CoordsSet;
|
||||
|
||||
[[nodiscard]] auto IsInEnemyZoc(
|
||||
const SettingsGetter &settings,
|
||||
PlayerId playerId,
|
||||
const Units *units,
|
||||
const HexMap *hexMap,
|
||||
const vector<PlayerId> &allyPids,
|
||||
const std::vector<PlayerId> &allyPids,
|
||||
const Coords &coords) -> bool;
|
||||
|
||||
[[nodiscard]] auto AttackOrientationForAttack(
|
||||
|
||||
@@ -13,7 +13,7 @@ auto AddPlayerInfo(
|
||||
const int playerId,
|
||||
const bool isDefender,
|
||||
const int food) -> flatbuffers::Offset<net::eagle0::shardok::storage::fb::PlayerInfo> {
|
||||
vector<int8_t> victoryConditions{
|
||||
std::vector<int8_t> victoryConditions{
|
||||
net::eagle0::shardok::storage::fb::
|
||||
VictoryCondition_VICTORY_CONDITION_LAST_PLAYER_STANDING};
|
||||
if (isDefender) {
|
||||
@@ -34,7 +34,7 @@ auto AddPlayerInfo(
|
||||
const int playerId,
|
||||
const bool isDefender,
|
||||
const int food,
|
||||
vector<int8_t> victoryConditions)
|
||||
std::vector<int8_t> victoryConditions)
|
||||
-> flatbuffers::Offset<net::eagle0::shardok::storage::fb::PlayerInfo> {
|
||||
return AddPlayerInfo(fbb, playerId, isDefender, food, victoryConditions, {});
|
||||
}
|
||||
@@ -44,12 +44,12 @@ auto AddPlayerInfo(
|
||||
const int playerId,
|
||||
const bool isDefender,
|
||||
const int food,
|
||||
vector<int8_t> victoryConditions,
|
||||
vector<int> allyPids)
|
||||
std::vector<int8_t> victoryConditions,
|
||||
std::vector<int> allyPids)
|
||||
-> flatbuffers::Offset<net::eagle0::shardok::storage::fb::PlayerInfo> {
|
||||
const auto victoryConditionsOffset = fbb.CreateVector(victoryConditions);
|
||||
|
||||
auto alliesVec = vector<net::eagle0::shardok::storage::fb::AlliedPlayer>();
|
||||
auto alliesVec = std::vector<net::eagle0::shardok::storage::fb::AlliedPlayer>();
|
||||
for (int pid : allyPids) { alliesVec.emplace_back(pid); }
|
||||
const auto alliesOffset = fbb.CreateVectorOfStructs(alliesVec);
|
||||
|
||||
|
||||
@@ -10,14 +10,13 @@
|
||||
#define EAGLE0_TEST_SHARDOK_LIBRARY_GAME_START_TEST_DATA_HPP
|
||||
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
|
||||
#include "src/main/cpp/net/eagle0/shardok/library/ShardokCTypes.h"
|
||||
#include "src/main/flatbuffer/net/eagle0/shardok/storage/game_state.hpp"
|
||||
#include "src/main/flatbuffer/net/eagle0/shardok/storage/player_info.hpp"
|
||||
#include "src/main/flatbuffer/net/eagle0/shardok/storage/unit.hpp"
|
||||
|
||||
using std::vector;
|
||||
|
||||
static constexpr int MONTH = 4;
|
||||
|
||||
using GameState = net::eagle0::shardok::storage::fb::GameState;
|
||||
@@ -35,7 +34,7 @@ auto AddPlayerInfo(
|
||||
int playerId,
|
||||
bool isDefender,
|
||||
int food,
|
||||
vector<int8_t> victoryConditions)
|
||||
std::vector<int8_t> victoryConditions)
|
||||
-> flatbuffers::Offset<net::eagle0::shardok::storage::fb::PlayerInfo>;
|
||||
|
||||
auto AddPlayerInfo(
|
||||
@@ -43,8 +42,9 @@ auto AddPlayerInfo(
|
||||
int playerId,
|
||||
bool isDefender,
|
||||
int food,
|
||||
vector<int8_t> victoryConditions,
|
||||
vector<int> allyPids) -> flatbuffers::Offset<net::eagle0::shardok::storage::fb::PlayerInfo>;
|
||||
std::vector<int8_t> victoryConditions,
|
||||
std::vector<int> allyPids)
|
||||
-> flatbuffers::Offset<net::eagle0::shardok::storage::fb::PlayerInfo>;
|
||||
|
||||
auto AddGenericUnit(
|
||||
PlayerId playerId,
|
||||
|
||||
@@ -13,7 +13,7 @@ using MonthlyWeatherProto = net::eagle0::shardok::common::MonthlyWeather;
|
||||
using flatbuffers::FlatBufferBuilder;
|
||||
using flatbuffers::Offset;
|
||||
|
||||
auto AddStartingPositions(FlatBufferBuilder &fbb, const vector<Coords> &positions)
|
||||
auto AddStartingPositions(FlatBufferBuilder &fbb, const std::vector<Coords> &positions)
|
||||
-> Offset<net::eagle0::shardok::storage::fb::StartingPositionList> {
|
||||
const auto positionsOffset = fbb.CreateVectorOfStructs(positions);
|
||||
|
||||
@@ -27,7 +27,7 @@ auto CopyStartingPositions(
|
||||
FlatBufferBuilder &fbb,
|
||||
const net::eagle0::shardok::storage::fb::StartingPositionList *orig)
|
||||
-> Offset<net::eagle0::shardok::storage::fb::StartingPositionList> {
|
||||
vector<Coords> pos{};
|
||||
std::vector<Coords> pos{};
|
||||
pos.reserve(orig->positions()->size());
|
||||
|
||||
for (const auto &c : *orig->positions()) { pos.push_back(*c); }
|
||||
@@ -36,12 +36,12 @@ auto CopyStartingPositions(
|
||||
}
|
||||
|
||||
auto AddHexMap(FlatBufferBuilder &fbb, const HexMap *hm) -> flatbuffers::Offset<HexMap> {
|
||||
vector<net::eagle0::shardok::storage::fb::Terrain> terrainVec{};
|
||||
std::vector<net::eagle0::shardok::storage::fb::Terrain> terrainVec{};
|
||||
terrainVec.reserve(hm->terrain()->size());
|
||||
for (const auto *t : *hm->terrain()) { terrainVec.push_back(*t); }
|
||||
const auto terrainOffset = fbb.CreateVectorOfStructs(terrainVec);
|
||||
|
||||
vector<Offset<net::eagle0::shardok::storage::fb::StartingPositionList>> asplVec{};
|
||||
std::vector<Offset<net::eagle0::shardok::storage::fb::StartingPositionList>> asplVec{};
|
||||
asplVec.reserve(hm->attacker_starting_positions()->size());
|
||||
for (const auto *aspl : *hm->attacker_starting_positions()) {
|
||||
asplVec.push_back(CopyStartingPositions(fbb, aspl));
|
||||
@@ -49,7 +49,7 @@ auto AddHexMap(FlatBufferBuilder &fbb, const HexMap *hm) -> flatbuffers::Offset<
|
||||
const auto asplOffset = fbb.CreateVector(asplVec);
|
||||
const auto dsplOffset = CopyStartingPositions(fbb, hm->defender_starting_positions());
|
||||
|
||||
vector<net::eagle0::shardok::storage::fb::MonthlyWeather> mwVec{};
|
||||
std::vector<net::eagle0::shardok::storage::fb::MonthlyWeather> mwVec{};
|
||||
mwVec.reserve(hm->monthly_weather()->size());
|
||||
for (const auto *mw : *hm->monthly_weather()) { mwVec.push_back(*mw); }
|
||||
const auto mwOffset = fbb.CreateVectorOfStructs(mwVec);
|
||||
@@ -75,12 +75,12 @@ auto AddHexMap(
|
||||
FlatBufferBuilder &fbb,
|
||||
const MapIndex rowCount,
|
||||
const MapIndex columnCount,
|
||||
const vector<net::eagle0::shardok::storage::fb::Terrain_::Type> &terrainTypes,
|
||||
const vector<Coords> &defenderStart,
|
||||
const vector<vector<Coords>> &attackerStart,
|
||||
const vector<net::eagle0::shardok::storage::fb::MonthlyWeather> &monthlyWeathers)
|
||||
const std::vector<net::eagle0::shardok::storage::fb::Terrain_::Type> &terrainTypes,
|
||||
const std::vector<Coords> &defenderStart,
|
||||
const std::vector<std::vector<Coords>> &attackerStart,
|
||||
const std::vector<net::eagle0::shardok::storage::fb::MonthlyWeather> &monthlyWeathers)
|
||||
-> Offset<HexMap> {
|
||||
vector<net::eagle0::shardok::storage::fb::Terrain> terrainVec{};
|
||||
std::vector<net::eagle0::shardok::storage::fb::Terrain> terrainVec{};
|
||||
terrainVec.reserve(terrainTypes.size());
|
||||
for (const auto t : terrainTypes) {
|
||||
terrainVec.emplace_back(t, net::eagle0::shardok::storage::fb::TileModifier());
|
||||
@@ -92,7 +92,7 @@ auto AddHexMap(
|
||||
defStart.add_positions(defStartVecOffset);
|
||||
const auto defStartOffset = defStart.Finish();
|
||||
|
||||
vector<Offset<net::eagle0::shardok::storage::fb::StartingPositionList>> attStartVec = {};
|
||||
std::vector<Offset<net::eagle0::shardok::storage::fb::StartingPositionList>> attStartVec = {};
|
||||
attStartVec.reserve(attackerStart.size());
|
||||
for (const auto &aspl : attackerStart) {
|
||||
const auto asplOffset = fbb.CreateVectorOfStructs(aspl);
|
||||
@@ -161,10 +161,10 @@ void EmplaceHexMap(GameStateW &gameState, const HexMap *hexMap) {
|
||||
auto MakeHexMap(
|
||||
const MapIndex rowCount,
|
||||
const MapIndex columnCount,
|
||||
const vector<net::eagle0::shardok::storage::fb::Terrain_::Type> &terrainTypes,
|
||||
const vector<Coords> &defenderStart,
|
||||
const vector<vector<Coords>> &attackerStart,
|
||||
const vector<net::eagle0::shardok::storage::fb::MonthlyWeather> &monthlyWeathers)
|
||||
const std::vector<net::eagle0::shardok::storage::fb::Terrain_::Type> &terrainTypes,
|
||||
const std::vector<Coords> &defenderStart,
|
||||
const std::vector<std::vector<Coords>> &attackerStart,
|
||||
const std::vector<net::eagle0::shardok::storage::fb::MonthlyWeather> &monthlyWeathers)
|
||||
-> HexMapWrapper {
|
||||
FlatBufferBuilder fbb;
|
||||
fbb.ForceDefaults(true);
|
||||
@@ -183,10 +183,10 @@ auto MakeHexMap(
|
||||
auto MakeHexMapProto(
|
||||
const int rowCount,
|
||||
const int columnCount,
|
||||
const vector<TerrainTypeProto> &terrainTypes,
|
||||
const vector<Coords> &defenderStart,
|
||||
const vector<vector<Coords>> &attackerStart,
|
||||
const vector<MonthlyWeatherProto> &monthlyWeathers) -> HexMapProto {
|
||||
const std::vector<TerrainTypeProto> &terrainTypes,
|
||||
const std::vector<Coords> &defenderStart,
|
||||
const std::vector<std::vector<Coords>> &attackerStart,
|
||||
const std::vector<MonthlyWeatherProto> &monthlyWeathers) -> HexMapProto {
|
||||
HexMapProto hmp{};
|
||||
|
||||
hmp.set_row_count(rowCount);
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
#ifndef EAGLE0_TEST_SHARDOK_LIBRARY_HEX_MAP_TEST_HELPERS_HPP
|
||||
#define EAGLE0_TEST_SHARDOK_LIBRARY_HEX_MAP_TEST_HELPERS_HPP
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "src/main/cpp/net/eagle0/shardok/library/GameStateW.hpp"
|
||||
#include "src/main/cpp/net/eagle0/shardok/library/ShardokCTypes.h"
|
||||
#include "src/main/cpp/net/eagle0/shardok/library/fb_helpers/FlatbufferWrapper.hpp"
|
||||
@@ -26,8 +28,6 @@ using HexMapProto = net::eagle0::shardok::common::HexMap;
|
||||
using MonthlyWeatherProto = net::eagle0::shardok::common::MonthlyWeather;
|
||||
using TerrainTypeProto = net::eagle0::shardok::common::Terrain::Type;
|
||||
|
||||
using std::vector;
|
||||
|
||||
auto AddHexMap(flatbuffers::FlatBufferBuilder &fbb, const HexMap *hm)
|
||||
-> flatbuffers::Offset<HexMap>;
|
||||
|
||||
@@ -35,10 +35,10 @@ auto AddHexMap(
|
||||
flatbuffers::FlatBufferBuilder &fbb,
|
||||
MapIndex rowCount,
|
||||
MapIndex columnCount,
|
||||
const vector<net::eagle0::shardok::storage::fb::Terrain_::Type> &terrainTypes,
|
||||
const vector<Coords> &defenderStart,
|
||||
const vector<vector<Coords>> &attackerStart,
|
||||
const vector<net::eagle0::shardok::storage::fb::MonthlyWeather> &monthlyWeathers)
|
||||
const std::vector<net::eagle0::shardok::storage::fb::Terrain_::Type> &terrainTypes,
|
||||
const std::vector<Coords> &defenderStart,
|
||||
const std::vector<std::vector<Coords>> &attackerStart,
|
||||
const std::vector<net::eagle0::shardok::storage::fb::MonthlyWeather> &monthlyWeathers)
|
||||
-> flatbuffers::Offset<HexMap>;
|
||||
|
||||
void EmplaceHexMap(GameStateW &gameState, const HexMap *hexMap);
|
||||
@@ -46,19 +46,19 @@ void EmplaceHexMap(GameStateW &gameState, const HexMap *hexMap);
|
||||
auto MakeHexMap(
|
||||
MapIndex rowCount,
|
||||
MapIndex columnCount,
|
||||
const vector<net::eagle0::shardok::storage::fb::Terrain_::Type> &terrainTypes,
|
||||
const vector<Coords> &defenderStart,
|
||||
const vector<vector<Coords>> &attackerStart,
|
||||
const vector<net::eagle0::shardok::storage::fb::MonthlyWeather> &monthlyWeathers)
|
||||
const std::vector<net::eagle0::shardok::storage::fb::Terrain_::Type> &terrainTypes,
|
||||
const std::vector<Coords> &defenderStart,
|
||||
const std::vector<std::vector<Coords>> &attackerStart,
|
||||
const std::vector<net::eagle0::shardok::storage::fb::MonthlyWeather> &monthlyWeathers)
|
||||
-> HexMapWrapper;
|
||||
|
||||
auto MakeHexMapProto(
|
||||
int rowCount,
|
||||
int columnCount,
|
||||
const vector<TerrainTypeProto> &terrainTypes,
|
||||
const vector<Coords> &defenderStart,
|
||||
const vector<vector<Coords>> &attackerStart,
|
||||
const vector<MonthlyWeatherProto> &monthlyWeathers) -> HexMapProto;
|
||||
const std::vector<TerrainTypeProto> &terrainTypes,
|
||||
const std::vector<Coords> &defenderStart,
|
||||
const std::vector<std::vector<Coords>> &attackerStart,
|
||||
const std::vector<MonthlyWeatherProto> &monthlyWeathers) -> HexMapProto;
|
||||
|
||||
} // namespace shardok
|
||||
|
||||
|
||||
Reference in New Issue
Block a user