コード例 #1
0
        private string GetNextStep(CharacterInfoDto player)
        {
            using (new TerminalColor(ConsoleColor.Cyan))
                Terminal.WriteLine(player.TaskDescription);
            Terminal.WriteLine();

            Terminal.WriteLine("These are your choices:");
            foreach (var choice in player.Choices)
            {
                using (new TerminalColor(ConsoleColor.Yellow))
                    Terminal.WriteLine("{0}: {1}", choice.Code, choice.Text);
            }
            Terminal.WriteLine();
            Terminal.Write("What do you want to do: ");
            return Terminal.ReadLine();
        }
コード例 #2
0
 private void PrintPlayerStatus(CharacterInfoDto player)
 {
     Terminal.WriteLine("{0} is alive. Health: {1}/{2}. Gold: {3}",
                        player.Name, player.Health, player.MaxHealth, player.Gold);
 }