mirror of
https://github.com/devZoGok/PlanetFleet.git
synced 2026-08-26 19:43:29 +00:00
implemented toggle-debug command
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user