Ejemplo n.º 1
0
        public static void SendCaHVoteInterface(this TSPlayer ts, CahGame cahGame)
        {
            if (cahGame.Judge == null)
            {
                cahGame.SetJudge();
            }

            string message = string.Join("\r\n",
                                         new string[]
            {
                RepeatSpaces(100),
                RepeatLineBreaks(10),
                "Cards against humanity",
                Utils.LineSegment,
                cahGame.Winner == null ? $"Waiting for the judge ({cahGame.Judge.Name}) to vote" : "",
                Utils.LineSegment,
                $"Winner of this round: {cahGame.Winner?.Name ??  ""}",
                SplitStringToFitScreen($"Question: {cahGame.Question}"),
                SplitStringToFitScreen($"Chosen answer: {cahGame.Winner?.GetCaHPlayer()?.Answer ?? ""}"),
                Utils.LineSegment,
                RepeatLineBreaks(50)
            });

            ts.SendData(PacketTypes.Status, message);
        }
Ejemplo n.º 2
0
 public static void Spectate(this TSPlayer ts, CahGame cahGame)
 {
     ts.GetCaHPlayer().Spectating = true;
     if (cahGame.Judge == ts)
     {
         cahGame.SetJudge();
     }
 }