Added documentation examples and covered an edge case

This commit is contained in:
Anon 2023-07-16 20:45:24 +02:00
parent fe5f07306d
commit c5a0409edc
4 changed files with 39 additions and 2 deletions

View file

@ -218,6 +218,12 @@ namespace MinecraftClient.ChatBots
{
var min = Convert.ToInt32(parts[0]);
var max = Convert.ToInt32(parts[1]);
if (min > max)
{
(min, max) = (max, min);
LogToConsole(Translations.cmd_wait_random_min_bigger);
}
ticks = new Random().Next(min, max);
} else ticks = Convert.ToInt32(instruction_line[5..]);