MAPG-235 refactor: renamed fields in challenge related tables

This commit is contained in:
balazs committed 2021-05-16 13:14:00 +02:00
1 parent 7a1674fdd0
commit 7792f1c3ff
8 files changed
+36 -38

No files matched your search

+5 -5
View File
@@ -113,7 +113,7 @@ class GameController
$challenge->setCreatedDate(new DateTime());
if($this->request->post('timerEnabled') !== null && $this->request->post('timeLimit') !== null) {
$challenge->setTimerSec($this->request->post('timeLimit'));
$challenge->setTimeLimit($this->request->post('timeLimit'));
}
if($this->request->post('noMove') !== null) {
$challenge->setNoMove(true);
@@ -135,7 +135,7 @@ class GameController
$userInChallenge = new UserInChallenge();
$userInChallenge->setUserId($userId);
$userInChallenge->setChallenge($challenge);
$userInChallenge->setTimeLeft($challenge->getTimerSec());
$userInChallenge->setTimeLeft($challenge->getTimeLimit());
$userInChallenge->setIsOwner(true);
$this->pdm->saveToDb($userInChallenge);
@@ -147,12 +147,12 @@ class GameController
$places = $this->placeRepository->getRandomNPlaces($mapId, static::NUMBER_OF_ROUNDS, $userId);
$order = 1;
$round = 0;
foreach ($places as $place) {
$placeInChallenge = new PlaceInChallenge();
$placeInChallenge->setPlace($place);
$placeInChallenge->setChallenge($challenge);
$placeInChallenge->setOrder($order++);
$placeInChallenge->setRound($round++);
$this->pdm->saveToDb($placeInChallenge);
}
@@ -246,7 +246,7 @@ class GameController
$userInChallenge = new UserInChallenge();
$userInChallenge->setUserId($userId);
$userInChallenge->setChallenge($challenge);
$userInChallenge->setTimeLeft($challenge->getTimerSec());
$userInChallenge->setTimeLeft($challenge->getTimeLimit());
$this->pdm->saveToDb($userInChallenge);
}