// WARN; Cannot download dependency modules from internet during sandbox testing!

using System;
using System.Linq;

class Script
{
    public static int Main(string[] extraWords, string word = "clue", int highNumberThreshold = 50)
    {
        Console.WriteLine("Hello, World!");

        Console.WriteLine("Your chosen words are:");

        string[] newWordArray = extraWords.Concat(new[] { word }).ToArray();

        foreach (var s in newWordArray)
        {
            Console.WriteLine($"  {s}");
        }

        var random = new Random();
        int randomNumber = random.Next(1, 101);

        Console.WriteLine($"Random number: {randomNumber}");

        string greeting = randomNumber > highNumberThreshold ? "High number!" : "Low number!";
        greeting += " (according to the threshold parameter)";
        Console.WriteLine(greeting);

        var timespan = TimeSpan.FromMinutes(90);
        Console.WriteLine($"Timespan: {timespan}");

        int number = 123;
        Console.WriteLine($"Number: {number}");

        var date = DateTime.UtcNow.AddDays(-3);
        Console.WriteLine($"Date: {date}");
        return 2;
    }
}
