public override Platform CreatePlatform(double left, double top) { var id = Guid.NewGuid().ToString(); var platform = new StandardPlatform(id, left, top, 8); return(platform); }
public override Platform CreatePlatform(double left, double top) { var id = Guid.NewGuid().ToString(); var randomItemNumber = _rnd.Next(0, 10); Platform platform; switch (randomItemNumber) { case int n when(n <= 6): platform = new StandardPlatform(id, left, top, 8); break; case 7: platform = new SpringyPlatform(id, left, top, 8); break; default: platform = new FragilePlatform(id, left, top, 8); break; } return(platform); }
public CD1() { Platform = new StandardPlatform(); }