public void CalculateNewDegree(DegreeType type) { if (type != DegreeType) { movement.Degree = randomGenerator.GenerateDegree(type); DegreeType = type; } }
public Ball(IRandomGenerator randomGenerator) { this.randomGenerator = randomGenerator; Degree = randomGenerator.GenerateDegree(); Speed = 6; //randomGenerator.GenerateSpeed(); DirectionX = randomGenerator.GenerateDirection(); DirectionY = 1; }