mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-25 12:25:10 -08:00
13 lines
271 B
C#
13 lines
271 B
C#
namespace Queen;
|
|
|
|
internal static class RandomExtensions
|
|
{
|
|
internal static Move NextMove(this IRandom random)
|
|
=> random.NextFloat() switch
|
|
{
|
|
> 0.6F => Move.Down,
|
|
> 0.3F => Move.DownLeft,
|
|
_ => Move.Left
|
|
};
|
|
}
|