Closed richelbilderbeek closed 5 years ago
Is your feature request related to a problem? Please describe.
I've never observed a use of a null-type tile_type.
tile_type
Take for example this line:
tile_type get_merge_type(tile_type type1, tile_type type2) noexcept { // ... // Cannot find it return tile_type::nonetile; }
The line above indicates that no tile type exists,
A superior way to indicate the same:
std::vector<tile_type> get_merge_type(tile_type type1, tile_type type2) noexcept
The std::vector will be empty if there is no tile_type.
I suggest to do ourselves a favour and remove tile_type::nonetile.
tile_type::nonetile
Describe the solution you'd like
Remove tile_type::nonetile. When a null-tile_tyoe is needed, use an empty std::vector<tile_type> instead.
std::vector<tile_type>
Describe alternatives you've considered
None.
Additional context
Replace the usages with grassland
partially done, richel will finish it.
Finished @Enzo9's work :shipit:!
Is your feature request related to a problem? Please describe.
I've never observed a use of a null-type
tile_type
.Take for example this line:
The line above indicates that no tile type exists,
A superior way to indicate the same:
The std::vector will be empty if there is no
tile_type
.I suggest to do ourselves a favour and remove
tile_type::nonetile
.Describe the solution you'd like
Remove
tile_type::nonetile
. When a null-tile_tyoe is needed, use an emptystd::vector<tile_type>
instead.Describe alternatives you've considered
None.
Additional context
None.