-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DmsObject put in DmsGame and serialization
- Loading branch information
Showing
8 changed files
with
107 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#include "DmsGame.h" | ||
|
||
DmsGame::DmsGame() { | ||
constants = new DmsObject(); | ||
players = new DmsObject(); | ||
enemies = new DmsObject(); | ||
encounters = new DmsObject(); | ||
scenarios = new DmsObject(); | ||
} | ||
|
||
|
||
DmsGame::~DmsGame() { | ||
} | ||
|
||
std::string DmsGame::serialize() { | ||
return "\nCONSTANTS: \n" + constants->serialize() + | ||
"\nPLAYERS: \n" + players->serialize() + | ||
"\nENEMIES: \n" + enemies->serialize() + | ||
"\nENCOUNTERS: \n" + encounters->serialize() + | ||
"\nSCENARIOS: \n" + scenarios->serialize(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#pragma once | ||
|
||
#include "DmsObject.h" | ||
|
||
class DmsGame { | ||
public: | ||
DmsGame(); | ||
~DmsGame(); | ||
|
||
// TODO - Choose serialize or compile or both and choose type str/byte[]... | ||
std::string serialize(); | ||
std::string compile(); | ||
|
||
DmsObject *constants; | ||
DmsObject *players; | ||
DmsObject *enemies; | ||
DmsObject *encounters; | ||
DmsObject *scenarios; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters