Files
oop/labs/lab9/Igra/IgralnayaKost.cs
2025-09-30 08:21:09 +03:00

21 lines
306 B
C#

using System;
class IgralnayaKost
{
readonly Random r;
public event Action<int> MaxRolled;
public IgralnayaKost()
{
r = new Random();
}
public int random()
{
int res = r.Next(6) + 1;
if (res == 6) MaxRolled?.Invoke(res);
return res;
}
}