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.
- 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.
- Ensure you have Go installed on your system.
- Clone this repository to your local machine.
- Navigate to the project directory.
- Run the following command to start the client:
go run main.go
- When you start the client, you will be prompted to enter your name.
- 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.
- Follow the on-screen instructions for ship placement and gameplay.
- 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.
- Example:
- The server will validate your placement and has error handling for the most parts.
- Ensure the server is running and accessible at
localhost:8080before starting the client.
This project is licensed under the top secret license you are not allowed to use it unless you worship me.