Skip to content

Battleship game client. Made it because no one would play the board game with me so I made a computer game hoping people on the internet will validate this. Also to learn Go. Copied the same description from the server repo btw

Notifications You must be signed in to change notification settings

dh00mk3tu/Battleship-Client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Battleship-Client

Overview

The Battleship-Client is a terminal-based client application for playing the classic game of Battleship. It connects to a server via TCP and allows players to find matches, create private matches, or join private matches. The game includes features like ship placement and matchmaking.

Features

  • Find Match: Automatically search for an opponent and start a game.
  • Create Private Match: Create a private room and wait for an opponent to join.
  • Join Private Match: Join an existing private room using a Room ID.
  • Ship Placement: Place your ships on the board before the battle begins.
  • Real-Time Gameplay: Engage in battles with opponents in real-time.

How to Run

  1. Ensure you have Go installed on your system.
  2. Clone this repository to your local machine.
  3. Navigate to the project directory.
  4. Run the following command to start the client:
    go run main.go
    

How to Play

  1. When you start the client, you will be prompted to enter your name.
  2. Choose one of the following options from the menu:
    • 1. Find Match: The client will search for an opponent.
    • 2. Create Private Match: A private room will be created, and you will receive a Room ID to share with your opponent.
    • 3. Join Private Match: Enter the Room ID to join an existing private room. Case sensitive.
  3. Follow the on-screen instructions for ship placement and gameplay.

Ship Placement

  • You will be prompted to place your ships on the board.
  • Enter the ship placement in the format: ShipName StartCoord Direction.
    • Example: Destroyer A1 H (H = horizontal, V = vertical). Case sensitive.
  • The server will validate your placement and has error handling for the most parts.

Notes

  • Ensure the server is running and accessible at localhost:8080 before starting the client.

License

This project is licensed under the top secret license you are not allowed to use it unless you worship me.

About

Battleship game client. Made it because no one would play the board game with me so I made a computer game hoping people on the internet will validate this. Also to learn Go. Copied the same description from the server repo btw

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages