I am using to java. I want to implement Checkers game in Java. The idea of the game is that any user can play game with any user who is currently "free". Means say A is playing with B then A and B are not considered to be free but if C is free and D connects. Then C and D both start playing. This way pair of 2 players is made automatically. I don't know how to implement this concept. Can anybody explain it to me in little detail of how to implement this in java?This game is network based means played over internet. 1 year back i implemented checkers but that can only be played by 2 players at a time. now i want to extend it and allow anybody to play the game. My only confusion is how to maintain this kind of queue. Any help would be appreciated.
One approach is to maintain queue and use ip addresses and let the 1st person connect to 2nd, but in that case, if the person is connecting to router it can be a problem. Say suppose 5 persons connect to same router and then each of them request for game. Then how can we know which data to send to which.
Will i have to use web service? and maintain session?or what? I don't have any idea. If anybody could explain me i would be very grateful.