Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/game engine #10

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

Feature/game engine #10

wants to merge 12 commits into from

Conversation

Selvan66
Copy link
Contributor

I think its final version of engine

-Add main game
-Add base class ModeGame
-Add mode class ClassicGame
-Add Player struct
-Add some docs
-docs
-testing main (for now)
-main class Game
-ModeGame (ClassicGame, RandomShotGame, ExtendClassicGame)
-struct Player
add json
add test
add GameSettings
changing in Game and ModeGame
-change main to only test
-transfer libs to test
-update docs
Copy link
Contributor

@delipl delipl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add doctest as a submodule and figure out why the deque does not include

-set in platformio.ini to use esp setup
-rename folder to DartEngine
-transfer nlohmann/json to lib folder
-change subfolder doctest to internal lib (for linux)
-little changes in Game and GameSettings
-corrent docs / add examples
-marge from main
Copy link
Contributor

@delipl delipl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about the doctest? Did you install this globally?

{
public:
ClassicGame();
virtual Player createPlayer(unsigned int id) const;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add override after overridden method's declaration?
I prefer to mark the override because then I don't have to scroll between files and check every method. It is simpler to read.

lib/DartEngine/ClassicGame.hpp Show resolved Hide resolved
@@ -0,0 +1,40 @@
#include <DartEngine/Game.hpp>

nlohmann::json save_settings = nlohmann::json::parse(R"({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I understand R"" prefix provides to create a multiline string yes? Am I right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's R"()" and you right.

Here is docs: https://en.cppreference.com/w/cpp/language/string_literal

@@ -0,0 +1 @@
include json.hpp before Arduino.h, because Arduino makes define some of variables which is use in json.hpp
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add the link to their repository?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what do you mean exactly?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just add this link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants