Skip to content

anoodleReza/Battleship-game-socket-programming

Repository files navigation

Computer Network Lab Project Group 1

About the project

Battleship is already widely known by people an the rules are considered quite simple. We believe that most of us are already familiar with this game. We want our project to be enjoyed by people in general. That is why we chose battleship to be the main theme of our project.

The main goal of our project is to recreate the Battleship board game using socket programming. The objective of the game is to sink the enemy’s battleships before they sink yours by inputting the correct coordinates of the enemy ships.

This program allows a player to create a battleship game server so that another player could join the game as a client by using the correct IP. The boards for the battleships are printed to the console and locations of the battleships are randomized.

Made by:

Reynard Pradhitya

Reza Aurelio Brilliansah

Ahmad Fadhil Bukhori

Hosting / Connecting to a game

image image

Playing the game

image image

Victory / Defeat results

image image

COMPILATION:

  1. Change to the file directory of the game folder
  2. run "javac BattleServer.java"
  3. run "javac BattleClient.java"

RUNNING:

  1. Host/Player1 runs "java BattleServer"
  2. Client/Player2 runs "java BattleClient"

USE:

  1. Client enters the Host's IP address
  2. Host decides number of Battleships
  3. Input coordinates until you win/lose. (Coordinates are [Letter][Number], for example A9. The letter must be a capital letter.)

About

Battleship is already widely known by people an the rules are considered quite simple. We believe that most of us are already familiar with this game. We want our project to be enjoyed by people in general. That is why we chose battleship to be the main theme of our project.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages