At the moment I am making a simple pong game in my tenth grade high school class. It is already much more advanced than any of the other projects that people are working on and I will get an A no matter what, but I still have a problem that is annoying me. This is my general declaration code
Public Class Form1
Dim compScore As Integer = 0
Dim plrScore As Integer = 0
Dim speed As Single = 21
Dim rndInst As New Random()
Dim xVel As Single = Math.Cos(rndInst.Next(5, 10)) * speed
Dim yVel As Single = Math.Sin(rndInst.Next(5, 10)) * speed
I want to te be able to reset the angle after each time either the computer or the player scores. I can not figure out a way to do this without reseting my entire program. Any help?