using System.Globalization;
namespace Godosa.Core.Runs;
/// The shared digest stdout line: digest <frame> <game seconds 0.###> <16 hex>.
public static class DigestLine
{
public static string Format(long frame, double gameSeconds, ulong hash) =>
string.Create(CultureInfo.InvariantCulture, $"digest {frame} {gameSeconds:0.###} {hash:x16}");
/// Every frames (frame 0 and every ≤ 0 never).
public static bool Due(long frame, int every) => every > 0 && frame > 0 && frame % every == 0;
}