File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Checkers game question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Checkers game question" Watch "Checkers game question" New topic

Checkers game question

Nitesh Panchal
Ranch Hand

Joined: Dec 23, 2008
Posts: 48
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.
Rob Spoor

Joined: Oct 27, 2005
Posts: 20271

The main issue at the moment is not Swing or user interface related. Moving to Java in General.

How To Ask Questions How To Answer Questions
I agree. Here's the link:
subject: Checkers game question
It's not a secret anymore!