Petits tweaks

This commit is contained in:
Timothée Leclaire-Fournier 2024-01-18 23:56:02 -05:00
parent 421526ba66
commit c3d13d087e
7 changed files with 14 additions and 3 deletions

View File

@ -116,7 +116,7 @@ bool GOLTeamH::setRule(std::string const& rule)
return false; return false;
} }
void GOLTeamH::setBorderManagement(BorderManagement borderManagement) void GOLTeamH::setBorderManagement(GOL::BorderManagement borderManagement)
{ {
mBorderManagement = borderManagement; mBorderManagement = borderManagement;
mIteration = 0; mIteration = 0;

View File

@ -35,7 +35,7 @@ public:
private: private:
std::optional<std::string> mRule; std::optional<std::string> mRule;
std::optional<GOL::BorderManagement> mBorderManagement; std::optional<BorderManagement> mBorderManagement;
std::optional<IterationType> mIteration; std::optional<IterationType> mIteration;
Grid mData; Grid mData;

View File

@ -115,6 +115,8 @@
<ClCompile Include="main.cpp" /> <ClCompile Include="main.cpp" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="..\GOLAppLib\header\GOL.h" />
<QtMoc Include="..\GOLAppLib\header\GOLApp.h" />
<ClInclude Include="GOLTeamH.h" /> <ClInclude Include="GOLTeamH.h" />
<ClInclude Include="Grid.h" /> <ClInclude Include="Grid.h" />
</ItemGroup> </ItemGroup>

View File

@ -45,5 +45,13 @@
<ClInclude Include="GOLTeamH.h"> <ClInclude Include="GOLTeamH.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\GOLAppLib\header\GOL.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<QtMoc Include="..\GOLAppLib\header\GOLApp.h">
<Filter>Header Files</Filter>
</QtMoc>
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -7,7 +7,7 @@ Grid::Grid()
} }
Grid::Grid(size_t width, size_t height, CellType initValue) Grid::Grid(size_t width, size_t height, CellType initValue)
:mWidth{ width }, mHeight{ height }, mEngine(mRandomDevice), mDistribution(0.0, 1.0) :mWidth{ width }, mHeight{ height }, mEngine(mRandomDevice()), mDistribution(0.0, 1.0)
{ {
resize(width, height, initValue); resize(width, height, initValue);
} }

View File

@ -3,6 +3,7 @@
#include <algorithm> #include <algorithm>
#include <vector> #include <vector>
#include <random> #include <random>
#include "GOL.h" #include "GOL.h"
class Grid // Classe facilitant la gestion d'un tableau dynamique 2d. class Grid // Classe facilitant la gestion d'un tableau dynamique 2d.

BIN
GPA675Laboratoire1.pdf Normal file

Binary file not shown.