implemented toggle-debug command

This commit is contained in:
devZoGok
2024-10-19 17:22:25 +03:00
parent 272417666e
commit e0b6550787
6 changed files with 53 additions and 14 deletions
+16
View File
@@ -0,0 +1,16 @@
#include "toggleDebugCommand.h"
#include "game.h"
namespace battleship{
void ToggleDebugCommand::validate(){
if(!arguments.empty()) return;
}
void ToggleDebugCommand::execute(){
AbstractCommand::handle();
validate();
Game *game = Game::getSingleton();
game->setDebug(!game->isDebug());
}
}