Dreamon
March 25th, 2003, 08:31 PM
I'm in startup phase of creating a Yatzee game in .NET, using Windows Forms and C#.
I apologize for moron-like questions here, but I'm a web programmer....
From what I understand, there is no such thing as a global variables (as in Visual Basic 6.....bas files) in .NET. Am I right?
Ok, if this is the case, how would I have to approach the situation in my game where I have to store players scores throughout a game? I suppose I can use the labels in my form, but this just seems like a pain in the butt, because then I have to go through all labels whenever I need to calculate total scores etc.
It would be nice to have an array of objects (Player objects) where I store a player's data (name, score, how many choices left, and so on). Also, what kind of game that has been chosen at startup (straight down, random) needs to be stored somewhere.
Would one possibility be using textfiles to store information for each player during a game (delete them when game is done)? Sounds to me like that would be a really screwed up way of doing it though.
Can anyone give me a pointer?
Thanks so much!
I apologize for moron-like questions here, but I'm a web programmer....
From what I understand, there is no such thing as a global variables (as in Visual Basic 6.....bas files) in .NET. Am I right?
Ok, if this is the case, how would I have to approach the situation in my game where I have to store players scores throughout a game? I suppose I can use the labels in my form, but this just seems like a pain in the butt, because then I have to go through all labels whenever I need to calculate total scores etc.
It would be nice to have an array of objects (Player objects) where I store a player's data (name, score, how many choices left, and so on). Also, what kind of game that has been chosen at startup (straight down, random) needs to be stored somewhere.
Would one possibility be using textfiles to store information for each player during a game (delete them when game is done)? Sounds to me like that would be a really screwed up way of doing it though.
Can anyone give me a pointer?
Thanks so much!