Question: I need help creating a tic tac toe game played between sockets. I am having trouble connecting the sockets after the game is made Start

I need help creating a tic tac toe game played between sockets. I am having trouble connecting the sockets after the game is made I need help creating a tic tac toe game played between sockets.I am having trouble connecting the sockets after the game is madeStart Page x Client.java x ls Server.java x ticGame java x Source

Start Page x Client.java x ls Server.java x ticGame java x Source History 16 public class Server 17 private static final int portNumber 2000; private static final String welcome Message Server waiting on port" port Number private ServerSocket the Server; 20 21 public static void main string Clargs) 22 new Server Start 23 24 el private void start 25 26 27 try the Server new Server Gocket port 20 System out.println. welcome Message) 29 while (true) 30 Creates a new game 31 ticGames game new tic Game Client client new Client (the accept "X", game t1 22 Client client2 new client (theServer ccept "o", game 34 client .set oppositeplayer (client2) 35 client 2. setoppositePlayer (client1) 36 game .waitTurn ient1 37 new Thread (client1 start 38 new Thread (client2 start 39 40 41 42 catch (IOException e l 43 e-print StackTrace finally 46 try the server.close ();1 catch (IOException e) f e printstackTrace 48 49 50 51

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!