using System;
using System.Security.Cryptography;

namespace Terrabot
{
    /// <summary>
    /// This class is used for misc funtions of terrabot.
    /// </summary>
    public class TerraService
    {
        public int GetRand()
        {
            //This generates a random Int32 value
            RNGCryptoServiceProvider provider = new RNGCryptoServiceProvider();
            var byteArray = new byte[4];
            provider.GetBytes(byteArray);
            //convert 4 bytes to an integer
            return BitConverter.ToInt32(byteArray, 0);
        }
    }
}