I have a code for rock paper scissors game , but this is only single player game and i want to develop it for multilayer
can any one help me for that logic?
my single player game code is
kindly help me for that.....
Joined: Dec 07, 2006
- refactor the code and store the session information variables in a Data Transfer Object (DTO)
- when the game starts running, ask the user initially how many players there are playing
- store the number of players in a Map
- run through the Map for each user and let the user have fun playing the game
Hope it helps,
Joined: Apr 23, 2012
can you please explain in details ?
Joined: Oct 13, 2005
Welcome to the Ranch
I think you ought to use an enum for the game. Not only can you say == ROCK, but you can also have loses to paper and wins over scissors in that object. There is a lot of non-object-oriented code in that main method. You should have a Player class with scores as a field. Please search; similar problems come up reasonably frequently.