Commit 9da6f14d authored by arnaudbey's avatar arnaudbey
Browse files

decrease threshold and make ppl play the more filled grids first

parent 8f211eec
......@@ -26,7 +26,8 @@ class GameRepository extends \Doctrine\ORM\EntityRepository
WHERE a.round = r
AND a.player = :user
)
AND SIZE(g.foundableForms) > 200";
AND SIZE(g.foundableForms) > 150
ORDER BY SIZE(g.foundableForms) DESC";
$query = $em->createQuery($dql);
$query->setParameter('user', $user)
......
......@@ -56,7 +56,7 @@ class GridRepository extends \Doctrine\ORM\EntityRepository
$em = $this->_em;
$dql = "SELECT grid FROM MagicWordBundle\Entity\Grid grid
WHERE grid.language = :language
AND SIZE(grid.foundableForms) > 250
AND SIZE(grid.foundableForms) > 150
AND NOT EXISTS (
SELECT round FROM MagicWordBundle\Entity\Round round
INNER JOIN round.game game
......@@ -79,7 +79,8 @@ class GridRepository extends \Doctrine\ORM\EntityRepository
WHERE a.round = r
AND r.grid = grid
AND a.player = :player
)";
)
ORDER BY SIZE(grid.foundableForms) DESC";
$query = $em->createQuery($dql);
$query->setParameter('player', $player)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment