|
|
@ -98,8 +98,12 @@ public class ServiceController : WebApiController
|
|
|
|
if (userId is not null && view == -1 || userId is null) // ?????? this game makes no sense dude
|
|
|
|
if (userId is not null && view == -1 || userId is null) // ?????? this game makes no sense dude
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var factor = view == -1 ? 0 : view;
|
|
|
|
var factor = view == -1 ? 0 : view;
|
|
|
|
Console.WriteLine($"factor={factor}");
|
|
|
|
if (factor > 0 && JewelDbContext.Scores.Count() < 11)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
response = "";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
var globalRanking = JewelDbContext.Scores
|
|
|
|
var globalRanking = JewelDbContext.Scores
|
|
|
|
.Find(e => e.GameMode == mode)
|
|
|
|
.Find(e => e.GameMode == mode)
|
|
|
|
.OrderByDescending(e => e.Points)
|
|
|
|
.OrderByDescending(e => e.Points)
|
|
|
@ -113,6 +117,7 @@ public class ServiceController : WebApiController
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
foreach (var score in globalRanking) response += score.ToString();
|
|
|
|
foreach (var score in globalRanking) response += score.ToString();
|
|
|
|
|
|
|
|
}
|
|
|
|
} else // personal ranking
|
|
|
|
} else // personal ranking
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var personalRanking = JewelDbContext.Scores
|
|
|
|
var personalRanking = JewelDbContext.Scores
|
|
|
|