Skip to content

This is a battleship game written in Java. The communication between the server and client computer is done through TCP sockets.

Notifications You must be signed in to change notification settings

gufranyes/Battleship

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Battleship

This is a battleship game written in Java. The communication between the server and client computer is done through TCP sockets.

Compilation & Build

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.

Run

Server

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.

Client

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.

Authors

Gufran Yeşilyurt

Murat Can Altun

Acknowledgments

  • 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.

About

This is a battleship game written in Java. The communication between the server and client computer is done through TCP sockets.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages