implemented central Game class

This commit is contained in:
devZoGok
2023-10-08 15:08:45 +03:00
parent e8432da24e
commit b895a85378
26 changed files with 174 additions and 125 deletions
+2 -1
View File
@@ -5,6 +5,7 @@
#include "console.h"
#include "addUnitCommand.h"
#include "inGameAppState.h"
#include "game.h"
#include "player.h"
#include "gameObjectFactory.h"
@@ -47,7 +48,7 @@ namespace battleship{
}
void AddUnitCommand::addUnit(){
Player* player = Map::getSingleton()->getPlayer(playerId);
Player* player = Game::getSingleton()->getPlayer(playerId);
player->addUnit(GameObjectFactory::createUnit(player, unitId, pos, rot));
}