You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
629 B

using System;
namespace WebApplication1
{
public class RandomField : Field
{
public RandomField(int iCount)
{
Random rr = new Random();
for (int ii = 0; ii < iCount; ii++)
{
this.Figures.Add(new Figure()
{
FigureColor = rr.Next(2),
FigureType = rr.Next(1),
PosX = rr.Next(FigureMover.FieldXMin, FigureMover.FieldXMax),
PosY = rr.Next(FigureMover.FieldYMin, FigureMover.FieldYMax),
});
}
}
}
}