Trouble with C# Random class
问题 I've got a class that represents a coin, which can be flipped with the Coin.Flip() method. Flip() uses random.Next(2); to get either a 0 or a 1 representing heads or tails. This works good.. sort of. For the program, I need to have 2 coins, which I make, lets say coin1 and coin2. coin2 always needs to be flipped straight after coin1, which I can do with: coin1.Flip(); coin2.Flip(); That should work, right? Well it doesn't! Every time I run those two lines of code, both coins end up with the