Skip to content

Commit

Permalink
feat: wrap it up
Browse files Browse the repository at this point in the history
  • Loading branch information
developer239 committed Dec 3, 2023
1 parent 6261c97 commit 14dc261
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,8 @@ $ ctest
$ cd build/src/apps/pong
$ ./AppPong
```

# Result

![part1](./example-input.png)
![part2](./input.png)
Binary file added example-input.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added input.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/apps/day3/src/strategies/ECSStrategy.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ class MinimalLoopStrategy : public Core::IStrategy {
ECS::Registry::Instance().AddComponent<RigidBodyComponent>(
puzzleSolverEntity1.value(),
300, 50,
Vec2(50, 50),
Vec2(500, 50),
true,
SDL_Color{0, 0, 255, 255},
true
Expand All @@ -161,7 +161,7 @@ class MinimalLoopStrategy : public Core::IStrategy {
ECS::Registry::Instance().AddComponent<RigidBodyComponent>(
puzzleSolverEntity2.value(),
300, 50,
Vec2(50, 100),
Vec2(500, 100),
true,
SDL_Color{0, 0, 255, 255},
true
Expand Down
2 changes: 1 addition & 1 deletion src/packages/core/core/Loop.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Loop {
double deltaTime = 0;
double fpsLimit = 60;

explicit Loop(std::vector<IStrategy*> strategies, int windowWidth = 800, int windowHeight = 600, const char *title = "CPP Starter");
explicit Loop(std::vector<IStrategy*> strategies, int windowWidth = 800, int windowHeight = 600, const char *title = "AoC 2023 Day 3");

void AddStrategy(IStrategy* strategy);

Expand Down
2 changes: 1 addition & 1 deletion src/packages/core/core/Window.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Window {
std::shared_ptr<SDL_Window> window;

public:
Window(int width = 800, int height = 600, const char *title = "CPP Starter");
Window(int width = 800, int height = 600, const char *title = "AoC 2023 Day 3");

std::shared_ptr<SDL_Window> Get();

Expand Down

0 comments on commit 14dc261

Please sign in to comment.