• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Checkers game question

 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
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.
 
Sheriff
Posts: 22815
132
Eclipse IDE Spring Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The main issue at the moment is not Swing or user interface related. Moving to Java in General.
 
Do the next thing next. That’s a pretty good rule. Read the tiny ad, that’s a pretty good rule, too.
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic