This is a battleship game written in Java. The communication between the server and client computer is done through TCP sockets.
Learn the IP address of the machine that will be the server.
Open the folder with your favorite Java IDE. Build & Run Server.java and Client.java in this order.
Enter your name and pick a port number (say 34000) to the console.
Wait for the Client to connect.
When the Client connects, you will be asked to place your ships.
Place your ships according to the appropriate format by giving coordinates (Default layout will be displayed).
When the Client places their ships, the game starts.
You will take the first shot, after that you will hit each other in turns.
When all ships of a player are sunk, the game will end.
Enter your name, IP address of the server and the port number that will be connected to the console.
You will be asked to place your ships.
Place your ships according to the appropriate format by giving coordinates (Default layout will be displayed).
Wait for the first shot, after that you will hit each other in turns.
When all ships of a player are sunk, the game will end.
Gufran Yeşilyurt
Murat Can Altun
-
This project is part of the course CS447 (Computer Networks) at Ozyegin University.
-
We want to thank everyone responsible for this course, giving us the opportunity to learn network programming.