Skip to content

Commit

Permalink
Moved data files to model. Need to add gitignore. Added class for man…
Browse files Browse the repository at this point in the history
…aging data
  • Loading branch information
acrodemocide committed Sep 1, 2020
1 parent 5ab1ce9 commit 0c9e598
Show file tree
Hide file tree
Showing 31 changed files with 80 additions and 49 deletions.
Binary file modified Risk/.vs/Risk/v15/.suo
Binary file not shown.
Binary file modified Risk/.vs/Risk/v15/Browse.VC.db
Binary file not shown.
Binary file modified Risk/.vs/Risk/v15/ipch/AutoPCH/104a2ab354d1f0dd/CONTINENT.ipch
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified Risk/.vs/Risk/v15/ipch/AutoPCH/a68c4ecb24a4f4bb/TERRITORY.ipch
Binary file not shown.
Binary file modified Risk/Debug/Risk.exe
Binary file not shown.
Binary file modified Risk/Debug/Risk.ilk
Binary file not shown.
Binary file modified Risk/Debug/Risk.pdb
Binary file not shown.
11 changes: 0 additions & 11 deletions Risk/Risk/Continent.cpp

This file was deleted.

5 changes: 1 addition & 4 deletions Risk/Risk/Debug/Risk.log
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
 Continent.cpp
Source.cpp
Territory.cpp
Generating Code...
 Source.cpp
Risk.vcxproj -> D:\MyFiles\git\Risk\Risk\Debug\Risk.exe
Binary file modified Risk/Risk/Debug/Risk.tlog/CL.command.1.tlog
Binary file not shown.
Binary file modified Risk/Risk/Debug/Risk.tlog/CL.read.1.tlog
Binary file not shown.
Binary file modified Risk/Risk/Debug/Risk.tlog/CL.write.1.tlog
Binary file not shown.
Binary file modified Risk/Risk/Debug/Risk.tlog/link.command.1.tlog
Binary file not shown.
Binary file modified Risk/Risk/Debug/Risk.tlog/link.read.1.tlog
Binary file not shown.
Binary file modified Risk/Risk/Debug/Risk.tlog/link.write.1.tlog
Binary file not shown.
Binary file modified Risk/Risk/Debug/Source.obj
Binary file not shown.
Binary file modified Risk/Risk/Debug/vc141.idb
Binary file not shown.
Binary file modified Risk/Risk/Debug/vc141.pdb
Binary file not shown.
19 changes: 19 additions & 0 deletions Risk/Risk/GameBoard.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#include "GameBoard.h"

void GameBoard::InitializeBoard()
{
// TODO: implement
int i = 0;
}

// TODO: Determine if the initializer list here is necessary -- we may be able to forgo this
GameBoard::GameBoard() : _continents()
{
InitializeBoard();
}

Continent GameBoard::getContinent(string name)
{
// TODO: implement
return _continents[0];
}
16 changes: 16 additions & 0 deletions Risk/Risk/GameBoard.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#pragma once
using namespace std;
#include <vector>
#include <string>

#include "Model\Continent.h"

class GameBoard
{
private:
vector<Continent> _continents;
void InitializeBoard();
public:
GameBoard();
Continent getContinent(string name);
};
9 changes: 9 additions & 0 deletions Risk/Risk/Model/Army.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#pragma once
#include <string>
using namespace std;

struct Army
{
enum _team {RED, GREEN, BLUE, BLACK, YELLOW};
int _numberOfTroops;
};
6 changes: 1 addition & 5 deletions Risk/Risk/Continent.h → Risk/Risk/Model/Continent.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,8 @@ using namespace std;

#include "Territory.h"

class Continent
struct Continent
{
private:
string _name;
vector<Territory> _territories;
public:
Continent(string name);
string getName();
};
11 changes: 11 additions & 0 deletions Risk/Risk/Model/Territory.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#pragma once
using namespace std;
#include <string>

#include "Army.h"

struct Territory
{
string _name;
Army _occupyingArmy;
};
5 changes: 3 additions & 2 deletions Risk/Risk/Risk.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,13 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="Continent.cpp" />
<ClCompile Include="GameBoard.cpp" />
<ClCompile Include="Source.cpp" />
<ClCompile Include="Territory.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="Army.h" />
<ClInclude Include="Continent.h" />
<ClInclude Include="GameBoard.h" />
<ClInclude Include="Territory.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
Expand Down
16 changes: 11 additions & 5 deletions Risk/Risk/Risk.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,29 @@
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
<Filter Include="Header Files\Model">
<UniqueIdentifier>{ecc04aa2-6eab-4b97-a3ef-354497aeaeda}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="Source.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Continent.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Territory.cpp">
<ClCompile Include="GameBoard.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="Army.h">
<Filter>Header Files\Model</Filter>
</ClInclude>
<ClInclude Include="Continent.h">
<Filter>Header Files</Filter>
<Filter>Header Files\Model</Filter>
</ClInclude>
<ClInclude Include="Territory.h">
<Filter>Header Files\Model</Filter>
</ClInclude>
<ClInclude Include="GameBoard.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
Expand Down
9 changes: 4 additions & 5 deletions Risk/Risk/Source.cpp
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
using namespace std;
#include <iostream>
#include <string>
#include <map>

#include "Continent.h"
#include "Model/Continent.h"

int main()
{
Continent continent("Africa");
string name = continent.getName();
Continent continent;
continent._name = "Africa";

cout << "Hello World!" << endl;
cout << "name: " << name << endl;
cout << "name: " << continent._name << endl;
return 0;
}
11 changes: 0 additions & 11 deletions Risk/Risk/Territory.cpp

This file was deleted.

11 changes: 5 additions & 6 deletions Risk/Risk/Territory.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
#pragma once
#include <string>
using namespace std;
#include <string>

#include "Army.h"

class Territory
struct Territory
{
private:
string _name;
public:
Territory(string name);
string getName();
Army _occupyingArmy;
};

0 comments on commit 0c9e598

Please sign in to comment.