@model SharedLibrary.Dtos.ServerInfo @{ Layout = null; int half = (int)Math.Ceiling(Model.ClientCount / 2.0); }
@{ for (int i = 0; i < half && i < Model.ChatHistory.Count; i++) { string message = "– " + @Model.ChatHistory[i].Message; if (Model.ChatHistory[i].Message == "CONNECTED") message = ""; else if (Model.ChatHistory[i].Message == "DISCONNECTED") message = ""; @Html.ActionLink(Model.Players[i].Name, "ProfileAsync", "Client", new { id = Model.Players[i].ClientId }, new { @class = "text-muted" }) @Html.Raw(@message)
} }
@{ for (int i = 0; i < half; i++) { @Html.ActionLink(Model.Players[i].Name, "ProfileAsync", "Client", new { id = Model.Players[i].ClientId })
} }
@{ for (int i = half; i < Model.ClientCount; i++) { @Html.ActionLink(Model.Players[i].Name, "ProfileAsync", "Client", new { id = Model.Players[i].ClientId })
} }