Re: My FIRST Class!! But it doesn't work as expected - please HELP!



I have also noticed that instead of using Shared, if I rewrite the
New() constructor by adding the Randomize() command as below...

Public Sub New()
Randomize()
Me.Roll()
End Sub

and then consume 3 objects based on the Die Class,

Then use the same loop..

Dim One As New Die
Dim Two As New Die
Dim Three As New Die

Do

One.Display()
One.Roll()
Two.Display()
Two.Roll()
Three.Display()
Three.Roll()

Loop Until UCase(Console.ReadLine) = "Q"

That the results are not random between the die at all!! The numbers
either are 3 of a the same number OR a pair of numbers an other other
number - no exceptions. How very odd!

Now I AM confused, lol.

.



Relevant Pages