Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: help needed (tic tac toe problem)

  1. #1
    Junior Member
    Join Date
    Sep 2012
    Posts
    6
    My Mood
    Sad
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default help needed (tic tac toe problem)

    Hello!

    I'm not sure this is the right place for this but I need help solving the following problem:

    Client-server tic-tac-toe. The task is composed by two programs: client and server. The
    server is a “stupid” player: it always selects a random move, of course out of the possible ones. The
    client part is operated by the user. He is always the second player. The task has the following elements:
    1. TCP connection between the client and the server.
    2. When started, the server waits for the client to connect. Then it selects a random move. The
    server has to recognize who is the winner, after the game is over.
    3. The client selects its move in text format using the coordinates (for example (0 0) means the
    upper left corner). If the move is not possible, the server responds with a message that this field
    is occupied.
    4. After each move, a character table is printed in the client console, for example:

    O | | X
    | O |
    X | |

    Any help is appreciated! Thanks!


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    SW Missouri
    Posts
    20,067
    Thanks
    47
    Thanked 2,146 Times in 2,119 Posts

    Default Re: help needed (tic tac toe problem)

    Go ahead and post your code and ask any questions about.

    One thing you'll need to define is the "protocol" for communications between the client and server.
    What messages will be sent and how will they be recognized?
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. i am having a problem with the distance formula,help needed!
    By Bentino in forum What's Wrong With My Code?
    Replies: 4
    Last Post: March 22nd, 2012, 07:07 PM
  2. help needed!!
    By arvindbis in forum Web Frameworks
    Replies: 0
    Last Post: October 9th, 2011, 10:43 AM
  3. Help needed here!
    By esplanade56 in forum JavaServer Pages: JSP & JSTL
    Replies: 1
    Last Post: September 2nd, 2011, 08:51 AM
  4. [SOLVED] Help needed!
    By subhvi in forum Web Frameworks
    Replies: 4
    Last Post: February 18th, 2010, 08:26 AM
  5. code needed for the following problem
    By romilc in forum Java Theory & Questions
    Replies: 1
    Last Post: October 11th, 2009, 10:05 AM