easier random game

This commit is contained in:
Thibault Duplessis 2014-01-05 12:02:43 +01:00
parent f44b3d008c
commit a86b36d5b8

View file

@ -195,8 +195,7 @@ trait GameRepo {
}
def random: Fu[Option[Game]] = $find.one(
Json.obj(F.playerUids -> $exists(true)),
_ sort Query.sortCreated skip (Random nextInt 1000)
$query.all sort Query.sortCreated skip (Random nextInt 100)
)
def findMirror(game: Game): Fu[Option[Game]] = $find.one($query(