mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2026-01-05 09:39:32 -08:00
Use common library in 86_Target
This commit is contained in:
@@ -1,12 +1,10 @@
|
||||
using System;
|
||||
using Games.Common.Randomness;
|
||||
|
||||
namespace Target
|
||||
{
|
||||
internal static class RandomExtensions
|
||||
{
|
||||
public static float NextFloat(this Random rnd) => (float)rnd.NextDouble();
|
||||
|
||||
public static Point NextPosition(this Random rnd) => new (
|
||||
public static Point NextPosition(this IRandom rnd) => new (
|
||||
Angle.InRotations(rnd.NextFloat()),
|
||||
Angle.InRotations(rnd.NextFloat()),
|
||||
100000 * rnd.NextFloat() + rnd.NextFloat());
|
||||
|
||||
Reference in New Issue
Block a user