27 lines
388 B
C++
27 lines
388 B
C++
|
//
|
||
|
// Created by max on 26.04.23.
|
||
|
//
|
||
|
|
||
|
#include <utility>
|
||
|
|
||
|
#include "game.h"
|
||
|
|
||
|
Game::Game(std::shared_ptr<Renderer> renderer) : renderer(std::move(renderer)) {
|
||
|
}
|
||
|
|
||
|
void Game::run() {
|
||
|
if (isRunning) {
|
||
|
Logger::debug("Game is already running", "Game::run");
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
isRunning = true;
|
||
|
while (isRunning) {
|
||
|
|
||
|
}
|
||
|
}
|
||
|
|
||
|
void Game::stop() {
|
||
|
isRunning = false;
|
||
|
}
|