Exemplo n.º 1
0
        private async Task ShowWelcome(Player player, Configuration.ShipSeller shipSeller)
        {
            var welcomeMessage = new StringBuilder($"Hi, I am {shipSeller.Name}.\nMy ships:\n");

            int index = 1;

            foreach (var shipInfo in shipSeller.ShipsForSale)
            {
                welcomeMessage.Append($"{index}. {shipInfo.DisplayName}: ${shipInfo.Price}\n");
                ++index;
            }

            await player.SendChatMessage(welcomeMessage.ToString());

            _traceSource.TraceInformation("Showed welcome for {0} to player {1}.", shipSeller.Name, player);
        }
Exemplo n.º 2
0
 private async Task ShowUsage(Player player, Configuration.ShipSeller shipSeller)
 {
     await player.SendChatMessage($"Usage: \"{_config.BuyShipCommand} (number between 1 and {shipSeller.ShipsForSale.Count})\"");
 }