posted 8 years ago
Games are basically state machines, there are many phases that have to complete in the game as the game is played, not just player 1 through player k's turn, but as you are encountering saving data, checking for wins, and etc. You need an object that can hold the guesses. How many players and how many guesses--you don't know. So you need to make something that will hold an undefined number of records of an undefined number of players.
Look at collections for data stores, simply put: you need a collection of collections. I like ArrayLists, that is a personal preference, but look through the API and see what you want to use.
The other problem of keeping track, I would suggest looking at state machines and write the process on paper to see how many states you have to implement.
BTW: each turn could be a state, but if you treat it as such, you have the problem of a varying number of states, look at having each turn broken into states, and then over a loop to keep track of the player (state of which turn). So you have a 2 dimensional state system.
Game programming rarely, if ever, has structure or progresses in linear fashion.
Out on HF and heard nobody, but didn't call CQ? Nobody heard you either. 73 de N7GH