refactored command execution

This commit is contained in:
devZoGok
2024-10-19 17:37:45 +03:00
parent e0b6550787
commit 9362e53c15
9 changed files with 30 additions and 51 deletions
+2 -7
View File
@@ -30,13 +30,8 @@ namespace battleship{
return;
}
void AddTechnologyCommand::addTechnology(){
void AddTechnologyCommand::execute(){
AbstractCommand::execute();
Game::getSingleton()->getPlayer(playerId)->addTechnology(techId);
}
void AddTechnologyCommand::execute(){
AbstractCommand::handle();
validate();
addTechnology();
}
}