Server.PowerUp.randomizePosition C# (CSharp) Method

randomizePosition() public method

public randomizePosition ( ) : void
return void
        public void randomizePosition()
        {
            //Randomly place the powerup somewhere within the map boundaries
            Random random = new Random();
            this.x = random.Next(this.radius, MatchConfig.mapWidth+1-this.radius);
            this.y = random.Next(this.radius, MatchConfig.mapHeight+1-this.radius);
        }