Creating easily objects

This commit is contained in:
Pcornat 2024-10-30 16:43:07 +01:00
parent f7862f09f9
commit 0b2467475a
Signed by: Pcornat
GPG key ID: E0326CC678A00BDD
2 changed files with 3 additions and 22 deletions

View file

@ -165,12 +165,4 @@ namespace character {
return sackOfGrain;
}
}
billyObjects new_object(const billyEnums &inputObject) noexcept {
return std::visit(overloaded{
[](const weapons input) { return billyObjects{ new Weapons{ input }}; },
[](const equipments input) { return billyObjects{ new Equipments{ input }}; },
[](const tools input) { return billyObjects{ new Tools{ input }}; }
}, inputObject);
}
}