Пример #1
0
        private static string MoveTooLate(string s)
        {
            var args = s.Split();
            var a1   = int.Parse(args[2]);
            var p1   = ColorMaker.GetColoredText(players[a1], colors[a1]);

            return($"{p1} sends move too late");
        }
Пример #2
0
        private static string InvalidMove(string s)
        {
            var args = s.Split();
            var a1   = int.Parse(args[2]);
            var p1   = ColorMaker.GetColoredText(players[a1], colors[a1]);

            return($"{p1} sends invalid move");
        }
Пример #3
0
        private static string SendMove(string s)
        {
            var args          = s.Split();
            int num           = int.Parse(args[2]);
            var coloredPlayer = ColorMaker.GetColoredText(players[num], colors[num]);

            return($"{coloredPlayer} goes {direction[int.Parse(args[3])]}");
        }
Пример #4
0
        private static string Kill(string s)
        {
            var args = s.Split();
            var a1   = int.Parse(args[2]);
            var a2   = int.Parse(args[3]);
            var p1   = ColorMaker.GetColoredText(players[a1], colors[a1]);
            var p2   = ColorMaker.GetColoredText(players[a2], colors[a2]);

            return($"{p1} killed {p2}");
        }
Пример #5
0
 private static void DrawPlayers()
 {
     tmpro.text = "";
     for (var i = 0; i < pTab.Length; ++i)
     {
         tmpro.text += ColorMaker.GetColoredText(pTab[i],
                                                 alive[i] ? cTab[i] : deadColors[i]
                                                 ) + '\n';
     }
 }